File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -910,16 +910,20 @@ class DefinitionGenerator {
910910 cleanupLinks ( ) {
911911 for ( const path of Object . keys ( this . openAPI . paths ) ) {
912912 for ( const [ name , value ] of Object . entries ( this . openAPI . paths [ path ] ) ) {
913- for ( const [ statusCode , responseObj ] of Object . entries (
914- value . responses
915- ) ) {
916- if ( responseObj . links ) {
917- for ( const [ linkName , linkObj ] of Object . entries (
918- responseObj . links
919- ) ) {
920- const opId = linkObj . operationId ;
921- if ( this . functionMap [ opId ] ) {
922- linkObj . operationId = this . functionMap [ opId ] [ 0 ] ;
913+ if (
914+ RegExp ( / ( g e t | p u t | p o s t | d e l e t e | o p t i o n s | h e a d | p a t c h | t r a c e ) / i) . test ( name )
915+ ) {
916+ for ( const [ statusCode , responseObj ] of Object . entries (
917+ value ?. responses
918+ ) ) {
919+ if ( responseObj . links ) {
920+ for ( const [ linkName , linkObj ] of Object . entries (
921+ responseObj . links
922+ ) ) {
923+ const opId = linkObj . operationId ;
924+ if ( this . functionMap [ opId ] ) {
925+ linkObj . operationId = this . functionMap [ opId ] [ 0 ] ;
926+ }
923927 }
924928 }
925929 }
You can’t perform that action at this time.
0 commit comments