gooddata-api-client 1.73.1.dev3__py3-none-any.whl → 1.73.1.dev4__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.
- gooddata_api_client/__init__.py +1 -1
- gooddata_api_client/api_client.py +1 -1
- gooddata_api_client/configuration.py +1 -1
- gooddata_api_client/model_utils.py +76 -7
- {gooddata_api_client-1.73.1.dev3.dist-info → gooddata_api_client-1.73.1.dev4.dist-info}/METADATA +2 -2
- {gooddata_api_client-1.73.1.dev3.dist-info → gooddata_api_client-1.73.1.dev4.dist-info}/RECORD +9 -9
- {gooddata_api_client-1.73.1.dev3.dist-info → gooddata_api_client-1.73.1.dev4.dist-info}/WHEEL +0 -0
- {gooddata_api_client-1.73.1.dev3.dist-info → gooddata_api_client-1.73.1.dev4.dist-info}/licenses/LICENSE.txt +0 -0
- {gooddata_api_client-1.73.1.dev3.dist-info → gooddata_api_client-1.73.1.dev4.dist-info}/top_level.txt +0 -0
gooddata_api_client/__init__.py
CHANGED
|
@@ -77,7 +77,7 @@ class ApiClient(object):
|
|
|
77
77
|
self.default_headers[header_name] = header_value
|
|
78
78
|
self.cookie = cookie
|
|
79
79
|
# Set default User-Agent.
|
|
80
|
-
self.user_agent = 'OpenAPI-Generator/1.73.1.
|
|
80
|
+
self.user_agent = 'OpenAPI-Generator/1.73.1.dev4/python'
|
|
81
81
|
|
|
82
82
|
def __enter__(self):
|
|
83
83
|
return self
|
|
@@ -381,7 +381,7 @@ class Configuration(object):
|
|
|
381
381
|
"OS: {env}\n"\
|
|
382
382
|
"Python Version: {pyversion}\n"\
|
|
383
383
|
"Version of the API: v0\n"\
|
|
384
|
-
"SDK Package Version: 1.73.1.
|
|
384
|
+
"SDK Package Version: 1.73.1.dev4".\
|
|
385
385
|
format(env=sys.platform, pyversion=sys.version)
|
|
386
386
|
|
|
387
387
|
def get_host_settings(self):
|
|
@@ -120,6 +120,59 @@ def composed_model_input_classes(cls):
|
|
|
120
120
|
return []
|
|
121
121
|
|
|
122
122
|
|
|
123
|
+
def composed_oneof_members(cls):
|
|
124
|
+
"""The oneOf/anyOf member classes of a composed model, () for other models."""
|
|
125
|
+
composed = getattr(cls, '_composed_schemas', None)
|
|
126
|
+
if not composed:
|
|
127
|
+
return ()
|
|
128
|
+
return tuple(composed.get('oneOf') or ()) + tuple(composed.get('anyOf') or ())
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
def composed_union_types(cls, name):
|
|
132
|
+
"""Union of the types the oneOf/anyOf members declare for property `name`.
|
|
133
|
+
|
|
134
|
+
openapi-generator flattens the oneOf members' properties into the composed
|
|
135
|
+
parent, but for a property that several members declare it keeps only the
|
|
136
|
+
last member's type. The parent then rejects payloads that are valid for
|
|
137
|
+
every other member - e.g. an LLM provider config whose `auth` is typed as
|
|
138
|
+
`OpenAiProviderAuth` alone cannot carry Bedrock or Azure Foundry auth.
|
|
139
|
+
|
|
140
|
+
Widening to the union loses no validation: the value is still checked
|
|
141
|
+
against the composed schemas themselves by validate_get_composed_info.
|
|
142
|
+
|
|
143
|
+
Returns () when no member declares `name`, so the caller keeps the
|
|
144
|
+
parent's own type.
|
|
145
|
+
|
|
146
|
+
A member is not necessarily a model: `oneOf: [$ref, {type: string}]` emits
|
|
147
|
+
`'oneOf': [Thing, str]`, and a primitive has no `openapi_types`, hence the
|
|
148
|
+
getattr fallback rather than a direct attribute read.
|
|
149
|
+
"""
|
|
150
|
+
types = []
|
|
151
|
+
for member in composed_oneof_members(cls):
|
|
152
|
+
for member_type in getattr(member, 'openapi_types', {}).get(name, ()):
|
|
153
|
+
if member_type not in types:
|
|
154
|
+
types.append(member_type)
|
|
155
|
+
return tuple(types)
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
def composed_union_allowed_values(cls, name):
|
|
159
|
+
"""Union of the enum values the oneOf/anyOf members allow for `name`.
|
|
160
|
+
|
|
161
|
+
Same generator defect as composed_union_types: the flattened parent keeps
|
|
162
|
+
only the last member's enum, so a discriminator-like `type` property ends
|
|
163
|
+
up accepting exactly one of the variants and which one depends on the order
|
|
164
|
+
of the oneOf array in the OpenAPI document.
|
|
165
|
+
|
|
166
|
+
Returns {} when no member constrains `name`, so the caller falls back to
|
|
167
|
+
the parent's own allowed_values. Tolerates non-model members for the same
|
|
168
|
+
reason as composed_union_types.
|
|
169
|
+
"""
|
|
170
|
+
merged = {}
|
|
171
|
+
for member in composed_oneof_members(cls):
|
|
172
|
+
merged.update(getattr(member, 'allowed_values', {}).get((name,), {}))
|
|
173
|
+
return merged
|
|
174
|
+
|
|
175
|
+
|
|
123
176
|
class OpenApiModel(object):
|
|
124
177
|
"""The base class for all OpenAPIModels"""
|
|
125
178
|
|
|
@@ -132,7 +185,13 @@ class OpenApiModel(object):
|
|
|
132
185
|
path_to_item.append(name)
|
|
133
186
|
|
|
134
187
|
if name in self.openapi_types:
|
|
135
|
-
|
|
188
|
+
# Widened from upstream: for a composed (oneOf/anyOf) model the
|
|
189
|
+
# generator flattens the members' properties into the parent but
|
|
190
|
+
# keeps only the last member's type, so the parent alone rejects
|
|
191
|
+
# payloads valid for every other member. See composed_union_types.
|
|
192
|
+
required_types_mixed = (
|
|
193
|
+
composed_union_types(type(self), name) or self.openapi_types[name]
|
|
194
|
+
)
|
|
136
195
|
elif self.additional_properties_type is None:
|
|
137
196
|
raise ApiAttributeError(
|
|
138
197
|
"{0} has no attribute '{1}'".format(
|
|
@@ -160,9 +219,15 @@ class OpenApiModel(object):
|
|
|
160
219
|
value = validate_and_convert_types(
|
|
161
220
|
value, required_types_mixed, path_to_item, self._spec_property_naming,
|
|
162
221
|
self._check_type, configuration=self._configuration)
|
|
163
|
-
|
|
222
|
+
# Widened from upstream for the same reason as required_types_mixed
|
|
223
|
+
# above: the flattened parent keeps only the last member's enum.
|
|
224
|
+
allowed_values = (
|
|
225
|
+
composed_union_allowed_values(type(self), name)
|
|
226
|
+
or self.allowed_values.get((name,))
|
|
227
|
+
)
|
|
228
|
+
if allowed_values:
|
|
164
229
|
check_allowed_values(
|
|
165
|
-
|
|
230
|
+
{(name,): allowed_values},
|
|
166
231
|
(name,),
|
|
167
232
|
value
|
|
168
233
|
)
|
|
@@ -1469,6 +1534,7 @@ def attempt_convert_item(input_value, valid_classes, path_to_item,
|
|
|
1469
1534
|
if configuration is None or not configuration.discard_unknown_keys:
|
|
1470
1535
|
raise get_type_error(input_value, path_to_item, valid_classes,
|
|
1471
1536
|
key_type=key_type)
|
|
1537
|
+
last_conversion_exc = None
|
|
1472
1538
|
for valid_class in valid_classes_coercible:
|
|
1473
1539
|
try:
|
|
1474
1540
|
if issubclass(valid_class, OpenApiModel):
|
|
@@ -1480,11 +1546,14 @@ def attempt_convert_item(input_value, valid_classes, path_to_item,
|
|
|
1480
1546
|
return deserialize_primitive(input_value, valid_class,
|
|
1481
1547
|
path_to_item)
|
|
1482
1548
|
except (ApiTypeError, ApiValueError, ApiKeyError) as conversion_exc:
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
#
|
|
1486
|
-
#
|
|
1549
|
+
# Upstream re-raises immediately when must_convert is True, which
|
|
1550
|
+
# gives a property whose type came from a oneOf/anyOf union only
|
|
1551
|
+
# one attempt: the first candidate class. Try them all and report
|
|
1552
|
+
# the last failure only if none matched.
|
|
1553
|
+
last_conversion_exc = conversion_exc
|
|
1487
1554
|
continue
|
|
1555
|
+
if must_convert and last_conversion_exc is not None:
|
|
1556
|
+
raise last_conversion_exc
|
|
1488
1557
|
# we were unable to convert, must_convert == False
|
|
1489
1558
|
return input_value
|
|
1490
1559
|
|
{gooddata_api_client-1.73.1.dev3.dist-info → gooddata_api_client-1.73.1.dev4.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gooddata-api-client
|
|
3
|
-
Version: 1.73.1.
|
|
3
|
+
Version: 1.73.1.dev4
|
|
4
4
|
Summary: OpenAPI definition
|
|
5
5
|
Home-page:
|
|
6
6
|
Author: GoodData (generated by OpenAPI Generator)
|
|
@@ -29,7 +29,7 @@ No description provided (generated by Openapi Generator https://github.com/opena
|
|
|
29
29
|
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
30
30
|
|
|
31
31
|
- API version: v0
|
|
32
|
-
- Package version: 1.73.1.
|
|
32
|
+
- Package version: 1.73.1.dev4
|
|
33
33
|
- Build package: org.openapitools.codegen.languages.PythonPriorClientCodegen
|
|
34
34
|
|
|
35
35
|
## Requirements.
|
{gooddata_api_client-1.73.1.dev3.dist-info → gooddata_api_client-1.73.1.dev4.dist-info}/RECORD
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
gooddata_api_client/__init__.py,sha256=
|
|
2
|
-
gooddata_api_client/api_client.py,sha256=
|
|
3
|
-
gooddata_api_client/configuration.py,sha256=
|
|
1
|
+
gooddata_api_client/__init__.py,sha256=1iijnTYIxYfGgR93dZALYX8QKVEKNVIbF86Xs9esi88,854
|
|
2
|
+
gooddata_api_client/api_client.py,sha256=2QW1MIBDhEdzDZYpRCwSFx6hSqWVzgwCQIP6ugjTe3w,39367
|
|
3
|
+
gooddata_api_client/configuration.py,sha256=Xz7XBgmUYEfSqtVuXu8DE_IZ6UfYurBjPQawJb2rqwQ,16423
|
|
4
4
|
gooddata_api_client/exceptions.py,sha256=J6doCDt25NmTb6YSHlJ4BsFkQHZWv2N1eX72ErUvDho,5140
|
|
5
|
-
gooddata_api_client/model_utils.py,sha256=
|
|
5
|
+
gooddata_api_client/model_utils.py,sha256=TEaHZzSB8wlIJAxgyxbLjbz8NOagPgpbNTfYo8auRgg,86801
|
|
6
6
|
gooddata_api_client/rest.py,sha256=WGOL6Ak_bbh8UloQDwCN0wa7vTruFTEqVDzRI2mGvaE,14346
|
|
7
7
|
gooddata_api_client/api/__init__.py,sha256=d4-I-rg3I5RVGk3F4nCuftIZi97CgDXTk8GjKYYbmhM,218
|
|
8
8
|
gooddata_api_client/api/actions_api.py,sha256=l4uiZEoN1e02V0vYUmVtOYNkWFkbHP8cTnh4JpCZ9oE,786902
|
|
@@ -1551,8 +1551,8 @@ gooddata_api_client/model/workspace_users.py,sha256=Y8uJJ2RrK2-vvRJY4b09TxiPEcqi
|
|
|
1551
1551
|
gooddata_api_client/model/workspace_widget_slides_template.py,sha256=RAr3KgKAIugvFnJAy7UdyF-VZD1cFgYmWJnHJk8VpLQ,12359
|
|
1552
1552
|
gooddata_api_client/model/xliff.py,sha256=FoJBFqeiPuQAdE5Yeo3C4UB_SG7AovmasoQ5Ycgq6U4,12688
|
|
1553
1553
|
gooddata_api_client/models/__init__.py,sha256=5flUmViyyQMoLP4QK9nNy6CcuN_5hyyVAyy4f2v8vJE,136823
|
|
1554
|
-
gooddata_api_client-1.73.1.
|
|
1555
|
-
gooddata_api_client-1.73.1.
|
|
1556
|
-
gooddata_api_client-1.73.1.
|
|
1557
|
-
gooddata_api_client-1.73.1.
|
|
1558
|
-
gooddata_api_client-1.73.1.
|
|
1554
|
+
gooddata_api_client-1.73.1.dev4.dist-info/licenses/LICENSE.txt,sha256=TXcX7q0JaEM02DrmcvaMqNvU912yBiaQGzCA5rZlp0U,20163
|
|
1555
|
+
gooddata_api_client-1.73.1.dev4.dist-info/METADATA,sha256=K4OADCr1CdaTeAZTgv9e0VZe6Ojxdd2yOBK19JfDgmI,375604
|
|
1556
|
+
gooddata_api_client-1.73.1.dev4.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
1557
|
+
gooddata_api_client-1.73.1.dev4.dist-info/top_level.txt,sha256=GaZfT4qEz5cKY0eA2Iub4vcr6soTMJolR7uIRDfgpcU,20
|
|
1558
|
+
gooddata_api_client-1.73.1.dev4.dist-info/RECORD,,
|
{gooddata_api_client-1.73.1.dev3.dist-info → gooddata_api_client-1.73.1.dev4.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|