* draft: first pass at complete schema language generation and factory validator * actually a working validator and fixes to the schema that went uncaught * remove extra spike file * fix formatting file * pr feedback and a little bit of refactoring * fix some types that were erroneously marked as invalid schema * some comments * add jsonschemamixin to interfaces * update changelog * bump version
20 lines
448 B
Python
20 lines
448 B
Python
#
|
|
# Copyright (c) 2022 Airbyte, Inc., all rights reserved.
|
|
#
|
|
|
|
from abc import abstractmethod
|
|
from dataclasses import dataclass
|
|
from typing import Any, Mapping
|
|
|
|
from dataclasses_jsonschema import JsonSchemaMixin
|
|
|
|
|
|
@dataclass
|
|
class SchemaLoader(JsonSchemaMixin):
|
|
"""Describes a stream's schema"""
|
|
|
|
@abstractmethod
|
|
def get_json_schema(self) -> Mapping[str, Any]:
|
|
"""Returns a mapping describing the stream's schema"""
|
|
pass
|