I have an API end point that uses both path parameters and query parameters.
In the Swagger UI the path parameters are listed as required but the query
parameters are not.
I'm using Swashbuckle Gen to set up the descriptions from XML comments.
How can I set the query parameter to be required by the Swagger UI?
Currently using:
Swashbuckle.AspNetCore.Swagger 2.0.0
Swashbuckle.AspNetCore.SwaggerGen 2.0.0
Swashbuckle.AspNetCore.SwaggerUI 2.0.0
Example endpoint
/// <summary>
/// Filler text
/// </summary>
/// <param name="path1">
/// Filler text
/// </param>
/// <param name="query">
/// Filler text
/// </param>
[HttpGet("endpointname/{path1}")]
public string MethodName(int path1, string query) { }
Example call
www.apiurl.com/endpointname/path1?query=input
--
You received this message because you are subscribed to the Google Groups
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.