Merge branch 'develop' of https://github.com/misskey-dev/misskey into develop
This commit is contained in:
commit
ce09a35b03
@ -26,7 +26,12 @@ export function convertSchemaToOpenApiSchema(schema: Schema) {
|
|||||||
if (schema.allOf) res.allOf = schema.allOf.map(convertSchemaToOpenApiSchema);
|
if (schema.allOf) res.allOf = schema.allOf.map(convertSchemaToOpenApiSchema);
|
||||||
|
|
||||||
if (schema.ref) {
|
if (schema.ref) {
|
||||||
res.$ref = `#/components/schemas/${schema.ref}`;
|
const $ref = `#/components/schemas/${schema.ref}`;
|
||||||
|
if (schema.nullable || schema.optional) {
|
||||||
|
res.allOf = [{ $ref }];
|
||||||
|
} else {
|
||||||
|
res.$ref = $ref;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
|
Loading…
Reference in New Issue
Block a user