<#3207 feat: Automatically handle OpenAPI 2.0 and ...
# meltano-repo-activity
g
#3207 feat: Automatically handle OpenAPI 2.0 and 3.0 specs Pull request opened by edgarrmondragon ## Summary • Automatically detects and handles both OpenAPI 2.0 and 3.0 specifications • Enhanced schema processing to support multiple OpenAPI versions • Updated test coverage for both specification formats ## Changes • Modified
singer_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/sdk