Alex_I1
22 hours agoNew Member
Required: false?
Hello, everyone!
We are using Swashbuckle and ASP.NET Core. The question is, is it possible to make Swagger to generate explicit "Required: false" property for our optional query params? For some reason we can only get "Required: true" for mandatory params, but for optional nothing is being generated
Example of our code that generates "Required: true":
[FromQuery][Required] string? key = "key")
Final Schema:
name: key
in: query
required: true
schema:
type: string