adriangb / xpresso

A composable Python ASGI web framework
https://xpresso-api.dev/
MIT License
178 stars 4 forks source link

refactor: clean up OpenAPI parameters / generation in App #31

Closed adriangb closed 2 years ago

adriangb commented 2 years ago

It would be nice to create more structure for OpenAPI parameters (servers, openapi_url, version, etc.) instead of dumping them into App's namespace.

It might also make sense to rework the extension points for users to make it clearer where they hook in (App.generate_openapi, App.openapi, etc.)

This might go hand in hand with #24 since some of the current complexity comes from gathering and initializing security models when we generate the OpenAPI docs.

adriangb commented 2 years ago

These are at least now hidden, and the changes to security models cleaned up things a bit in App. Given that it's all implementation details now, I'm going to close this and leave things as is until we have bugs / features in this area that actually require changes.