Skip to content

Commit cc3cc06

Browse files
committed
chore(openapi-typescript): format prettier
1 parent 4d6b16f commit cc3cc06

File tree

2 files changed

+17
-12
lines changed

2 files changed

+17
-12
lines changed

packages/openapi-typescript/src/transform/schema-object.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,8 +302,13 @@ function transformSchemaObjectCore(
302302
}
303303
// standard array type
304304
else if (schemaObject.items) {
305-
if("type" in schemaObject.items && schemaObject.items.type === 'array'){
306-
itemType = ts.factory.createArrayTypeNode(transformSchemaObject(schemaObject.items, options));
305+
if (
306+
"type" in schemaObject.items &&
307+
schemaObject.items.type === "array"
308+
) {
309+
itemType = ts.factory.createArrayTypeNode(
310+
transformSchemaObject(schemaObject.items, options),
311+
);
307312
} else {
308313
itemType = transformSchemaObject(schemaObject.items, options);
309314
}

packages/openapi-typescript/test/transform/schema-object/object.test.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -344,20 +344,20 @@ describe("transformSchemaObject > object", () => {
344344
type: "object",
345345
properties: {
346346
array: {
347-
"type": "array",
348-
"items": {
349-
"items": [
347+
type: "array",
348+
items: {
349+
items: [
350350
{
351-
"type": "string"
351+
type: "string",
352352
},
353353
{
354-
"type": "boolean"
355-
}
354+
type: "boolean",
355+
},
356356
],
357-
"type": "array",
358-
"maxItems": 2,
359-
"minItems": 2
360-
}
357+
type: "array",
358+
maxItems: 2,
359+
minItems: 2,
360+
},
361361
},
362362
},
363363
},

0 commit comments

Comments
 (0)