1

From http://editor.swagger.io/ with swagger 2.0 I am able to select: Generate Server-->python-flask and generate a python server that I can deploy and use.

BUT When I change to use OpenAPI v3 by selecting Edit--> Convert to Open API 3 I now no longer see the option to generate a python flask server.

Is this not implemented or is there another way to do this?

4
  • why vote close? Commented Apr 29, 2019 at 17:36
  • 1
    This sounds like something to ask Swagger support. Commented Apr 29, 2019 at 17:39
  • 2
    Seeing as the editor outputs a Flask server using Connexion with the V2 yaml document embedded and Connexion directly supports V3, you could try to take that and swap out the swagger_server/swagger/swagger.yaml file for the V3 version after conversion. And do ask Swagger support as to why their code generator can't do that yet. Commented Apr 29, 2019 at 17:50
  • 1
    Ah, the x-swagger-router-controller entries would have to be copied across. Commented Apr 29, 2019 at 17:56

3 Answers 3

1

You may want to try OpenAPI Generator instead.

Sign up to request clarification or add additional context in comments.

Comments

1

Python Flask server generator for OpenAPI 3.0 is now available in Swagger Editor and Swagger Codegen 3.0.9+.

Comments

0
  1. install Bash Launcher Script from https://openapi-generator.tech/docs/installation

  2. create example.sh file

    #!/bin/sh
    
    openapi-generator-cli generate \
        -g python-flask \
        -i <your .yaml directory> \
        -o <output directory>
    
  3. run example.sh

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.