-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path__init__.py
61 lines (56 loc) · 2.08 KB
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
from injecty import InjectyContext
from marshy.marshaller.marshaller_abc import MarshallerABC
from schemey.factory.any_of_schema_factory import AnyOfSchemaFactory
from schemey.factory.array_schema_factory import ArraySchemaFactory
from schemey.factory.dataclass_schema_factory import DataclassSchemaFactory
from schemey.factory.datetime_factory import DatetimeFactory
from schemey.factory.enum_schema_factory import EnumSchemaFactory
from schemey.factory.external_type_factory import ExternalTypeFactory
from schemey.factory.factory_schema_factory import FactorySchemaFactory
from schemey.factory.impl_schema_factory import ImplSchemaFactory
from schemey.factory.ref_schema_factory import RefSchemaFactory
from schemey.factory.schema_factory_abc import SchemaFactoryABC
from schemey.factory.simple_type_factory import (
BoolTypeFactory,
IntTypeFactory,
NoneTypeFactory,
FloatFactory,
StrFactory,
)
from schemey.factory.tuple_schema_factory import TupleSchemaFactory
from schemey.factory.uuid_factory import UuidFactory
from schemey.json_schema.ranges_validator import RangesValidator
from schemey.json_schema.schema_validator_abc import SchemaValidatorABC
from schemey.json_schema.timestamp_validator import TimestampValidator
from schemey.schema_marshaller import SchemaMarshaller
priority = 100
def configure(context: InjectyContext):
context.register_impl(MarshallerABC, SchemaMarshaller)
context.register_impls(
SchemaFactoryABC,
[
RefSchemaFactory,
BoolTypeFactory,
IntTypeFactory,
NoneTypeFactory,
FloatFactory,
StrFactory,
DatetimeFactory,
UuidFactory,
ArraySchemaFactory,
TupleSchemaFactory,
ExternalTypeFactory,
DataclassSchemaFactory,
EnumSchemaFactory,
FactorySchemaFactory,
ImplSchemaFactory,
AnyOfSchemaFactory,
],
)
context.register_impls(
SchemaValidatorABC,
[
RangesValidator,
TimestampValidator,
],
)