You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The OAS3.0 states default - The default value represents what would be assumed by the consumer of the input as the value of the schema if one is not provided. Unlike JSON Schema, the value MUST conform to the defined type for the Schema Object defined at the same level. For example, if type is string, then default can be "foo" but cannot be 1.
So a default value of type String is wrong for any schema which is not of type string (array, int ...)
I can not specify an array of default values for the array schema
To make it worse, if i read the spec correctly if the items in the array are of type int i should specify an array of ints, when the item type is array i should specify an array of arrays ...
This has an impact on real life projects, as can be seen on: springdoc/springdoc-openapi#1010
The text was updated successfully, but these errors were encountered:
I can specify the default value for an
@ArraySchema
with f.e.The OAS3.0 states
default - The default value represents what would be assumed by the consumer of the input as the value of the schema if one is not provided. Unlike JSON Schema, the value MUST conform to the defined type for the Schema Object defined at the same level. For example, if type is string, then default can be "foo" but cannot be 1.
So a default value of type String is wrong for any schema which is not of type string (array, int ...)
I can not specify an array of default values for the array schema
To make it worse, if i read the spec correctly if the items in the array are of type int i should specify an array of ints, when the item type is array i should specify an array of arrays ...
This has an impact on real life projects, as can be seen on:
springdoc/springdoc-openapi#1010
The text was updated successfully, but these errors were encountered: