Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When importing a OpenAPI from a URL with a document path, restish is not able to import it. #180

Open
tobiashochguertel opened this issue Feb 24, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@tobiashochguertel
Copy link

tobiashochguertel commented Feb 24, 2023

I have the following url for my openapi endoint: https://petstore.swagger.io/v2/swagger.json or for my current project: http://localhost:8082/v3/api-docs (format: json) or if I want the openapi as yaml then http://localhost:8082/v3/api-docs.yaml.

Restish, always trys to fetch the openapi from a url with and ending slash it doesn't matter if I set a url path with a extension or not.

Example:

http://localhost:8082/v3/api-docs          			-->		http://localhost:8082/v3/api-docs/
http://localhost:8082/v3/api-docs.yaml  		-->		http://localhost:8082/v3/api-docs.yaml/
https://petstore.swagger.io/v2/swagger.json 	-->		https://petstore.swagger.io/v2/swagger.json/
 tobiashochgurtel@Tobiass-MBP  ~/work-dev/cronmon/api/openapi/restish   main  restish api config cronmon                                                                                                                                                                 SIGINT(2) ↵  10069  13:14:58
? Base URI http://localhost:8082/v3/api-docs.yaml
? Select option Save and exit
 tobiashochgurtel@Tobiass-MBP  ~/work-dev/cronmon/api/openapi/restish   main  restish api sync cronmon                                                                                                                                                                             ✔  10070  13:19:41
ERROR: Caught error: could not detect API type: http://localhost:8082/v3/api-docs.yaml/
 tobiashochgurtel@Tobiass-MBP  ~/work-dev/cronmon/api/openapi/restish   main 

Related issues are: #179

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants