...
As mentioned above, optional query parameters that are parsed dynamically are not recognized by the AI tool while generating XML Document comments. As a workaround, we created introduced two new attributes that can be used to decorate API endpoint method in order to display a given query parameter(s) in Swagger UI.
- To add controller or method specific query parameter, use [QueryParameter] attribute (see example below)
- To add general purpose query parameter(s) that can be reused throughout multiple controllers, use [QueryParameters] attribute, typically paging query parameters, etc ... (see example below)
Adding optional request body
...