Skip to content

Commit 1e17ca4

Browse files
committed
Added render_redoc_ui and redoc_url. Changed /docs/ -> /docs
1 parent c6d7be4 commit 1e17ca4

26 files changed

+146
-49
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes to FastOpenAPI are documented in this file.
44

55
FastOpenAPI follows the [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) format.
66

7+
## [0.4.0] - Unreleased
8+
9+
### Added
10+
- `ReDoc UI` and default URL (`host:port/redoc`)
11+
712
## [0.3.1] - 2025-03-15
813

914
### Fixed

examples/falcon/run.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
app=app,
1111
title="MyFalconApp",
1212
version="0.0.1",
13-
docs_url="/docs/",
13+
docs_url="/docs",
14+
redoc_url="/redoc",
1415
openapi_version="3.0.0",
1516
)
1617
router.include_router(api_router, prefix="/api")

examples/falcon_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from fastopenapi.routers import FalconRouter
66

77
app = falcon.asgi.App()
8-
router = FalconRouter(app=app, docs_url="/docs/", openapi_version="3.0.0")
8+
router = FalconRouter(app=app, docs_url="/docs", openapi_version="3.0.0")
99

1010

1111
class HelloResponse(BaseModel):

examples/flask/run.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
app=app,
1010
title="MyFlaskApp",
1111
version="0.0.1",
12-
docs_url="/docs/",
12+
docs_url="/docs",
13+
redoc_url="/redoc",
1314
openapi_version="3.0.0",
1415
)
1516
router.include_router(api_router, prefix="/api")

examples/flask_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from fastopenapi.routers import FlaskRouter
55

66
app = Flask(__name__)
7-
router = FlaskRouter(app=app, docs_url="/docs/", openapi_version="3.0.0")
7+
router = FlaskRouter(app=app, docs_url="/docs", openapi_version="3.0.0")
88

99

1010
class HelloResponse(BaseModel):

examples/quart/run.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
app=app,
1010
title="MyQuartApp",
1111
version="0.0.1",
12-
docs_url="/docs/",
12+
docs_url="/docs",
13+
redoc_url="/redoc",
1314
openapi_version="3.0.0",
1415
)
1516
router.include_router(api_router, prefix="/api")

examples/quart_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from fastopenapi.routers import QuartRouter
55

66
app = Quart(__name__)
7-
router = QuartRouter(app=app, docs_url="/docs/", openapi_version="3.0.0")
7+
router = QuartRouter(app=app, docs_url="/docs", openapi_version="3.0.0")
88

99

1010
class HelloResponse(BaseModel):

examples/sanic/run.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
app=app,
1111
title="MySanicApp",
1212
version="0.0.1",
13-
docs_url="/docs/",
13+
docs_url="/docs",
14+
redoc_url="/redoc",
1415
openapi_version="3.0.0",
1516
)
1617
router.include_router(api_router, prefix="/api")

examples/sanic_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from fastopenapi.routers import SanicRouter
55

66
app = Sanic("MySanicApp")
7-
router = SanicRouter(app=app, docs_url="/docs/", openapi_version="3.0.0")
7+
router = SanicRouter(app=app, docs_url="/docs", openapi_version="3.0.0")
88

99

1010
class HelloResponse(BaseModel):

examples/starlette/run.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
app=app,
1111
title="MyStarletteApp",
1212
version="0.0.1",
13-
docs_url="/docs/",
13+
docs_url="/docs",
14+
redoc_url="/redoc",
1415
openapi_version="3.0.0",
1516
)
1617
router.include_router(api_router, prefix="/api")

0 commit comments

Comments
 (0)