@@ -16,7 +16,7 @@ export default function transformComponentsObject(components: ComponentsObject,
1616 if ( components . schemas ) {
1717 output . push ( indent ( "schemas: {" , indentLv ) ) ;
1818 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 ) ) {
2020 const c = getSchemaObjectComment ( schemaObject , indentLv ) ;
2121 if ( c ) output . push ( indent ( c , indentLv ) ) ;
2222 let key = escObjKey ( name ) ;
@@ -37,7 +37,7 @@ export default function transformComponentsObject(components: ComponentsObject,
3737 if ( components . responses ) {
3838 output . push ( indent ( "responses: {" , indentLv ) ) ;
3939 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 ) ) {
4141 const c = getSchemaObjectComment ( responseObject , indentLv ) ;
4242 if ( c ) output . push ( indent ( c , indentLv ) ) ;
4343 let key = escObjKey ( name ) ;
@@ -62,7 +62,7 @@ export default function transformComponentsObject(components: ComponentsObject,
6262 if ( components . parameters ) {
6363 output . push ( indent ( "parameters: {" , indentLv ) ) ;
6464 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 ) ) {
6666 const c = getSchemaObjectComment ( parameterObject , indentLv ) ;
6767 if ( c ) output . push ( indent ( c , indentLv ) ) ;
6868 let key = escObjKey ( name ) ;
@@ -90,7 +90,7 @@ export default function transformComponentsObject(components: ComponentsObject,
9090 if ( components . requestBodies ) {
9191 output . push ( indent ( "requestBodies: {" , indentLv ) ) ;
9292 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 ) ) {
9494 const c = getSchemaObjectComment ( requestBodyObject , indentLv ) ;
9595 if ( c ) output . push ( indent ( c , indentLv ) ) ;
9696 let key = escObjKey ( name ) ;
@@ -125,7 +125,7 @@ export default function transformComponentsObject(components: ComponentsObject,
125125 if ( components . headers ) {
126126 output . push ( indent ( "headers: {" , indentLv ) ) ;
127127 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 ) ) {
129129 const c = getSchemaObjectComment ( headerObject , indentLv ) ;
130130 if ( c ) output . push ( indent ( c , indentLv ) ) ;
131131 let key = escObjKey ( name ) ;
@@ -150,7 +150,7 @@ export default function transformComponentsObject(components: ComponentsObject,
150150 if ( components . pathItems ) {
151151 output . push ( indent ( "pathItems: {" , indentLv ) ) ;
152152 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 ) ) {
154154 let key = escObjKey ( name ) ;
155155 if ( ctx . immutableTypes ) key = tsReadonly ( key ) ;
156156 if ( "$ref" in pathItemObject ) {
0 commit comments