'Can I generate an Open API 3 Python Flask server?

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?



Solution 1:[1]

You may want to try OpenAPI Generator instead.

Solution 2:[2]

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

Solution 3:[3]

  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

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 William Cheng
Solution 2 Helen
Solution 3 Suraj Rao