fastapi icon indicating copy to clipboard operation
fastapi copied to clipboard

🔨 Make it easy to change docs asset urls

Open waketzheng opened this issue 9 months ago • 0 comments

Support change docs CDN urls by this way:

from fastapi import FastAPI
from fastapi.openapi.docs import AssetUrls

AssetUrls.swagger_js = 'https://unpkg.com/[email protected]/swagger-ui-bundle.js'
AssetUrls.swagger_css = 'https://unpkg.com/[email protected]/swagger-ui.css'
AssetUrls.redoc_js = 'https://unpkg.com/redoc@next/bundles/redoc.standalone.js'

app = FastAPI()

waketzheng avatar May 13 '24 09:05 waketzheng