- Swagger enum default value. Note Apr 7, 2016 · Do you want the schema to describe the value as a string but then post an integer to the server? JSON. The value type must be the same as the parameter’s data type. These pre-defined constant values are called enum. For example, the sort parameter in GET /items?sort=[asc|desc] can be described as: In YAML, you can also specify one enum value per line: All values in an enum must adhere to the specified type. The default value is the one that the server uses if the client does not supply the parameter value in the request. Desc Hi, I have a Swagger ui and a C# Controller with a GET. Oct 3, 2017 · Whenever you omit the default tag the request is fine. 0. For example, for an API that creates a web server, you would want the client to think carefully about the server size as it costs the client money. May 20, 2023 · I wrote an ISchemaFilter to change the property values that the Swagger UI uses in its example JSON. sdoc sves8 k1z okiy ewkl8 rfc cgiie wci7 gz qjgfykb