Contributions
Re: Need help - Swagger CodeGen ?
Thanks again. I did reply to your question. I did report a error received, when I try to follow the steps provided in README doc of Client generation with Python. I raised two issues in this thread, 1) Swagger Client Generated code throwing error 2) Extend the functionality of Generated Pet store application to add pet images, list , characteristics. As perhttps://editor.swagger.io/ it shows swagger: "2.0" I tried to run the Python Client generated from the Swagger editor, but I am getting the following error: Failed to establish a new connection: [errno 113] no route to host Is it possible to do this with the Python Client provided in the Swagger editor, or do I need to use another language like Golang instead? I have looked online for some tutorial pieces (both on YouTube and other forums) which explain the purpose of the API client and its usability, but I have not found any which give a suitable explanation. Thanks for your guidance.1.3KViews0likes0CommentsRe: Need help - Swagger CodeGen ?
Thanks for your questions. Here are my answers. * are you using the 2.x or 3.x petstore sample? As per https://editor.swagger.io/ it shows swagger: "2.0" * have you modified the sample toinclude pet images (in PNG format), a list of the inputted files, and characteristics about them? If so, please share the modified spec . I did not . I am not sure, what kind of modifications and where to make. That was the reason , I opened this thread. I did not find suitable guidance posted through tutorials about making such changes. If you have any suggestions, please let me know. * are you getting errors with the server or with the client? N/A Thanks for your guidance/help.1.4KViews0likes2CommentsGetting Started with Swagger Codegen?
Getting Started with Swagger Codegen? ================================ Thanks for reviewing this threads and responses to my prior postings. I did follow the getting started (archived) thread of this forum. The links in this thread takes to many places, but I lost in getting started directive. I am opening this thread not to critic the swagger tools, but to provide an avenue to improve/enhance it. I hope that others in forum do the same. Let me try with an example. https://editor.swagger.io/ It shows .yaml on left and user interface on right. In the top menu important help tab is missing. The help is the key for any tools . Most tools takes us How to ..... to understand the tool better I find Generate Server , Generate Client . I am struggling to understand how to use the Server, client code coming out of this tool. During the generation, it produced many scripts, but none of them has any comments to show what are these scripts doing? I do not think adding comments during generation a big deal. I am not sure about this omission. Will it it be helpful to provide some mapping document kind between input .yaml spec and output scripts? I am trying to figure out , how to extend the functionality of given API ( https://editor.swagger.io/ ) using Swagger Codegen. I have looked online for some tutorial pieces (both on YouTube and other forums) which explain the above, but I have not found any which give a suitable explanation and understanding. I know many experienced members with workaround for above raised issues. You are welcome to share your findings to improve this community/tools. Thanks for sharing.492Views0likes0CommentsRe: How do I fix the issues of Swagger Generated code, when I run locally?
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.1.5KViews0likes0CommentsRe: Need help - Swagger CodeGen ?
Thanks for looking into this issue. I am using the Pet Store example which can be found on the Swagger Editor website, which shows the API file being inputted and the resulting API in the Swagger UI : https://editor.swagger.io/ I am trying to extend this demo to include pet images (in PNG format), a list of the inputted files, and characteristics about them I tried to run the Python Client generated from the Swagger editor, but I am getting the following error: Failed to establish a new connection: [errno 113] no route to host Is it possible to do this with the Python Client provided in the Swagger editor, or do I need to use another language like Golang instead? I have looked online for some tutorial pieces (both on YouTube and other forums) which explain the purpose of the API client and its usability, but I have not found any which give a suitable explanation. Thanks for your guidance.1.4KViews0likes4CommentsHow 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:1.6KViews0likes2CommentsNeed help - Swagger CodeGen ?
Thanks for providing Swagger CodeGen and reviewing my thread. *** Swagger version 2.0 *** I have created server and client modules in Python. I am able to view the API in a web browser using the Swagger editor for my yml file. In this mode, parameters: $ref: "#/definitions/Image" is not getting resolved. I followed the steps from the generated README doc and installed the server & client modules in Ubuntu. When I invoke python3 -m swagger_server to run the server, I receive the following error: name 'Image' is not defined. I am trying to load in a set of PNG files as an input for the server, but I am unsure of how to do this with my yml file (with the required reference command for my image object) and generated scripts from the swagger editor. As the swagger editor generates a large amount of python scripts and files, how do I add the required functionality to these files? Thanks for your guidance.1.4KViews0likes6Comments