Add explicit status_code to all API route decorators#9
Merged
Conversation
Per FASTAPI-RULES.md §6, every route must declare status_code explicitly so OpenAPI schema consumers get accurate status codes.
Contributor
Greptile SummaryThis PR makes the HTTP 200 response status code explicit on all three API route decorators in
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Client
participant FastAPI as FastAPI Router
participant Engine as Detection/Anonymization Engine
Client->>FastAPI: POST /api/detect
FastAPI->>Engine: detect_pii_in_text()
Engine-->>FastAPI: List[RecognizerResult]
FastAPI-->>Client: 200 DetectionResponse
Client->>FastAPI: POST /api/anonymize
FastAPI->>Engine: detect_pii_in_text() + anonymize_text()
Engine-->>FastAPI: anonymized string
FastAPI-->>Client: 200 AnonymizeResponse
Client->>FastAPI: GET /api/strategies
FastAPI-->>Client: 200 StrategiesResponse
Reviews (1): Last reviewed commit: "Add explicit status_code=200 to all API ..." | Re-trigger Greptile |
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.
Summary
status_code=200to/api/detect,/api/anonymize, and/api/strategiesroute decoratorsTest plan
make checkpasses (275 tests, 95.58% coverage)