Skip to content

Commit

Permalink
Don't include provider routes in OpenAPI schema (#639)
Browse files Browse the repository at this point in the history
For all providers, this ensures that their routes are not included in
FastAPI's auto-generated OpenAPI schema.

Signed-off-by: Juan Antonio Osorio <[email protected]>
  • Loading branch information
JAORMX authored Jan 17, 2025
1 parent b68186c commit cd892f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/codegate/providers/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def add_provider(self, name: str, provider: BaseProvider):
to the FastAPI app.
"""
self.providers[name] = provider
self.app.include_router(provider.get_routes())
self.app.include_router(provider.get_routes(), include_in_schema=False)

def get_provider(self, name: str) -> Optional[BaseProvider]:
"""
Expand Down

0 comments on commit cd892f3

Please sign in to comment.