This repository was archived by the owner on Feb 10, 2023. It is now read-only.
File tree 4 files changed +14
-2
lines changed
src/internal/OpenApiTools/components
4 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -257,6 +257,9 @@ export const addSchema = (
257
257
if ( ! schema ) {
258
258
return ;
259
259
}
260
+ if ( Guard . isAdhocAllOfSchema ( schema ) ) {
261
+ schema = ToTypeNode . mergeAdhoc ( currentPoint , schema , context ) ;
262
+ }
260
263
if ( Guard . isAllOfSchema ( schema ) ) {
261
264
store . addStatement ( targetPoint , {
262
265
kind : "typeAlias" ,
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ export const generateNamespace = (
82
82
} ) ,
83
83
} ) ;
84
84
}
85
- const schema = InferredType . getInferredType ( targetSchema ) ;
85
+ let schema = InferredType . getInferredType ( targetSchema ) ;
86
86
const path = `${ basePath } /${ name } ` ;
87
87
if ( ! schema ) {
88
88
// Schemaが特定できないためWarningを出力する
@@ -97,6 +97,9 @@ export const generateNamespace = (
97
97
{ override : true } ,
98
98
) ;
99
99
}
100
+ if ( Guard . isAdhocAllOfSchema ( schema ) ) {
101
+ schema = ToTypeNode . mergeAdhoc ( currentPoint , schema , context ) ;
102
+ }
100
103
if ( Guard . isAllOfSchema ( schema ) ) {
101
104
return store . addStatement (
102
105
path ,
Original file line number Diff line number Diff line change @@ -214,6 +214,9 @@ export const addSchema = (
214
214
if ( ! schema ) {
215
215
return ;
216
216
}
217
+ if ( Guard . isAdhocAllOfSchema ( schema ) ) {
218
+ schema = ToTypeNode . mergeAdhoc ( currentPoint , schema , context ) ;
219
+ }
217
220
if ( Guard . isAllOfSchema ( schema ) ) {
218
221
store . addStatement ( targetPoint , {
219
222
kind : "typeAlias" ,
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ export const generateNamespace = (
79
79
} ) ,
80
80
} ) ;
81
81
}
82
- const schema = InferredType . getInferredType ( targetSchema ) ;
82
+ let schema = InferredType . getInferredType ( targetSchema ) ;
83
83
const path = `${ basePath } /${ name } ` ;
84
84
if ( ! schema ) {
85
85
// Schemaが特定できないためWarningを出力する
@@ -94,6 +94,9 @@ export const generateNamespace = (
94
94
{ override : true } ,
95
95
) ;
96
96
}
97
+ if ( Guard . isAdhocAllOfSchema ( schema ) ) {
98
+ schema = ToTypeNode . mergeAdhoc ( currentPoint , schema , context ) ;
99
+ }
97
100
if ( Guard . isAllOfSchema ( schema ) ) {
98
101
return store . addStatement (
99
102
path ,
You can’t perform that action at this time.
0 commit comments