swagger-typescript-api icon indicating copy to clipboard operation
swagger-typescript-api copied to clipboard

Feature Request : Allow passing "patch" option to "swagger2openapi"

Open xcassel opened this issue 4 years ago • 4 comments

Hello,

I'm facing issues due to wrong information in Swagger of some APIs i'm using. (ex : info.termsOfService must be a URL)

"swagger2openapi" offers an option to fix those errors automatically. -p, --patch fix up small errors in the source definition

It can be interesting to add this as an option in the swagger-typescript-api command too and pass it to swagger2openapi ?

xcassel avatar Jul 20 '21 12:07 xcassel

I got this error too

kankedelangzi avatar Aug 30 '21 15:08 kankedelangzi

Running into this too, does anyone have a workaround?

jacobdo2 avatar Jun 10 '22 19:06 jacobdo2

If you're using it in nodejs, you can simply:

generateApi({ patch: true })

Unfortunately, I do not see that flag being supported in the command line tool

jacobdo2 avatar Jun 10 '22 19:06 jacobdo2

I downloaded the spec file and then changed the info.termsOfService value to a dummy URL. This worked for me.

jbzcooper avatar Jul 07 '22 21:07 jbzcooper