Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running Open API generator Command for dotnet application in azure pipelines, Unable to query repository, "Request failed with status code 504" error

I am Running Open API generator Command for dotnet application in azure pipelines, i am getting Unable to query repository, because of: "Request failed with status code 504" error.. few times its executing successful and few times it´s not.

Unable to query repository, because of: "Request failed with status code 504"

Response:

server awselb/2.0
content-type text/html
content-length 132
connection close

/opt/hostedtoolcache/node/16.19.0/x64/lib/node_modules/@openapitools/openapi-generator-cli/main.js:1045
            error.response.data.on('data', data => this.logger.log(data.toString('utf8')));
                                ^

TypeError: error.response.data.on is not a function
    at VersionManagerService.printResponseError (/opt/hostedtoolcache/node/16.19.0/x64/lib/node_modules/@openapitools/openapi-generator-cli/main.js:1045:33)
    at /opt/hostedtoolcache/node/16.19.0/x64/lib/node_modules/@openapitools/openapi-generator-cli/main.js:924:18
    at /opt/hostedtoolcache/node/16.19.0/x64/lib/node_modules/@openapitools/openapi-generator-cli/node_modules/rxjs/dist/cjs/internal/operators/catchError.js:13:51
    at OperatorSubscriber._this._error (/opt/hostedtoolcache/node/16.19.0/x64/lib/node_modules/@openapitools/openapi-generator-cli/node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js:43:21)
    at OperatorSubscriber.Subscriber.error (/opt/hostedtoolcache/node/16.19.0/x64/lib/node_modules/@openapitools/openapi-generator-cli/node_modules/rxjs/dist/cjs/internal/Subscriber.js:60:18)
    at OperatorSubscriber.Subscriber._error (/opt/hostedtoolcache/node/16.19.0/x64/lib/node_modules/@openapitools/openapi-generator-cli/node_modules/rxjs/dist/cjs/internal/Subscriber.js:84:30)
    at OperatorSubscriber.Subscriber.error (/opt/hostedtoolcache/node/16.19.0/x64/lib/node_modules/@openapitools/openapi-generator-cli/node_modules/rxjs/dist/cjs/internal/Subscriber.js:60:18)
    at OperatorSubscriber.Subscriber._error (/opt/hostedtoolcache/node/16.19.0/x64/lib/node_modules/@openapitools/openapi-generator-cli/node_modules/rxjs/dist/cjs/internal/Subscriber.js:84:30)
    at OperatorSubscriber.Subscriber.error (/opt/hostedtoolcache/node/16.19.0/x64/lib/node_modules/@openapitools/openapi-generator-cli/node_modules/rxjs/dist/cjs/internal/Subscriber.js:60:18)
    at OperatorSubscriber.Subscriber._error (/opt/hostedtoolcache/node/16.19.0/x64/lib/node_modules/@openapitools/openapi-generator-cli/node_modules/rxjs/dist/cjs/internal/Subscriber.js:84:30

basically this command was executed successfully before.. but dont know suddenly its starts giving this error. i am trying to Generate CLient SDK with the Help of OPEN API Generator. but its getting failed. while running this OPEN API Generator COmmand here is the command i am trying:

script: "openapi-generator-cli generate -g csharp-netcore --additional-properties=prependFormOrBodyParameters=true,targetFramework=net6.0,packageName=Microservice.Sdk -o out -i $(swaggerLocation)/$(appName).v1.json --skip-validate-spec"
like image 427
sharma Avatar asked Oct 24 '25 14:10

sharma


1 Answers

It can be skipped by creating openapitools.json file on your working directry. Contents be like:

{
  "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json",
  "spaces": 2,
  "generator-cli": {
    "version": "6.2.1"
  }
}
like image 89
Ikomyon Avatar answered Oct 26 '25 05:10

Ikomyon



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!