Swashbuckle.AspNetCore
Swashbuckle.AspNetCore copied to clipboard
[Question]: I have an optional Parameter in my API request with default value. When I do that, in swagger, I dont see required: true for that field.
What are you wanting to achieve?
paths: get: summary: Example endpoint parameters: - name: optionalParam in: query required: false schema: type: string responses: '200': description: Successful response
I am not getting required: false for the optional parameter. Is there a way to explicitly show required: false for optional parameters?
What code or approach do you have so far?
paths: get: summary: Example endpoint parameters: - name: optionalParam in: query required: false schema: type: string responses: '200': description: Successful response
Additional context
No response