How to customize the parameter description display for SWAGGER generator and UI calls? #9115
Replies: 2 comments
-
Because I am a Sagger introduced later and have hundreds of interfaces that need to be adjusted, I cannot use DTO packaging and cannot mark parameters with [from query], [from body], etc |
Beta Was this translation helpful? Give feedback.
0 replies
-
It's already resolved |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
DTO:
Public class OrganizationResult
{
//id, code, name
}
API:
[HttpPost]
Public ResultGet3 (int? Id, string? Code, OrganizationResult org)
{}
Question 1: Regarding the above interface, I want the Swagger UI to display parameter descriptions in the body as
{
id: int,
"code": "string",
'org':{
"id": "long",
"code": "string",
"name":"string"
}
}
like this:
Question 2: When calling the interface in the Swagger UI, the parameters can be placed in the body according to the above structure for requests
It would be best to have a unified configuration without adding feature tags on each interface or parameter. My name is. NET CORE 6.0
Beta Was this translation helpful? Give feedback.
All reactions