We've seen a pattern where an OpenAPIController
subclass would be registered directly onto the application, and (prior to 2.8) implicitly via the OpenAPIConfig
object, e.g.,:
class MyOpenAPIController(OpenAPIController):
path = "/schema"
router = Router(path=f"/{URL_PATH_PREFIX}", route_handlers=[MyOpenAPIController])
app = Litestar(
[router],
openapi_config=OpenAPIConfig("api", version="0.9.0"),
)
This pattern supports serving the openapi schema routes both under /schema
and /some-prefix/schema
.
We need to consider how this pattern would be implemented in v3 when the OpenAPIController object doesn't exist.
ref: #3337
OpenAPIConfig(path=["/schema", "/some-prefix/schema"], ...)
No response
No response
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too