Standardize API error responses and Swagger documentation across all endpoints#627
Merged
Standardize API error responses and Swagger documentation across all endpoints#627
Conversation
…ization - Introduced a new asset specification for materializing extensions data from PostgreSQL to LadybugDB. - Updated relevant imports and asset lists to include the new user_graph_extensions_materialized_source. - Enhanced the materialization logging to capture detailed metadata about the process, including tables materialized and duration.
…points - Introduced shared error response dictionaries for consistent Swagger documentation, including COMMON_ERROR_RESPONSES, AUTHENTICATED_ERROR_RESPONSES, RESOURCE_ERROR_RESPONSES, and OPERATION_ERROR_RESPONSES. - Updated various API endpoints to utilize these shared error responses, improving maintainability and clarity in error handling. - Refined endpoint descriptions for better understanding and streamlined responses for common error scenarios.
- Upgraded the robosystems-client dependency from version 0.3.7 to 0.3.8 in pyproject.toml and uv.lock. - Introduced a new `sdk-update` task in the justfile for upgrading the SDK and re-installing dependencies. - Added a corresponding task in the VSCode tasks configuration for easier SDK updates.
- Changed the asset key from "extensions_materialize" to "user_graph_extensions_materialized" in the ExtensionsMaterializeTask class to improve clarity and consistency in reporting.
- Simplified the logic in the StrategySelector class to always return JSON_COMPLETE for clients without streaming support, regardless of result size. - Removed outdated comments and unnecessary conditions related to NDJSON handling for large results, improving code clarity and maintainability.
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
Large-scale refactor to align API error response handling and OpenAPI/Swagger documentation across the entire router layer. This PR introduces standardized error response models, applies them consistently to ~50+ endpoint files, and includes minor supporting changes for SDK tooling and Dagster asset additions.
Key Accomplishments
Standardized Error Response Documentation
robosystems/models/api/common.pyto provide reusable, consistent error schemas (e.g., 400, 401, 403, 404, 409, 422, 500) for OpenAPI documentation.responsesdeclarations in their endpoint decorators.Router Modules Updated
Dagster Pipeline Addition
user_graph_extensions_materialized_sourceasset for extensions materialization in the Dagster data pipeline.SDK & Tooling
robosystems-clientdependency from previous version to0.3.8..vscode/tasks.jsonandjustfilefor streamlined developer workflow.Breaking Changes
Testing Notes
/docsor/openapi.json) reflects correct and consistent error response schemas across all endpoints.user_graph_extensions_materialized_sourcematerializes correctly in the pipeline.robosystems-clientv0.3.8 is compatible and SDK generation tooling works as expected.Infrastructure Considerations
uv.lock) has been updated — CI/CD pipelines should install fresh dependencies.🤖 Generated with Claude Code
Branch Info:
refactor/api-swagger-doc-alignmentmainCo-Authored-By: Claude noreply@anthropic.com