-
Hello! Is it possible to specify a default object property for object, using
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Yes, it is possible. OpenAPI 3.0 uses JSON Schema (draft 5) spec to define schemas. The
OpenAPI 3.0 clarifies semantics of the keyword in section 4.7.25.1 of the spec:
It means you may use Your example may be modified as:
|
Beta Was this translation helpful? Give feedback.
-
This was answered and accepted, closing. |
Beta Was this translation helpful? Give feedback.
Yes, it is possible.
OpenAPI 3.0 uses JSON Schema (draft 5) spec to define schemas.
The
default
keyword is defined in JSON Schema Validation spec, section 6.2:OpenAPI 3.0 clarifies semantics of the keyword in section 4.7.25.1 of the spec: