Skip to content

Commit 302c8b9

Browse files
algolia-botClaraMullermillotp
committed
test(cts): update some composition client tests values to make the documentation clearer (#5419) (generated) [skip ci]
Co-authored-by: Clara Muller <[email protected]> Co-authored-by: Pierre Millot <[email protected]>
1 parent 97d8ffb commit 302c8b9

File tree

24 files changed

+439
-431
lines changed

24 files changed

+439
-431
lines changed

docs/bundled/composition-snippets.json

Lines changed: 10 additions & 10 deletions
Large diffs are not rendered by default.

docs/bundled/composition.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1148,7 +1148,7 @@ paths:
11481148
InjectedItems = new Dictionary<string, ExternalInjectedItem>
11491149
{
11501150
{
1151-
"injectedItem1",
1151+
"my-unique-external-group-key",
11521152
new ExternalInjectedItem
11531153
{
11541154
Items = new List<ExternalInjection>
@@ -1190,7 +1190,7 @@ paths:
11901190
params: Params(
11911191
query: "batman",
11921192
injectedItems: {
1193-
'injectedItem1': ExternalInjectedItem(
1193+
'my-unique-external-group-key': ExternalInjectedItem(
11941194
items: [
11951195
ExternalInjection(
11961196
objectID: "my-object-1",
@@ -1232,7 +1232,7 @@ paths:
12321232
response, err := client.Search(client.NewApiSearchRequest(
12331233
"foo",
12341234
composition.NewEmptyRequestBody().SetParams(
1235-
composition.NewEmptyParams().SetQuery("batman").SetInjectedItems(map[string]composition.ExternalInjectedItem{"injectedItem1": *composition.NewEmptyExternalInjectedItem().SetItems(
1235+
composition.NewEmptyParams().SetQuery("batman").SetInjectedItems(map[string]composition.ExternalInjectedItem{"my-unique-external-group-key": *composition.NewEmptyExternalInjectedItem().SetItems(
12361236
[]composition.ExternalInjection{*composition.NewEmptyExternalInjection().SetObjectID("my-object-1"), *composition.NewEmptyExternalInjection().SetObjectID("my-object-2").SetMetadata(map[string]any{"my-string": "string", "my-bool": true, "my-number": 42, "my-object": map[string]any{"sub-key": "sub-value"}})})}))))
12371237
if err != nil {
12381238
// handle the eventual error
@@ -1265,7 +1265,7 @@ paths:
12651265
new HashMap() {
12661266
{
12671267
put(
1268-
"injectedItem1",
1268+
"my-unique-external-group-key",
12691269
new ExternalInjectedItem().setItems(
12701270
Arrays.asList(
12711271
new ExternalInjection().setObjectID("my-object-1"),
@@ -1316,7 +1316,7 @@ paths:
13161316
params: {
13171317
query: 'batman',
13181318
injectedItems: {
1319-
injectedItem1: {
1319+
'my-unique-external-group-key': {
13201320
items: [
13211321
{ objectID: 'my-object-1' },
13221322
{
@@ -1381,7 +1381,7 @@ paths:
13811381
$response = $client->search(
13821382
'foo',
13831383
['params' => ['query' => 'batman',
1384-
'injectedItems' => ['injectedItem1' => ['items' => [
1384+
'injectedItems' => ['my-unique-external-group-key' => ['items' => [
13851385
['objectID' => 'my-object-1',
13861386
],
13871387
@@ -1425,7 +1425,7 @@ paths:
14251425
"params": {
14261426
"query": "batman",
14271427
"injectedItems": {
1428-
"injectedItem1": {
1428+
"my-unique-external-group-key": {
14291429
"items": [
14301430
{
14311431
"objectID": "my-object-1",
@@ -1469,7 +1469,7 @@ paths:
14691469
params: Algolia::Composition::Params.new(
14701470
query: "batman",
14711471
injected_items: {
1472-
injectedItem1: Algolia::Composition::ExternalInjectedItem.new(
1472+
:"my-unique-external-group-key" => Algolia::Composition::ExternalInjectedItem.new(
14731473
items: [
14741474
Algolia::Composition::ExternalInjection.new(algolia_object_id: "my-object-1"),
14751475
Algolia::Composition::ExternalInjection.new(
@@ -1519,7 +1519,7 @@ paths:
15191519
query = Some("batman"),
15201520
injectedItems = Some(
15211521
Map(
1522-
"injectedItem1" -> ExternalInjectedItem(
1522+
"my-unique-external-group-key" -> ExternalInjectedItem(
15231523
items = Seq(
15241524
ExternalInjection(
15251525
objectID = "my-object-1"
@@ -1567,7 +1567,7 @@ paths:
15671567
compositionID: "foo",
15681568
requestBody: RequestBody(params: CompositionParams(
15691569
query: "batman",
1570-
injectedItems: ["injectedItem1": ExternalInjectedItem(items: [
1570+
injectedItems: ["my-unique-external-group-key": ExternalInjectedItem(items: [
15711571
ExternalInjection(objectID: "my-object-1"),
15721572
ExternalInjection(
15731573
objectID: "my-object-2",

docs/snippets/csharp/src/Composition.cs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ public async Task SnippetForCompositionClientMultipleBatch1()
653653
{
654654
new InjectedItem
655655
{
656-
Key = "injectedItem1",
656+
Key = "my-unique-external-group-key",
657657
Source = new InjectedItemSource(
658658
new ExternalSource
659659
{
@@ -730,7 +730,7 @@ public async Task SnippetForCompositionClientMultipleBatch2()
730730
{
731731
new InjectedItem
732732
{
733-
Key = "injectedItem1",
733+
Key = "my-unique-group-key",
734734
Source = new InjectedItemSource(
735735
new SearchSource
736736
{
@@ -766,7 +766,7 @@ public async Task SnippetForCompositionClientMultipleBatch2()
766766
},
767767
new InjectedItem
768768
{
769-
Key = "externalItem",
769+
Key = "my-unique-group-key",
770770
Source = new InjectedItemSource(
771771
new SearchSource
772772
{
@@ -914,7 +914,7 @@ public async Task SnippetForCompositionClientPutComposition()
914914
{
915915
new InjectedItem
916916
{
917-
Key = "injectedItem1",
917+
Key = "my-unique-group-key",
918918
Source = new InjectedItemSource(
919919
new SearchSource
920920
{
@@ -968,7 +968,7 @@ public async Task SnippetForCompositionClientPutComposition1()
968968
{
969969
new InjectedItem
970970
{
971-
Key = "injectedItem1",
971+
Key = "my-unique-external-group-key",
972972
Source = new InjectedItemSource(
973973
new ExternalSource
974974
{
@@ -1031,7 +1031,7 @@ public async Task SnippetForCompositionClientPutComposition2()
10311031
{
10321032
new InjectedItem
10331033
{
1034-
Key = "injectedItem1",
1034+
Key = "my-unique-group-key",
10351035
Source = new InjectedItemSource(
10361036
new SearchSource
10371037
{
@@ -1064,7 +1064,7 @@ public async Task SnippetForCompositionClientPutComposition2()
10641064
},
10651065
new InjectedItem
10661066
{
1067-
Key = "externalItem",
1067+
Key = "my-unique-group-key",
10681068
Source = new InjectedItemSource(
10691069
new SearchSource
10701070
{
@@ -1207,7 +1207,7 @@ public async Task SnippetForCompositionClientPutCompositionRule()
12071207
{
12081208
new InjectedItem
12091209
{
1210-
Key = "injectedItem1",
1210+
Key = "my-unique-group-from-rule-key",
12111211
Source = new InjectedItemSource(
12121212
new SearchSource
12131213
{
@@ -1268,7 +1268,7 @@ public async Task SnippetForCompositionClientPutCompositionRule1()
12681268
{
12691269
new InjectedItem
12701270
{
1271-
Key = "injectedItem1",
1271+
Key = "my-unique-group-from-rule-key",
12721272
Source = new InjectedItemSource(
12731273
new SearchSource
12741274
{
@@ -1362,7 +1362,7 @@ public async Task SnippetForCompositionClientPutCompositionRule2()
13621362
{
13631363
new InjectedItem
13641364
{
1365-
Key = "injectedItem",
1365+
Key = "my-unique-external-group-from-rule-key",
13661366
Source = new InjectedItemSource(
13671367
new ExternalSource
13681368
{
@@ -1556,7 +1556,7 @@ public async Task SnippetForCompositionClientSaveRules1()
15561556
{
15571557
new InjectedItem
15581558
{
1559-
Key = "injectedItem1",
1559+
Key = "my-unique-group-from-rule-key",
15601560
Source = new InjectedItemSource(
15611561
new SearchSource
15621562
{
@@ -1672,7 +1672,7 @@ public async Task SnippetForCompositionClientSaveRules2()
16721672
{
16731673
new InjectedItem
16741674
{
1675-
Key = "injectedItem",
1675+
Key = "my-unique-external-group-from-rule-key",
16761676
Source = new InjectedItemSource(
16771677
new ExternalSource
16781678
{
@@ -1835,7 +1835,7 @@ public async Task SnippetForCompositionClientSearch1()
18351835
InjectedItems = new Dictionary<string, ExternalInjectedItem>
18361836
{
18371837
{
1838-
"injectedItem1",
1838+
"my-unique-external-group-key",
18391839
new ExternalInjectedItem
18401840
{
18411841
Items = new List<ExternalInjection>

docs/snippets/dart/lib/composition.dart

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ void snippetFormultipleBatch1() async {
643643
),
644644
injectedItems: [
645645
InjectedItem(
646-
key: "injectedItem1",
646+
key: "my-unique-external-group-key",
647647
source: ExternalSource(
648648
external_: External(
649649
index: "foo",
@@ -700,7 +700,7 @@ void snippetFormultipleBatch2() async {
700700
),
701701
injectedItems: [
702702
InjectedItem(
703-
key: "injectedItem1",
703+
key: "my-unique-group-key",
704704
source: SearchSource(
705705
search: Search(
706706
index: "foo",
@@ -726,7 +726,7 @@ void snippetFormultipleBatch2() async {
726726
),
727727
),
728728
InjectedItem(
729-
key: "externalItem",
729+
key: "my-unique-group-key",
730730
source: SearchSource(
731731
search: Search(
732732
index: "foo",
@@ -842,7 +842,7 @@ void snippetForputComposition() async {
842842
),
843843
injectedItems: [
844844
InjectedItem(
845-
key: "injectedItem1",
845+
key: "my-unique-group-key",
846846
source: SearchSource(
847847
search: Search(
848848
index: "foo",
@@ -886,7 +886,7 @@ void snippetForputComposition1() async {
886886
),
887887
injectedItems: [
888888
InjectedItem(
889-
key: "injectedItem1",
889+
key: "my-unique-external-group-key",
890890
source: ExternalSource(
891891
external_: External(
892892
index: "foo",
@@ -937,7 +937,7 @@ void snippetForputComposition2() async {
937937
),
938938
injectedItems: [
939939
InjectedItem(
940-
key: "injectedItem1",
940+
key: "my-unique-group-key",
941941
source: SearchSource(
942942
search: Search(
943943
index: "foo",
@@ -963,7 +963,7 @@ void snippetForputComposition2() async {
963963
),
964964
),
965965
InjectedItem(
966-
key: "externalItem",
966+
key: "my-unique-group-key",
967967
source: SearchSource(
968968
search: Search(
969969
index: "foo",
@@ -1080,7 +1080,7 @@ void snippetForputCompositionRule() async {
10801080
),
10811081
injectedItems: [
10821082
InjectedItem(
1083-
key: "injectedItem1",
1083+
key: "my-unique-group-from-rule-key",
10841084
source: SearchSource(
10851085
search: Search(
10861086
index: "foo",
@@ -1132,7 +1132,7 @@ void snippetForputCompositionRule1() async {
11321132
),
11331133
injectedItems: [
11341134
InjectedItem(
1135-
key: "injectedItem1",
1135+
key: "my-unique-group-from-rule-key",
11361136
source: SearchSource(
11371137
search: Search(
11381138
index: "foo",
@@ -1219,7 +1219,7 @@ void snippetForputCompositionRule2() async {
12191219
),
12201220
injectedItems: [
12211221
InjectedItem(
1222-
key: "injectedItem",
1222+
key: "my-unique-external-group-from-rule-key",
12231223
source: ExternalSource(
12241224
external_: External(
12251225
index: "my-index",
@@ -1380,7 +1380,7 @@ void snippetForsaveRules1() async {
13801380
),
13811381
injectedItems: [
13821382
InjectedItem(
1383-
key: "injectedItem1",
1383+
key: "my-unique-group-from-rule-key",
13841384
source: SearchSource(
13851385
search: Search(
13861386
index: "foo",
@@ -1473,7 +1473,7 @@ void snippetForsaveRules2() async {
14731473
),
14741474
injectedItems: [
14751475
InjectedItem(
1476-
key: "injectedItem",
1476+
key: "my-unique-external-group-from-rule-key",
14771477
source: ExternalSource(
14781478
external_: External(
14791479
index: "my-index",
@@ -1600,7 +1600,7 @@ void snippetForsearch1() async {
16001600
params: Params(
16011601
query: "batman",
16021602
injectedItems: {
1603-
'injectedItem1': ExternalInjectedItem(
1603+
'my-unique-external-group-key': ExternalInjectedItem(
16041604
items: [
16051605
ExternalInjection(
16061606
objectID: "my-object-1",

0 commit comments

Comments
 (0)