@@ -28,13 +28,15 @@ export function transformAll(schema: any, { formatter, immutableTypes, rawSchema
28
28
formatter,
29
29
immutableTypes,
30
30
required : Object . keys ( schema ) ,
31
+ document : schema ,
31
32
} ) } \n}`;
32
33
}
33
34
case 3 : {
34
35
return `export interface schemas {\n ${ transformSchemaObjMap ( schema , {
35
36
formatter,
36
37
immutableTypes,
37
38
required : Object . keys ( schema ) ,
39
+ document : schema ,
38
40
} ) } \n }\n\n`;
39
41
}
40
42
}
@@ -47,6 +49,7 @@ export function transformAll(schema: any, { formatter, immutableTypes, rawSchema
47
49
globalParameters : ( schema . components && schema . components . parameters ) || schema . parameters ,
48
50
immutableTypes,
49
51
operations,
52
+ document : schema ,
50
53
version,
51
54
} ) ;
52
55
}
@@ -60,6 +63,7 @@ export function transformAll(schema: any, { formatter, immutableTypes, rawSchema
60
63
formatter,
61
64
immutableTypes,
62
65
required : Object . keys ( schema . definitions ) ,
66
+ document : schema ,
63
67
} ) } \n}\n\n`;
64
68
}
65
69
@@ -70,6 +74,7 @@ export function transformAll(schema: any, { formatter, immutableTypes, rawSchema
70
74
formatter,
71
75
immutableTypes,
72
76
required,
77
+ document : schema ,
73
78
} ) } \n }\n\n`;
74
79
}
75
80
@@ -78,6 +83,7 @@ export function transformAll(schema: any, { formatter, immutableTypes, rawSchema
78
83
output += `export interface responses {\n ${ transformResponsesObj ( schema . responses , {
79
84
formatter,
80
85
immutableTypes,
86
+ document : schema ,
81
87
} ) } \n }\n\n`;
82
88
}
83
89
break ;
@@ -94,6 +100,7 @@ export function transformAll(schema: any, { formatter, immutableTypes, rawSchema
94
100
formatter,
95
101
immutableTypes,
96
102
required,
103
+ document : schema ,
97
104
} ) } \n }\n`;
98
105
}
99
106
@@ -102,6 +109,7 @@ export function transformAll(schema: any, { formatter, immutableTypes, rawSchema
102
109
output += ` ${ readonly } responses: {\n ${ transformResponsesObj ( schema . components . responses , {
103
110
formatter,
104
111
immutableTypes,
112
+ document : schema ,
105
113
} ) } \n }\n`;
106
114
}
107
115
@@ -112,6 +120,7 @@ export function transformAll(schema: any, { formatter, immutableTypes, rawSchema
112
120
formatter,
113
121
immutableTypes,
114
122
required,
123
+ document : schema ,
115
124
} ) } \n }\n`;
116
125
}
117
126
@@ -120,13 +129,15 @@ export function transformAll(schema: any, { formatter, immutableTypes, rawSchema
120
129
output += ` ${ readonly } requestBodies: {\n ${ transformRequestBodies ( schema . components . requestBodies , {
121
130
formatter,
122
131
immutableTypes,
132
+ document : schema ,
123
133
} ) } \n }\n`;
124
134
}
125
135
126
136
// #/components/headers
127
137
if ( schema . components . headers ) {
128
138
output += ` ${ readonly } headers: {\n ${ transformHeaderObjMap ( schema . components . headers , {
129
139
formatter,
140
+ document : schema ,
130
141
immutableTypes,
131
142
} ) } }\n`;
132
143
}
@@ -145,6 +156,7 @@ export function transformAll(schema: any, { formatter, immutableTypes, rawSchema
145
156
pathItem,
146
157
globalParameters : ( schema . components && schema . components . parameters ) || schema . parameters ,
147
158
immutableTypes,
159
+ document : schema ,
148
160
version,
149
161
} ) } \n }\n`;
150
162
} ) ;
0 commit comments