Expose OpenAPI security scheme and improve docs - #106
Closed
kael-developer[bot] wants to merge 1 commit into
Closed
Conversation
Implemented by Kael AI Agent
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Problem
The FastAPI app generates an OpenAPI spec, but it lacks proper OAuth2/JWT security definitions, causing generated client SDKs to miss authentication requirements and confusing developers.
Solution
Configure FastAPI's OpenAPI metadata to include an OAuth2 password flow (or bearer token) security scheme, apply it globally to secured routes, and generate an updated Swagger UI with login capability.
Value
External developers can automatically discover authentication requirements, generate correct client code, and test APIs via Swagger UI, lowering integration friction and support tickets.
What changed
We need to modify protected routers with dependencies=[Depends(oauth2_scheme)]. In users router we have include in main. Already added include_router with dependencies, but we also need to add dependencies on router definition? The plan says "Decorate all protected routers (e.g.,
app/api/workflows.py) withdependencies=[Depends(oauth2_scheme)]." There's no workflows router. Possibly more Python routers exist. Let's list sdlc/api/routes.Closes #104
🤖 Implemented automatically by Kael AI Agent