Skip to content

Commit 8165e68

Browse files
refactor(specs): re-organise response for Composition API (generated)
algolia/api-clients-automation#5744 Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com> Co-authored-by: Clara Muller <5667350+ClaraMuller@users.noreply.github.com>
1 parent 8a087ec commit 8165e68

File tree

5 files changed

+16
-15
lines changed

5 files changed

+16
-15
lines changed

algoliasearch/composition/models/composition_run_applied_rules.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class CompositionRunAppliedRules(BaseModel):
3333
"""
3434

3535
object_id: str
36-
""" Unique record identifier. """
36+
""" The objectID of the applied composition rule on this query. """
3737

3838
model_config = ConfigDict(
3939
strict=False,

algoliasearch/composition/models/composition_run_search_response.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class CompositionRunSearchResponse(BaseModel):
3838
"""
3939

4040
object_id: str
41-
""" Unique record identifier. """
41+
""" The objectID of the composition which generated this result set. """
4242
applied_rules: Optional[List[CompositionRunAppliedRules]] = None
4343

4444
model_config = ConfigDict(

algoliasearch/composition/models/results_injected_item_applied_rules_info_response.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class ResultsInjectedItemAppliedRulesInfoResponse(BaseModel):
3333
"""
3434

3535
object_id: str
36-
""" Unique record identifier. """
36+
""" The objectID of the applied index level rule on this injected group. """
3737

3838
model_config = ConfigDict(
3939
strict=False,

algoliasearch/composition/models/results_injected_item_info_response.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ class ResultsInjectedItemInfoResponse(BaseModel):
3838
"""
3939

4040
key: str
41+
""" The key of the injected group. """
4142
applied_rules: Optional[List[ResultsInjectedItemAppliedRulesInfoResponse]] = None
4243

4344
model_config = ConfigDict(

algoliasearch/composition/models/search_results_item.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@
5555
"user_data": "userData",
5656
"query_id": "queryID",
5757
"automatic_insights": "_automaticInsights",
58-
"page": "page",
58+
"hits": "hits",
59+
"hits_per_page": "hitsPerPage",
5960
"nb_hits": "nbHits",
6061
"nb_pages": "nbPages",
61-
"hits_per_page": "hitsPerPage",
62-
"hits": "hits",
63-
"query": "query",
62+
"page": "page",
6463
"params": "params",
64+
"query": "query",
6565
"compositions": "compositions",
6666
}
6767

@@ -124,20 +124,20 @@ class SearchResultsItem(BaseModel):
124124
""" Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics). """
125125
automatic_insights: Optional[bool] = None
126126
""" Whether automatic events collection is enabled for the application. """
127-
page: int
128-
""" The current page of the results. """
127+
hits: List[Hit]
128+
""" Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting. """
129+
hits_per_page: int
130+
""" Number of hits returned per page. """
129131
nb_hits: int
130132
""" Number of results (hits). """
131133
nb_pages: int
132134
""" Number of pages of results. """
133-
hits_per_page: int
134-
""" Number of hits returned per page. """
135-
hits: List[Hit]
136-
""" Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting. """
137-
query: str
138-
""" The search query string. """
135+
page: int
136+
""" The current page of the results. """
139137
params: str
140138
""" URL-encoded string of all search parameters. """
139+
query: str
140+
""" The search query string. """
141141
compositions: Dict[str, ResultsCompositionInfoResponse]
142142

143143
@field_validator("around_lat_lng")

0 commit comments

Comments
 (0)