Skip to content
Snippets Groups Projects
Unverified Commit 012d744f authored by syuilo's avatar syuilo
Browse files

Fix doc

parent d4c7ca76
No related branches found
No related tags found
No related merge requests found
......@@ -28,6 +28,9 @@ export function convertOpenApiSchema(schema: Schema) {
if (!['string', 'number', 'boolean', 'array', 'object'].includes(x.type)) {
x['$ref'] = `#/components/schemas/${x.type}`;
}
if (x.type === 'array' && x.items) {
x.items = convertOpenApiSchema(x.items);
}
if (x.type === 'object' && x.properties) {
x.required = Object.entries(x.properties).filter(([k, v]: any) => !v.isOptional).map(([k, v]: any) => k);
for (const k of Object.keys(x.properties)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment