GitHub
08/01/2025, 2:31 AMsinger_sdk/schema/source.py to add automatic OpenAPI version detection and handling
• Added comprehensive test cases in tests/core/schema/test_source.py for both OpenAPI 2.0 and 3.0 formats
• Improved error handling and validation for different OpenAPI spec versions
## Test plan
• Existing tests pass
• New tests added for OpenAPI 2.0 and 3.0 handling
• Manual testing with sample OpenAPI specs of both versions
🤖 Generated with Claude Code
## Summary by Sourcery
Enable seamless support for both OpenAPI 2.0 and 3.x specifications by detecting spec versions, refactoring schema resolution logic, improving error handling, and extending test coverage accordingly.
New Features:
• Add automatic detection and handling for OpenAPI 2.0 and 3.x specifications in OpenAPISchema
Enhancements:
• Introduce UnsupportedOpenAPISpec exception and spec_version property to improve version validation
• Refactor get_unresolved_schema, resolve_schema and fetch_schema methods to unify OpenAPI v2/v3 schema resolution
Build:
• Add toolz dependency for schema utilities
Tests:
• Parameterize tests to cover both OpenAPI 2.0 and 3.0 formats and add fixtures for shared schemas
• Add tests for unsupported spec errors and custom key-based schema retrieval
meltano/sdkGitHub
08/01/2025, 11:58 PM