#3190 feat: Added an extensible API for stream schema sources
Pull request opened by
edgarrmondragon
Closes
#2746
## Summary by Sourcery
Introduce an extensible schema source API for dynamically loading JSON schemas from files or OpenAPI specs, integrate it into the SDK and existing taps, update documentation with usage samples, and add comprehensive tests for the new functionality.
New Features:
• Add abstract SchemaSource base class with concrete SchemaDirectory and OpenAPISchema implementations for dynamic schema loading
• Introduce StreamSchema descriptor for loading schemas into streams from any SchemaSource
• Expose SchemaSource, SchemaDirectory, OpenAPISchema, and StreamSchema in the SDK public API
Enhancements:
• Add discovery error types (DiscoveryError, SchemaNotFoundError, SchemaNotValidError) for schema loading failures
• Refactor tap-gitlab to use StreamSchema and SchemaDirectory instead of static schema_filepath
Documentation:
• Add code sample showing flexible schema loading from JSON directories and OpenAPI specs
Tests:
• Add tests covering SchemaSource, SchemaDirectory, OpenAPISchema, and StreamSchema descriptor behavior
• Extend schema conversion tests with simple object and array item scenarios
meltano/sdk