Skip to content

Commit 37a2412

Browse files
feat(specs): add renderingContent query parameter in Composition API main injection (generated)
algolia/api-clients-automation#5549 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Clara Muller <[email protected]>
1 parent b98f307 commit 37a2412

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

algoliasearch/composition/models/main_injection_query_parameters.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
from algoliasearch.composition.models.remove_words_if_no_results import (
3737
RemoveWordsIfNoResults,
3838
)
39+
from algoliasearch.composition.models.rendering_content import RenderingContent
3940
from algoliasearch.composition.models.supported_language import SupportedLanguage
4041
from algoliasearch.composition.models.typo_tolerance import TypoTolerance
4142

@@ -91,6 +92,7 @@
9192
"facets": "facets",
9293
"hits_per_page": "hitsPerPage",
9394
"max_values_per_facet": "maxValuesPerFacet",
95+
"rendering_content": "renderingContent",
9496
"sort_facet_values_by": "sortFacetValuesBy",
9597
"sum_or_filters_scores": "sumOrFiltersScores",
9698
}
@@ -196,6 +198,7 @@ class MainInjectionQueryParameters(BaseModel):
196198
""" Number of hits per page. """
197199
max_values_per_facet: Optional[int] = None
198200
""" Maximum number of facet values to return for each facet. """
201+
rendering_content: Optional[RenderingContent] = None
199202
sort_facet_values_by: Optional[str] = None
200203
""" Order in which to retrieve facet values - `count`. Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value - `alpha`. Retrieve facet values alphabetically This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js). """
201204
sum_or_filters_scores: Optional[bool] = None
@@ -283,5 +286,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
283286
if obj.get("typoTolerance") is not None
284287
else None
285288
)
289+
obj["renderingContent"] = (
290+
RenderingContent.from_dict(obj["renderingContent"])
291+
if obj.get("renderingContent") is not None
292+
else None
293+
)
286294

287295
return cls.model_validate(obj)

0 commit comments

Comments
 (0)