-
-
Notifications
You must be signed in to change notification settings - Fork 434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nullable
not respected on $ref
schemas
#927
Comments
More generally, it seems like this part of the spec is not respected (emphasis mine):
|
openapi3.0 does not support the full JSON Schema spec. It is in openapi3.1 and this is still an open issue |
Apologies for the noise. I realized this after some more exploration/experimentation. I've got a workaround now: export const refExtrasToAllOf = (schema: Schema): Schema => {
if (RefSchema.guard(schema) && Object.keys(schema).length > 1) {
const { $ref, ...extra } = schema;
const allOf = AllOfSchema.guard(schema) ? schema.allOf : [];
allOf.push({ $ref });
return { ...extra, allOf };
}
return schema;
}; |
The text was updated successfully, but these errors were encountered: