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
- Allow OpenApiNull as the data when schema specifies nullable == true
- Note that this applies to all data types, even arrays and objects. Per JSON schema, objects, arrays, strings, etc. are separate from the null types. If the schema wants to allow the objects, arrays, etc. to be nullable, the nullable boolean must be specifically set to true. (In JSON schema, this is done by using type : ["array", "null"], which is not allowed in OpenAPI spec).
Reference:
At its core, JSON Schema defines the following basic types:
string
Numeric types
object
array
boolean
null
Primitive data types in the OAS are based on the types supported by the JSON Schema Specification Wright Draft 00. Note that integer as a type is also supported and is defined as a JSON number without a fraction or exponent part. null is not supported as a type (see nullable for an alternative solution). Models are defined using the Schema Object, which is an extended subset of JSON Schema Specification Wright Draft 00.
0 commit comments