How do I fix the issues of Swagger Generated code, when I run locally?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How do I fix the issues of Swagger Generated code, when I run locally?
How do I fix the issues of Swagger Generated code, when I run locally?
=========================================================
Thanks for reviewing my threads.
For the reference, I used this Swagger Demo yaml spec (pet store) to understand REST Api and generated swagger server using swagger editor online, which basically create server code artifacts nicely for Python Flask server, Python client . I want to run/test generated swagger server code together. when I tried to run this from python terminal locally, I had following error:
{
"detail": "The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}
I can't run swagger server which is generated based on Demo Api specification file from swagger editor.
why? what's the solution to run swagger server locally?
I did try of using different host and post but still can't open swagger server. any idea about this?posted
I find these issues raised in many places years ago, but no solutions posted for it.
Is this a bug or outstanding issue with swagger?
thanks
update:
- Labels:
-
Swagger Codegen
-
Swagger Editor
-
Swagger UI
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @SWaggerMD
I tested this using your input document on swagger editor.
I got the error message when i pointed to a non existed endpoint. However when i send a request to: http://localhost:8080/users/1 i got a 200 code response.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for looking into this issues.
I did find 8080 port reference i generated .py files.
Where is users, 1, localhost defined. How is the code picking this info?
You got return code 200. What are the other entry points to use for responses?
Are these info documented anywhere?
Thanks for your guidance.
