amsdal_utils 0.5.0__py3-none-any.whl → 0.5.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
amsdal_utils/__about__.py CHANGED
@@ -1,4 +1,4 @@
1
1
  # SPDX-FileCopyrightText: 2023-present
2
2
  #
3
3
  # SPDX-License-Identifier: AMSDAL End User License Agreement
4
- __version__ = '0.5.0'
4
+ __version__ = '0.5.1'
@@ -39,9 +39,8 @@ class PropertyData(TypeData, extra='allow'):
39
39
  is_deleted: bool = False
40
40
  discriminator: str | None = None
41
41
 
42
- @model_validator(mode='before')
43
42
  @classmethod
44
- def format_openapi_parameters(cls, data: dict[str, Any], info: ValidationInfo) -> dict[str, Any]:
43
+ def _format_openapi_parameters(cls, data: dict[str, Any], info: ValidationInfo) -> dict[str, Any]:
45
44
  if '$ref' in data:
46
45
  if not info.context:
47
46
  msg = 'Context is required to resolve $ref'
@@ -58,11 +57,9 @@ class PropertyData(TypeData, extra='allow'):
58
57
  if 'anyOf' in _add_props:
59
58
  _add_props = process_any_of(_add_props, info)
60
59
 
61
- _type = _add_props.get('type', 'object')
62
-
63
60
  items = DictSchema(
64
61
  key=TypeData(type='string'),
65
- value=TypeData(type=CLASS_OPENAPI_PARAMETERS_MAPPER.get(_type, _type)),
62
+ value=TypeData(**cls._format_openapi_parameters(_add_props, info)),
66
63
  )
67
64
 
68
65
  if 'items' not in data:
@@ -73,6 +70,11 @@ class PropertyData(TypeData, extra='allow'):
73
70
 
74
71
  return {CLASS_OPENAPI_PARAMETERS_MAPPER.get(k, k): v for k, v in data.items()}
75
72
 
73
+ @model_validator(mode='before')
74
+ @classmethod
75
+ def format_openapi_parameters(cls, data: dict[str, Any], info: ValidationInfo) -> dict[str, Any]:
76
+ return cls._format_openapi_parameters(data, info)
77
+
76
78
  @model_validator(mode='after')
77
79
  def validate_options(self) -> 'PropertyData':
78
80
  if isinstance(getattr(self, 'enum', None), list) and not self.options:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: amsdal_utils
3
- Version: 0.5.0
3
+ Version: 0.5.1
4
4
  Summary: Utils for AMSDAL data framework
5
5
  Project-URL: Documentation, https://pypi.org/project/amsdal_utils/#readme
6
6
  Project-URL: Issues, https://pypi.org/project/amsdal_utils/#issues
@@ -1,5 +1,5 @@
1
1
  amsdal_utils/Third-Party Materials - AMSDAL Dependencies - License Notices.md,sha256=blZRsT9Qg4u4LzZuxlWQOzlWGpLAg7DugWS6nz7s_yw,62595
2
- amsdal_utils/__about__.py,sha256=TbPNaTH0RD4R7lbHg7ldzYno1o55MHD6GiUpoGifv0c,124
2
+ amsdal_utils/__about__.py,sha256=8T_uBHVYswzzhu1l92_ZGiaOtk_9NzrS_TQ0P-bqbf8,124
3
3
  amsdal_utils/__init__.py,sha256=EQCJ5OevmkkIpIULumPNIbWk3UI7afDfRzIsZN5mfwg,73
4
4
  amsdal_utils/errors.py,sha256=P90oGdKczHZzHukWnzJfbsSxMC-Sc8dUXvHzP7b1IIA,129
5
5
  amsdal_utils/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -49,7 +49,7 @@ amsdal_utils/query/data_models/paginator.py,sha256=oDEWEdyrEBBkHXyrS4K2mglYVw8An
49
49
  amsdal_utils/query/data_models/query_specifier.py,sha256=7rEVChU2XPy-3ooaTgfSZGKIOyIIKn8245MMuWrv3Mk,469
50
50
  amsdal_utils/schemas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
51
51
  amsdal_utils/schemas/interfaces.py,sha256=XJGw45IE7E1HjYArdz2LELOcx15PeTw4L1V34atKm6Y,773
52
- amsdal_utils/schemas/schema.py,sha256=xuepN8NEYFCk7hjuQbx1M6I0DFtWXpXMbx9ffkzmnMw,6372
52
+ amsdal_utils/schemas/schema.py,sha256=kVstZBTJyeR_P7DJZ3Dblv1whj_2BtWg4CLXGkYQ5Js,6493
53
53
  amsdal_utils/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
54
54
  amsdal_utils/utils/classes.py,sha256=GeJIt-jxOHgMnlEHMmzNk9vwxv4_V5dLP-Fv89hN5hc,354
55
55
  amsdal_utils/utils/decorators.py,sha256=RCWbbQJ2hY2s-uAI0C5M0X8gTXqUbL1Gx9NxACYBMOA,992
@@ -57,7 +57,7 @@ amsdal_utils/utils/identifier.py,sha256=oP3CHd2i8EBHMVUC8DWLr9pFZBt1IdH7Falaa3M2
57
57
  amsdal_utils/utils/lazy_object.py,sha256=eIVHBDNCSHKQopzYjviPCuh0svbRJQOCZ8KzqFLiS-s,2115
58
58
  amsdal_utils/utils/singleton.py,sha256=DbgQVJdeftO8sGVm2ti4zf4KDaDd2ogclO3B6gxfqag,744
59
59
  amsdal_utils/utils/text.py,sha256=4L5aICJGbmFZwNUhMrACb5thqmcIaWb3aVD24lW24a0,1962
60
- amsdal_utils-0.5.0.dist-info/METADATA,sha256=h-tD6DxXgWM9sOVzF2Yv8XJO6qzAkzHQjMOyhPtrbE8,57431
61
- amsdal_utils-0.5.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
62
- amsdal_utils-0.5.0.dist-info/licenses/LICENSE.txt,sha256=hG-541PFYfNJi9WRZi_hno91UyqNg7YLK8LR3vLblZA,27355
63
- amsdal_utils-0.5.0.dist-info/RECORD,,
60
+ amsdal_utils-0.5.1.dist-info/METADATA,sha256=ngtpWnIxQ-x8j08FQ4t1sQQjNH_e4KyumFGwqFZWxzs,57431
61
+ amsdal_utils-0.5.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
62
+ amsdal_utils-0.5.1.dist-info/licenses/LICENSE.txt,sha256=hG-541PFYfNJi9WRZi_hno91UyqNg7YLK8LR3vLblZA,27355
63
+ amsdal_utils-0.5.1.dist-info/RECORD,,