Skip to content

Commit 13dcd44

Browse files
algolia-botmillotp
andcommitted
fix(specs): proper title with linter (generated)
algolia/api-clients-automation#3444 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Pierre Millot <[email protected]>
1 parent 4ffbdc3 commit 13dcd44

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+440
-205
lines changed

algoliasearch/abtesting/models/filter_effects_empty_search.py renamed to algoliasearch/abtesting/models/empty_search_filter.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from pydantic import BaseModel, ConfigDict, Field, StrictInt
1313

1414

15-
class FilterEffectsEmptySearch(BaseModel):
15+
class EmptySearchFilter(BaseModel):
1616
"""
1717
Empty searches removed from the A/B test as a result of configuration settings.
1818
"""
@@ -37,7 +37,7 @@ def to_json(self) -> str:
3737

3838
@classmethod
3939
def from_json(cls, json_str: str) -> Self:
40-
"""Create an instance of FilterEffectsEmptySearch from a JSON string"""
40+
"""Create an instance of EmptySearchFilter from a JSON string"""
4141
return cls.from_dict(loads(json_str))
4242

4343
def to_dict(self) -> Dict[str, Any]:
@@ -59,7 +59,7 @@ def to_dict(self) -> Dict[str, Any]:
5959

6060
@classmethod
6161
def from_dict(cls, obj: Dict) -> Self:
62-
"""Create an instance of FilterEffectsEmptySearch from a dict"""
62+
"""Create an instance of EmptySearchFilter from a dict"""
6363
if obj is None:
6464
return None
6565

algoliasearch/abtesting/models/filter_effects.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,17 @@
1111

1212
from pydantic import BaseModel, ConfigDict, Field
1313

14-
from algoliasearch.abtesting.models.filter_effects_empty_search import (
15-
FilterEffectsEmptySearch,
16-
)
17-
from algoliasearch.abtesting.models.filter_effects_outliers import FilterEffectsOutliers
14+
from algoliasearch.abtesting.models.empty_search_filter import EmptySearchFilter
15+
from algoliasearch.abtesting.models.outliers_filter import OutliersFilter
1816

1917

2018
class FilterEffects(BaseModel):
2119
"""
2220
A/B test filter effects resulting from configuration settings.
2321
"""
2422

25-
outliers: Optional[FilterEffectsOutliers] = None
26-
empty_search: Optional[FilterEffectsEmptySearch] = Field(
27-
default=None, alias="emptySearch"
28-
)
23+
outliers: Optional[OutliersFilter] = None
24+
empty_search: Optional[EmptySearchFilter] = Field(default=None, alias="emptySearch")
2925

3026
model_config = ConfigDict(
3127
use_enum_values=True, populate_by_name=True, validate_assignment=True
@@ -72,12 +68,12 @@ def from_dict(cls, obj: Dict) -> Self:
7268
_obj = cls.model_validate(
7369
{
7470
"outliers": (
75-
FilterEffectsOutliers.from_dict(obj.get("outliers"))
71+
OutliersFilter.from_dict(obj.get("outliers"))
7672
if obj.get("outliers") is not None
7773
else None
7874
),
7975
"emptySearch": (
80-
FilterEffectsEmptySearch.from_dict(obj.get("emptySearch"))
76+
EmptySearchFilter.from_dict(obj.get("emptySearch"))
8177
if obj.get("emptySearch") is not None
8278
else None
8379
),

algoliasearch/abtesting/models/filter_effects_outliers.py renamed to algoliasearch/abtesting/models/outliers_filter.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from pydantic import BaseModel, ConfigDict, Field, StrictInt
1313

1414

15-
class FilterEffectsOutliers(BaseModel):
15+
class OutliersFilter(BaseModel):
1616
"""
1717
Outliers removed from the A/B test as a result of configuration settings.
1818
"""
@@ -37,7 +37,7 @@ def to_json(self) -> str:
3737

3838
@classmethod
3939
def from_json(cls, json_str: str) -> Self:
40-
"""Create an instance of FilterEffectsOutliers from a JSON string"""
40+
"""Create an instance of OutliersFilter from a JSON string"""
4141
return cls.from_dict(loads(json_str))
4242

4343
def to_dict(self) -> Dict[str, Any]:
@@ -59,7 +59,7 @@ def to_dict(self) -> Dict[str, Any]:
5959

6060
@classmethod
6161
def from_dict(cls, obj: Dict) -> Self:
62-
"""Create an instance of FilterEffectsOutliers from a dict"""
62+
"""Create an instance of OutliersFilter from a dict"""
6363
if obj is None:
6464
return None
6565

algoliasearch/analytics/models/click_positions_inner.py renamed to algoliasearch/analytics/models/click_position.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from pydantic import BaseModel, ConfigDict, Field, StrictInt
1313

1414

15-
class ClickPositionsInner(BaseModel):
15+
class ClickPosition(BaseModel):
1616
"""
1717
Click position.
1818
"""
@@ -38,7 +38,7 @@ def to_json(self) -> str:
3838

3939
@classmethod
4040
def from_json(cls, json_str: str) -> Self:
41-
"""Create an instance of ClickPositionsInner from a JSON string"""
41+
"""Create an instance of ClickPosition from a JSON string"""
4242
return cls.from_dict(loads(json_str))
4343

4444
def to_dict(self) -> Dict[str, Any]:
@@ -60,7 +60,7 @@ def to_dict(self) -> Dict[str, Any]:
6060

6161
@classmethod
6262
def from_dict(cls, obj: Dict) -> Self:
63-
"""Create an instance of ClickPositionsInner from a dict"""
63+
"""Create an instance of ClickPosition from a dict"""
6464
if obj is None:
6565
return None
6666

algoliasearch/analytics/models/get_click_positions_response.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@
1111

1212
from pydantic import BaseModel, ConfigDict, Field
1313

14-
from algoliasearch.analytics.models.click_positions_inner import ClickPositionsInner
14+
from algoliasearch.analytics.models.click_position import ClickPosition
1515

1616

1717
class GetClickPositionsResponse(BaseModel):
1818
"""
1919
GetClickPositionsResponse
2020
"""
2121

22-
positions: Annotated[
23-
List[ClickPositionsInner], Field(min_length=12, max_length=12)
24-
] = Field(
25-
description="List of positions in the search results and clicks associated with this search."
22+
positions: Annotated[List[ClickPosition], Field(min_length=12, max_length=12)] = (
23+
Field(
24+
description="List of positions in the search results and clicks associated with this search."
25+
)
2626
)
2727

2828
model_config = ConfigDict(
@@ -72,10 +72,7 @@ def from_dict(cls, obj: Dict) -> Self:
7272
_obj = cls.model_validate(
7373
{
7474
"positions": (
75-
[
76-
ClickPositionsInner.from_dict(_item)
77-
for _item in obj.get("positions")
78-
]
75+
[ClickPosition.from_dict(_item) for _item in obj.get("positions")]
7976
if obj.get("positions") is not None
8077
else None
8178
)

algoliasearch/analytics/models/top_search_with_analytics.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
1313

14-
from algoliasearch.analytics.models.click_positions_inner import ClickPositionsInner
14+
from algoliasearch.analytics.models.click_position import ClickPosition
1515

1616

1717
class TopSearchWithAnalytics(BaseModel):
@@ -40,7 +40,7 @@ class TopSearchWithAnalytics(BaseModel):
4040
alias="averageClickPosition",
4141
)
4242
click_positions: Annotated[
43-
List[ClickPositionsInner], Field(min_length=12, max_length=12)
43+
List[ClickPosition], Field(min_length=12, max_length=12)
4444
] = Field(
4545
description="List of positions in the search results and clicks associated with this search.",
4646
alias="clickPositions",
@@ -118,7 +118,7 @@ def from_dict(cls, obj: Dict) -> Self:
118118
"averageClickPosition": obj.get("averageClickPosition"),
119119
"clickPositions": (
120120
[
121-
ClickPositionsInner.from_dict(_item)
121+
ClickPosition.from_dict(_item)
122122
for _item in obj.get("clickPositions")
123123
]
124124
if obj.get("clickPositions") is not None

algoliasearch/analytics/models/top_search_with_revenue_analytics.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
1313

14-
from algoliasearch.analytics.models.click_positions_inner import ClickPositionsInner
14+
from algoliasearch.analytics.models.click_position import ClickPosition
1515
from algoliasearch.analytics.models.currencies_value import CurrenciesValue
1616

1717

@@ -41,7 +41,7 @@ class TopSearchWithRevenueAnalytics(BaseModel):
4141
alias="averageClickPosition",
4242
)
4343
click_positions: Annotated[
44-
List[ClickPositionsInner], Field(min_length=12, max_length=12)
44+
List[ClickPosition], Field(min_length=12, max_length=12)
4545
] = Field(
4646
description="List of positions in the search results and clicks associated with this search.",
4747
alias="clickPositions",
@@ -153,7 +153,7 @@ def from_dict(cls, obj: Dict) -> Self:
153153
"averageClickPosition": obj.get("averageClickPosition"),
154154
"clickPositions": (
155155
[
156-
ClickPositionsInner.from_dict(_item)
156+
ClickPosition.from_dict(_item)
157157
for _item in obj.get("clickPositions")
158158
]
159159
if obj.get("clickPositions") is not None

algoliasearch/ingestion/models/docker_streams_input.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
class DockerStreamsInput(BaseModel):
1616
"""
17-
DockerStreamsInput
17+
The selected streams of a singer or airbyte connector.
1818
"""
1919

2020
streams: Dict[str, Any]

algoliasearch/ingestion/models/transformation_try_response_error.py renamed to algoliasearch/ingestion/models/transformation_error.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
1313

1414

15-
class TransformationTryResponseError(BaseModel):
15+
class TransformationError(BaseModel):
1616
"""
1717
The error if the transformation failed.
1818
"""
@@ -33,7 +33,7 @@ def to_json(self) -> str:
3333

3434
@classmethod
3535
def from_json(cls, json_str: str) -> Self:
36-
"""Create an instance of TransformationTryResponseError from a JSON string"""
36+
"""Create an instance of TransformationError from a JSON string"""
3737
return cls.from_dict(loads(json_str))
3838

3939
def to_dict(self) -> Dict[str, Any]:
@@ -55,7 +55,7 @@ def to_dict(self) -> Dict[str, Any]:
5555

5656
@classmethod
5757
def from_dict(cls, obj: Dict) -> Self:
58-
"""Create an instance of TransformationTryResponseError from a dict"""
58+
"""Create an instance of TransformationError from a dict"""
5959
if obj is None:
6060
return None
6161

algoliasearch/ingestion/models/transformation_try_response.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@
1111

1212
from pydantic import BaseModel, ConfigDict, Field
1313

14-
from algoliasearch.ingestion.models.transformation_try_response_error import (
15-
TransformationTryResponseError,
16-
)
14+
from algoliasearch.ingestion.models.transformation_error import TransformationError
1715

1816

1917
class TransformationTryResponse(BaseModel):
@@ -24,7 +22,7 @@ class TransformationTryResponse(BaseModel):
2422
payloads: List[Dict[str, Any]] = Field(
2523
description="The array of records returned by the transformation service."
2624
)
27-
error: Optional[TransformationTryResponseError] = None
25+
error: Optional[TransformationError] = None
2826

2927
model_config = ConfigDict(
3028
use_enum_values=True, populate_by_name=True, validate_assignment=True
@@ -70,7 +68,7 @@ def from_dict(cls, obj: Dict) -> Self:
7068
{
7169
"payloads": obj.get("payloads"),
7270
"error": (
73-
TransformationTryResponseError.from_dict(obj.get("error"))
71+
TransformationError.from_dict(obj.get("error"))
7472
if obj.get("error") is not None
7573
else None
7674
),

algoliasearch/monitoring/models/get_servers403_response.py renamed to algoliasearch/monitoring/models/bad_request.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
from pydantic import BaseModel, ConfigDict, StrictStr
1313

1414

15-
class GetServers403Response(BaseModel):
15+
class BadRequest(BaseModel):
1616
"""
17-
GetServers403Response
17+
BadRequest
1818
"""
1919

2020
reason: Optional[StrictStr] = None
@@ -28,7 +28,7 @@ def to_json(self) -> str:
2828

2929
@classmethod
3030
def from_json(cls, json_str: str) -> Self:
31-
"""Create an instance of GetServers403Response from a JSON string"""
31+
"""Create an instance of BadRequest from a JSON string"""
3232
return cls.from_dict(loads(json_str))
3333

3434
def to_dict(self) -> Dict[str, Any]:
@@ -50,7 +50,7 @@ def to_dict(self) -> Dict[str, Any]:
5050

5151
@classmethod
5252
def from_dict(cls, obj: Dict) -> Self:
53-
"""Create an instance of GetServers403Response from a dict"""
53+
"""Create an instance of BadRequest from a dict"""
5454
if obj is None:
5555
return None
5656

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# coding: utf-8
2+
3+
"""
4+
Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
5+
"""
6+
7+
from __future__ import annotations
8+
9+
from json import loads
10+
from typing import Any, Dict, Optional, Self
11+
12+
from pydantic import BaseModel, ConfigDict, StrictStr
13+
14+
15+
class Forbidden(BaseModel):
16+
"""
17+
Forbidden
18+
"""
19+
20+
reason: Optional[StrictStr] = None
21+
22+
model_config = ConfigDict(
23+
use_enum_values=True, populate_by_name=True, validate_assignment=True
24+
)
25+
26+
def to_json(self) -> str:
27+
return self.model_dump_json(by_alias=True, exclude_unset=True)
28+
29+
@classmethod
30+
def from_json(cls, json_str: str) -> Self:
31+
"""Create an instance of Forbidden from a JSON string"""
32+
return cls.from_dict(loads(json_str))
33+
34+
def to_dict(self) -> Dict[str, Any]:
35+
"""Return the dictionary representation of the model using alias.
36+
37+
This has the following differences from calling pydantic's
38+
`self.model_dump(by_alias=True)`:
39+
40+
* `None` is only added to the output dict for nullable fields that
41+
were set at model initialization. Other fields with value `None`
42+
are ignored.
43+
"""
44+
_dict = self.model_dump(
45+
by_alias=True,
46+
exclude={},
47+
exclude_none=True,
48+
)
49+
return _dict
50+
51+
@classmethod
52+
def from_dict(cls, obj: Dict) -> Self:
53+
"""Create an instance of Forbidden from a dict"""
54+
if obj is None:
55+
return None
56+
57+
if not isinstance(obj, dict):
58+
return cls.model_validate(obj)
59+
60+
_obj = cls.model_validate({"reason": obj.get("reason")})
61+
return _obj

algoliasearch/monitoring/models/incidents_inner.py renamed to algoliasearch/monitoring/models/incident_entry.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
from algoliasearch.monitoring.models.incident import Incident
1515

1616

17-
class IncidentsInner(BaseModel):
17+
class IncidentEntry(BaseModel):
1818
"""
19-
IncidentsInner
19+
IncidentEntry
2020
"""
2121

2222
t: Optional[StrictInt] = Field(
@@ -34,7 +34,7 @@ def to_json(self) -> str:
3434

3535
@classmethod
3636
def from_json(cls, json_str: str) -> Self:
37-
"""Create an instance of IncidentsInner from a JSON string"""
37+
"""Create an instance of IncidentEntry from a JSON string"""
3838
return cls.from_dict(loads(json_str))
3939

4040
def to_dict(self) -> Dict[str, Any]:
@@ -58,7 +58,7 @@ def to_dict(self) -> Dict[str, Any]:
5858

5959
@classmethod
6060
def from_dict(cls, obj: Dict) -> Self:
61-
"""Create an instance of IncidentsInner from a dict"""
61+
"""Create an instance of IncidentEntry from a dict"""
6262
if obj is None:
6363
return None
6464

0 commit comments

Comments
 (0)