openapi-to-postman icon indicating copy to clipboard operation
openapi-to-postman copied to clipboard

Support URL as a source

Open Meemaw opened this issue 5 years ago • 3 comments

It would be nice if the CLI supported URLs as a source for the openapi spec, e.g:

openapi2postmanv2 -s http://localhost:8080/openapi ...

Meemaw avatar Mar 16 '20 13:03 Meemaw

@umeshp7 @abhijitkane Hi, I'm new here, can I work on this feature?

liyingxiu avatar Mar 16 '20 13:03 liyingxiu

@Meemaw could you elaborate what you mean by source? How should the http://localhost:8080/openapi be represented in the final generated collection?

abhijitkane avatar Apr 27 '20 09:04 abhijitkane

As I see it right now, you need to pass a file to the CLI. Another option would be to pass an URL which is exposing the spec (e.g. http://petstore.swagger.io:8080/api/v3/openapi.json). So, internally you could fetch the specification from the URL to local folder and just use your existing logic.

It's not too hard to write some bash around the CLI to do this, but it could be a nice feature to be in the CLI.

Meemaw avatar Apr 27 '20 10:04 Meemaw