File tree Expand file tree Collapse file tree 1 file changed +34
-34
lines changed
packages/openapi-typescript/test/transform/schema-object Expand file tree Collapse file tree 1 file changed +34
-34
lines changed Original file line number Diff line number Diff line change @@ -12,46 +12,46 @@ describe("transformComponentsObject", () => {
12
12
"options > rootTypes: true and rootTypesNoSchemaPrefix: true" ,
13
13
{
14
14
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" ,
19
19
} ,
20
- " paths" : {
20
+ paths : {
21
21
"/status" : {
22
- " get" : {
23
- " summary" : "Get current status" ,
24
- " responses" : {
22
+ get : {
23
+ summary : "Get current status" ,
24
+ responses : {
25
25
"200" : {
26
- " description" : "Status response" ,
27
- " content" : {
26
+ description : "Status response" ,
27
+ content : {
28
28
"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
+ } ,
38
38
} ,
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
+ } ,
48
48
} ,
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
+ } ,
55
55
} ,
56
56
want : `export interface paths {
57
57
"/status": {
You can’t perform that action at this time.
0 commit comments