Skip to content

Commit 973cc0c

Browse files
authored
feat(specs): add new ingestion property for push (#5007)
1 parent 17b73cb commit 973cc0c

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

specs/ingestion/paths/push.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ post:
2020
parameters:
2121
- $ref: '../../common/parameters.yml#/IndexName'
2222
- $ref: '../common/parameters.yml#/watch'
23+
- name: referenceIndexName
24+
in: query
25+
description: This is required when targeting an index that does not have a push connector setup (e.g. a tmp index), but you wish to attach another index's transformation to it (e.g. the source index name).
26+
required: false
27+
schema:
28+
type: string
2329
requestBody:
2430
content:
2531
application/json:

templates/java/api_helpers.mustache

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,7 @@ public <T> WatchResponse saveObjectsWithTransformation(
738738
indexName,
739739
new PushTaskPayload().setAction(com.algolia.model.ingestion.Action.ADD_OBJECT).setRecords(this.objectsToPushTaskRecords(objects)),
740740
waitForTasks,
741+
null,
741742
requestOptions
742743
);
743744
}
@@ -983,6 +984,7 @@ public <T> WatchResponse partialUpdateObjectsWithTransformation(
983984
)
984985
.setRecords(this.objectsToPushTaskRecords(objects)),
985986
waitForTasks,
987+
null,
986988
requestOptions
987989
);
988990
}

tests/CTS/requests/ingestion/push.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,15 @@
5858
}
5959
]
6060
},
61-
"watch": true
61+
"watch": true,
62+
"referenceIndexName": "foo"
6263
},
6364
"request": {
6465
"path": "/1/push/bar",
6566
"method": "POST",
6667
"queryParameters": {
67-
"watch": "true"
68+
"watch": "true",
69+
"referenceIndexName": "foo"
6870
},
6971
"body": {
7072
"action": "addObject",

0 commit comments

Comments
 (0)