@@ -16,7 +16,7 @@ export default function transformComponentsObject(components: ComponentsObject,
16
16
if ( components . schemas ) {
17
17
output . push ( indent ( "schemas: {" , indentLv ) ) ;
18
18
indentLv ++ ;
19
- for ( const [ name , schemaObject ] of getEntries ( components . schemas , ctx . alphabetize ) ) {
19
+ for ( const [ name , schemaObject ] of getEntries ( components . schemas , ctx . alphabetize , ctx . excludeDeprecated ) ) {
20
20
const c = getSchemaObjectComment ( schemaObject , indentLv ) ;
21
21
if ( c ) output . push ( indent ( c , indentLv ) ) ;
22
22
let key = escObjKey ( name ) ;
@@ -37,7 +37,7 @@ export default function transformComponentsObject(components: ComponentsObject,
37
37
if ( components . responses ) {
38
38
output . push ( indent ( "responses: {" , indentLv ) ) ;
39
39
indentLv ++ ;
40
- for ( const [ name , responseObject ] of getEntries ( components . responses , ctx . alphabetize ) ) {
40
+ for ( const [ name , responseObject ] of getEntries ( components . responses , ctx . alphabetize , ctx . excludeDeprecated ) ) {
41
41
const c = getSchemaObjectComment ( responseObject , indentLv ) ;
42
42
if ( c ) output . push ( indent ( c , indentLv ) ) ;
43
43
let key = escObjKey ( name ) ;
@@ -62,7 +62,7 @@ export default function transformComponentsObject(components: ComponentsObject,
62
62
if ( components . parameters ) {
63
63
output . push ( indent ( "parameters: {" , indentLv ) ) ;
64
64
indentLv ++ ;
65
- for ( const [ name , parameterObject ] of getEntries ( components . parameters , ctx . alphabetize ) ) {
65
+ for ( const [ name , parameterObject ] of getEntries ( components . parameters , ctx . alphabetize , ctx . excludeDeprecated ) ) {
66
66
const c = getSchemaObjectComment ( parameterObject , indentLv ) ;
67
67
if ( c ) output . push ( indent ( c , indentLv ) ) ;
68
68
let key = escObjKey ( name ) ;
@@ -90,7 +90,7 @@ export default function transformComponentsObject(components: ComponentsObject,
90
90
if ( components . requestBodies ) {
91
91
output . push ( indent ( "requestBodies: {" , indentLv ) ) ;
92
92
indentLv ++ ;
93
- for ( const [ name , requestBodyObject ] of getEntries ( components . requestBodies , ctx . alphabetize ) ) {
93
+ for ( const [ name , requestBodyObject ] of getEntries ( components . requestBodies , ctx . alphabetize , ctx . excludeDeprecated ) ) {
94
94
const c = getSchemaObjectComment ( requestBodyObject , indentLv ) ;
95
95
if ( c ) output . push ( indent ( c , indentLv ) ) ;
96
96
let key = escObjKey ( name ) ;
@@ -125,7 +125,7 @@ export default function transformComponentsObject(components: ComponentsObject,
125
125
if ( components . headers ) {
126
126
output . push ( indent ( "headers: {" , indentLv ) ) ;
127
127
indentLv ++ ;
128
- for ( const [ name , headerObject ] of getEntries ( components . headers , ctx . alphabetize ) ) {
128
+ for ( const [ name , headerObject ] of getEntries ( components . headers , ctx . alphabetize , ctx . excludeDeprecated ) ) {
129
129
const c = getSchemaObjectComment ( headerObject , indentLv ) ;
130
130
if ( c ) output . push ( indent ( c , indentLv ) ) ;
131
131
let key = escObjKey ( name ) ;
@@ -150,7 +150,7 @@ export default function transformComponentsObject(components: ComponentsObject,
150
150
if ( components . pathItems ) {
151
151
output . push ( indent ( "pathItems: {" , indentLv ) ) ;
152
152
indentLv ++ ;
153
- for ( const [ name , pathItemObject ] of getEntries ( components . pathItems , ctx . alphabetize ) ) {
153
+ for ( const [ name , pathItemObject ] of getEntries ( components . pathItems , ctx . alphabetize , ctx . excludeDeprecated ) ) {
154
154
let key = escObjKey ( name ) ;
155
155
if ( ctx . immutableTypes ) key = tsReadonly ( key ) ;
156
156
if ( "$ref" in pathItemObject ) {
0 commit comments