8000 GitHub - anhvth/OpenAPI_UI
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

anhvth/OpenAPI_UI

Repository files navigation

openapi_webui

A Flask blueprint to easily integrate the OpenAPI WebUI (React frontend) into any Flask app.

Usage

  1. Build your React frontend (OpenAPI_UI) and ensure the build/ directory exists.
  2. Install this module in your Flask project (copy or pip install).
  3. Register the blueprint:
from flask import Flask
from openapi_webui import create_openapi_webui_blueprint

app = Flask(__name__)

# Serve the UI at /openapi-ui
app.register_blueprint(create_openapi_webui_blueprint(url_prefix="/openapi-ui"))

# ... your other routes ...

if __name__ == "__main__":
    app.run(debug=True)

Options

  • url_prefix: The route prefix to serve the UI (default: /openapi-ui)
  • build_dir: Path to the React build directory (default: ../OpenAPI_UI/build relative to this module)

Notes

  • Make sure the build/ directory is present and up-to-date.
  • This blueprint supports client-side routing (SPA fallback to index.html).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0