Skip to content

Commit 4dee63c

Browse files
committed
add some more stuff
1 parent 5568c1a commit 4dee63c

2 files changed

Lines changed: 25 additions & 1 deletion

File tree

pystapi-schema-generator/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ authors = [
77
{ name = "Tobias Rohnstock", email = "tobias.rohnstock@live-eo.com" },
88
{ name = "Justin Trautmann", email = "justin@live-eo.com" },
99
]
10-
requires-python = ">=3.10"
10+
requires-python = ">=3.11"
1111
dependencies = [
1212
"uvicorn>=0.34",
1313
"fastapi>=0.115",

pystapi-schema-generator/src/pystapi_schema_generator/application.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,30 @@ def create_app() -> FastAPI:
5353
docs_url="/docs",
5454
redoc_url="/redoc",
5555
openapi_url="/openapi.json",
56+
# Enhanced OpenAPI configuration
57+
openapi_extra={
58+
"info": {
59+
"contact": {
60+
"name": "STAPI Specification Organization",
61+
"url": "https://github.com/stapi-spec",
62+
}
63+
},
64+
"externalDocs": {
65+
"description": "STAPI Specification Documentation",
66+
"url": "https://github.com/stapi-spec/stapi-spec",
67+
},
68+
},
69+
# Swagger UI customization
70+
swagger_ui_parameters={
71+
"deepLinking": True,
72+
"docExpansion": "list", # list endpoints but details are collapsed
73+
"defaultModelsExpandDepth": 0, # Show schemas at the bottom but collapsed
74+
"supportedSubmitMethods": [], # Disable all submit methods to prevent "Try it out"
75+
},
76+
# ReDoc customization
77+
redoc_ui_parameters={
78+
# TODO: Add Redoc customization parameters here if needed
79+
},
5680
)
5781

5882
router = RootRouter()

0 commit comments

Comments
 (0)