Skip to content

Commit 39b374d

Browse files
committed
format
1 parent 613e970 commit 39b374d

File tree

1 file changed

+34
-34
lines changed
  • packages/openapi-typescript/test/transform/schema-object

1 file changed

+34
-34
lines changed

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

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -12,46 +12,46 @@ describe("transformComponentsObject", () => {
1212
"options > rootTypes: true and rootTypesNoSchemaPrefix: true",
1313
{
1414
given: {
15-
"openapi": "3.0.0",
16-
"info": {
17-
"title": "Status API",
18-
"version": "1.0.0"
15+
openapi: "3.0.0",
16+
info: {
17+
title: "Status API",
18+
version: "1.0.0",
1919
},
20-
"paths": {
20+
paths: {
2121
"/status": {
22-
"get": {
23-
"summary": "Get current status",
24-
"responses": {
22+
get: {
23+
summary: "Get current status",
24+
responses: {
2525
"200": {
26-
"description": "Status response",
27-
"content": {
26+
description: "Status response",
27+
content: {
2828
"application/json": {
29-
"schema": {
30-
"$ref": "#/components/schemas/StatusResponse"
31-
}
32-
}
33-
}
34-
}
35-
}
36-
}
37-
}
29+
schema: {
30+
$ref: "#/components/schemas/StatusResponse",
31+
},
32+
},
33+
},
34+
},
35+
},
36+
},
37+
},
3838
},
39-
"components": {
40-
"schemas": {
41-
"StatusResponse": {
42-
"type": "object",
43-
"properties": {
44-
"status": {
45-
"$ref": "#/components/schemas/Status"
46-
}
47-
}
39+
components: {
40+
schemas: {
41+
StatusResponse: {
42+
type: "object",
43+
properties: {
44+
status: {
45+
$ref: "#/components/schemas/Status",
46+
},
47+
},
4848
},
49-
"Status": {
50-
"type": "string",
51-
"enum": ["pending", "active", "done"]
52-
}
53-
}
54-
}
49+
Status: {
50+
type: "string",
51+
enum: ["pending", "active", "done"],
52+
},
53+
},
54+
},
5555
},
5656
want: `export interface paths {
5757
"/status": {

0 commit comments

Comments
 (0)