Skip to content

Commit 0cdc7f7

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 14e4e44 commit 0cdc7f7

File tree

5 files changed

+26
-24
lines changed

5 files changed

+26
-24
lines changed

client/src/commonMain/kotlin/com/algolia/client/model/composition/CompositionRunAppliedRules.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ import kotlinx.serialization.json.*
1010
/**
1111
* CompositionRunAppliedRules
1212
*
13-
* @param objectID Unique record identifier.
13+
* @param objectID The objectID of the applied composition rule on this query.
1414
*/
1515
@Serializable
1616
public data class CompositionRunAppliedRules(
1717

18-
/** Unique record identifier. */
18+
/** The objectID of the applied composition rule on this query. */
1919
@SerialName(value = "objectID") val objectID: String
2020
) {}

client/src/commonMain/kotlin/com/algolia/client/model/composition/CompositionRunSearchResponse.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ import kotlinx.serialization.json.*
1313
/**
1414
* CompositionRunSearchResponse
1515
*
16-
* @param objectID Unique record identifier.
16+
* @param objectID The objectID of the composition which generated this result set.
1717
* @param appliedRules
1818
*/
1919
@Serializable(CompositionRunSearchResponseSerializer::class)
2020
public data class CompositionRunSearchResponse(
2121

22-
/** Unique record identifier. */
22+
/** The objectID of the composition which generated this result set. */
2323
val objectID: String,
2424
val appliedRules: List<CompositionRunAppliedRules>? = null,
2525
val additionalProperties: Map<String, JsonElement>? = null,

client/src/commonMain/kotlin/com/algolia/client/model/composition/ResultsInjectedItemAppliedRulesInfoResponse.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ import kotlinx.serialization.json.*
1010
/**
1111
* ResultsInjectedItemAppliedRulesInfoResponse
1212
*
13-
* @param objectID Unique record identifier.
13+
* @param objectID The objectID of the applied index level rule on this injected group.
1414
*/
1515
@Serializable
1616
public data class ResultsInjectedItemAppliedRulesInfoResponse(
1717

18-
/** Unique record identifier. */
18+
/** The objectID of the applied index level rule on this injected group. */
1919
@SerialName(value = "objectID") val objectID: String
2020
) {}

client/src/commonMain/kotlin/com/algolia/client/model/composition/ResultsInjectedItemInfoResponse.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@ import kotlinx.serialization.json.*
1313
/**
1414
* ResultsInjectedItemInfoResponse
1515
*
16-
* @param key
16+
* @param key The key of the injected group.
1717
* @param appliedRules
1818
*/
1919
@Serializable(ResultsInjectedItemInfoResponseSerializer::class)
2020
public data class ResultsInjectedItemInfoResponse(
21+
22+
/** The key of the injected group. */
2123
val key: String,
2224
val appliedRules: List<ResultsInjectedItemAppliedRulesInfoResponse>? = null,
2325
val additionalProperties: Map<String, JsonElement>? = null,

client/src/commonMain/kotlin/com/algolia/client/model/composition/SearchResultsItem.kt

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ import kotlinx.serialization.json.*
1010
/**
1111
* SearchResultsItem
1212
*
13-
* @param page The current page of the results.
14-
* @param nbHits Number of results (hits).
15-
* @param nbPages Number of pages of results.
16-
* @param hitsPerPage Number of hits returned per page.
1713
* @param hits Search results (hits). Hits are records from your index that match the search
1814
* criteria, augmented with additional attributes, such as, for highlighting.
19-
* @param query The search query string.
15+
* @param hitsPerPage Number of hits returned per page.
16+
* @param nbHits Number of results (hits).
17+
* @param nbPages Number of pages of results.
18+
* @param page The current page of the results.
2019
* @param params URL-encoded string of all search parameters.
20+
* @param query The search query string.
2121
* @param compositions
2222
* @param abTestID A/B test ID. This is only included in the response for indices that are part of
2323
* an A/B test.
@@ -58,29 +58,29 @@ import kotlinx.serialization.json.*
5858
@Serializable
5959
public data class SearchResultsItem(
6060

61-
/** The current page of the results. */
62-
@SerialName(value = "page") val page: Int,
61+
/**
62+
* Search results (hits). Hits are records from your index that match the search criteria,
63+
* augmented with additional attributes, such as, for highlighting.
64+
*/
65+
@SerialName(value = "hits") val hits: List<Hit>,
66+
67+
/** Number of hits returned per page. */
68+
@SerialName(value = "hitsPerPage") val hitsPerPage: Int,
6369

6470
/** Number of results (hits). */
6571
@SerialName(value = "nbHits") val nbHits: Int,
6672

6773
/** Number of pages of results. */
6874
@SerialName(value = "nbPages") val nbPages: Int,
6975

70-
/** Number of hits returned per page. */
71-
@SerialName(value = "hitsPerPage") val hitsPerPage: Int,
76+
/** The current page of the results. */
77+
@SerialName(value = "page") val page: Int,
7278

73-
/**
74-
* Search results (hits). Hits are records from your index that match the search criteria,
75-
* augmented with additional attributes, such as, for highlighting.
76-
*/
77-
@SerialName(value = "hits") val hits: List<Hit>,
79+
/** URL-encoded string of all search parameters. */
80+
@SerialName(value = "params") val params: String,
7881

7982
/** The search query string. */
8083
@SerialName(value = "query") val query: String,
81-
82-
/** URL-encoded string of all search parameters. */
83-
@SerialName(value = "params") val params: String,
8484
@SerialName(value = "compositions")
8585
val compositions: Map<kotlin.String, ResultsCompositionInfoResponse>,
8686

0 commit comments

Comments
 (0)