default | * | Declares the value of the parameter that the server will use if none is provided, for example a "count" to control the number of results per page might default to 100 if not supplied by the client in the request. (Note: "default" has no meaning for required parameters.) See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2. Unlike JSON Schema this value MUST conform to the defined type for this parameter. |
type
is string
, then default
can be "foo"
but cannot be 1
.It could be, but it depends on the scenario.
The producer/consumer isn’t necessarily the server/client.
When an API call is executed by the client to the server – the server is the consumer of the request. When the server returns a response, the client is the consumer of the response.
Basically, what it means, is that it’s up to the side that receives the data to assume a default value if one is not being sent in the data.
--
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 swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.