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
A true value adds "null" to the allowed type specified by the type
keyword, only if type is explicitly defined within the same Schema
Object.
(emphasis mine). Since the schema object associated with the user property does not have a type, the nullable annotation seems to do nothing: the nullability of the value is controlled by /components/schemas/simple-user.
as a result, the intermediate allOf seems completely unnecessary: per OpenAPI,
Alternatively, any time a Schema Object can be used, a Reference
Object can be used in its place. This allows referencing
definitions instead of defining them inline.
so it should be possible to just have
user
is defined as a non-required nullableallOf
aref
to/components/schemas/simple-user
, which is itselfnullable
.nullable
seems incorrect as OpenAPI specifiesnullable
as:allOf
seems completely unnecessary: per OpenAPI,The text was updated successfully, but these errors were encountered: