様々な修正 (#4859)

Typo, Redundant code, Syntax error の修正
This commit is contained in:
Satsuki Yanagi
2019-05-05 09:27:55 +09:00
committed by syuilo
parent 58a04ce1a5
commit 5fb0a995dd
37 changed files with 59 additions and 49 deletions

View File

@ -18,7 +18,7 @@ export function convertSchemaToOpenApiSchema(schema: Schema) {
const res: any = schema;
if (schema.type === 'object' && schema.properties) {
res.required = Object.entries(schema.properties).filter(([k, v]) => v.optional !== true).map(([k]) => k);
res.required = Object.entries(schema.properties).filter(([k, v]) => !v.optional).map(([k]) => k);
for (const k of Object.keys(schema.properties)) {
res.properties[k] = convertSchemaToOpenApiSchema(schema.properties[k]);