Skip to content

Commit b153b39

Browse files
kai687shortcuts
andauthored
fix(specs): ingestion api reference (#2918)
Co-authored-by: Clément Vannicatte <vannicattec@gmail.com>
1 parent eea8f9d commit b153b39

38 files changed

+508
-289
lines changed

generators/src/main/java/com/algolia/codegen/AlgoliaJavaGenerator.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ public String toEnumVarName(String value, String datatype) {
121121
return "GREATER_THAN";
122122
case ">=":
123123
return "GREATER_EQUALS";
124+
case "mappingkit/v1":
125+
return "MAPPINGKIT_V1";
124126
}
125127

126128
if (!value.matches("[A-Z0-9_]+")) {

generators/src/main/java/com/algolia/codegen/cts/tests/ParametersWithDataType.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,9 @@ private void transferPrimitiveData(IJsonSchemaValidationProperties spec, Map<Str
598598
case "String":
599599
output.put("isString", true);
600600
break;
601+
case "UUID":
602+
output.put("isString", true);
603+
break;
601604
case "Integer":
602605
output.put("isInteger", true);
603606
output.put("isNumber", true);

specs/ingestion/common/authenticationParameters.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
type:
22
name: type
33
in: query
4-
description: The type of the authentications to retrieve.
4+
description: Type of authentication resource to retrieve.
55
required: false
66
style: form
77
explode: false
@@ -14,7 +14,7 @@ type:
1414
platform:
1515
name: platform
1616
in: query
17-
description: The platform of the authentications to retrieve.
17+
description: Ecommerce platform for which to retrieve authentication resources.
1818
required: false
1919
style: form
2020
explode: false
@@ -26,7 +26,7 @@ platform:
2626

2727
platformNone:
2828
type: string
29-
description: Used to filter Authentication without platform property.
29+
description: Authentication resource not tied to any ecommerce platform, used for filtering.
3030
enum: ['none']
3131

3232
platformWithNone:
@@ -37,12 +37,13 @@ platformWithNone:
3737
sort:
3838
name: sort
3939
in: query
40-
description: The key by which the list should be sorted.
40+
description: Property by which to sort the list of authentication resources.
4141
required: false
4242
schema:
4343
$ref: '#/authenticationSortKeys'
4444

4545
authenticationSortKeys:
4646
type: string
47-
description: Used to sort the Authentication list endpoint.
47+
description: Property by which to sort the list of authentication resources.
48+
default: createdAt
4849
enum: [name, auth_type, platform, updatedAt, createdAt]

specs/ingestion/common/destinationParameters.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
type:
22
name: type
33
in: query
4-
description: The type of the destinations to retrive.
4+
description: Destination type.
55
required: false
66
style: form
77
explode: false
@@ -14,7 +14,7 @@ type:
1414
authenticationID:
1515
name: authenticationID
1616
in: query
17-
description: The authenticationIDs of the destinations to retrive.
17+
description: Authentication ID used by destinations.
1818
required: false
1919
style: form
2020
explode: false
@@ -26,12 +26,14 @@ authenticationID:
2626
sort:
2727
name: sort
2828
in: query
29-
description: The key by which the list should be sorted.
29+
description: Property by which to sort the destinations.
3030
required: false
31+
example: type
3132
schema:
3233
$ref: '#/destinationSortKeys'
3334

3435
destinationSortKeys:
3536
type: string
36-
description: Used to sort the Destination list endpoint.
37+
description: Property by which to sort the destinations.
38+
default: createdAt
3739
enum: [name, type, updatedAt, createdAt]
Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
eventStatus:
22
name: status
33
in: query
4-
description: Filter the status of the events.
4+
description: Event status for filtering the list of task runs.
55
schema:
66
type: array
77
items:
@@ -10,7 +10,7 @@ eventStatus:
1010
eventType:
1111
name: type
1212
in: query
13-
description: Filter the type of the events.
13+
description: Event type for filtering the list of task runs.
1414
schema:
1515
type: array
1616
items:
@@ -19,7 +19,7 @@ eventType:
1919
runStatus:
2020
name: status
2121
in: query
22-
description: Filter the status of the runs.
22+
description: Run status for filtering the list of task runs.
2323
schema:
2424
type: array
2525
items:
@@ -28,32 +28,33 @@ runStatus:
2828
taskID:
2929
name: taskID
3030
in: query
31-
description: Filter by taskID.
31+
description: Task ID for filtering the list of task runs.
3232
schema:
3333
$ref: './schemas/common.yml#/taskID'
3434

3535
runSort:
3636
name: sort
3737
in: query
38-
description: The key by which the list should be sorted.
38+
description: Property by which to sort the list of task runs.
3939
required: false
4040
schema:
4141
$ref: '#/runSortKeys'
4242

4343
runSortKeys:
4444
type: string
45-
description: Used to sort the Run list endpoint.
45+
description: Property by which to sort the list of task runs.
46+
default: createdAt
4647
enum: [status, updatedAt, createdAt]
4748

4849
eventSort:
4950
name: sort
5051
in: query
51-
description: The key by which the list should be sorted.
52+
description: Property by which to sort the list of task run events.
5253
required: false
5354
schema:
5455
$ref: '#/eventSortKeys'
5556

5657
eventSortKeys:
5758
type: string
58-
description: Used to sort the Event list endpoint.
59+
description: Property by which to sort the list of task run events.
5960
enum: [status, type, publishedAt]

specs/ingestion/common/parameters.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,75 +2,76 @@ pathAuthenticationID:
22
name: authenticationID
33
in: path
44
required: true
5-
description: The authentication UUID.
5+
description: Unique identifier of an authentication resource.
66
schema:
77
$ref: './schemas/common.yml#/authenticationID'
88

99
pathDestinationID:
1010
name: destinationID
1111
in: path
1212
required: true
13-
description: The destination UUID.
13+
description: Unique identifier of a destination.
1414
schema:
1515
$ref: './schemas/common.yml#/destinationID'
1616

1717
pathSourceID:
1818
name: sourceID
1919
in: path
2020
required: true
21-
description: The source UUID.
21+
description: Unique identifier of a source.
2222
schema:
2323
$ref: './schemas/common.yml#/sourceID'
2424

2525
pathTaskID:
2626
name: taskID
2727
in: path
2828
required: true
29-
description: The task UUID.
29+
description: Unique identifier of a task.
3030
schema:
3131
$ref: './schemas/common.yml#/taskID'
3232

3333
pathRunID:
3434
name: runID
3535
in: path
3636
required: true
37-
description: The run UUID.
37+
description: Unique identifier of a task run.
3838
schema:
3939
$ref: './schemas/common.yml#/runID'
4040

4141
pathEventID:
4242
name: eventID
4343
in: path
4444
required: true
45-
description: The event UUID.
45+
description: Unique identifier of an event.
4646
schema:
4747
$ref: './schemas/common.yml#/eventID'
4848

4949
itemsPerPage:
5050
name: itemsPerPage
5151
in: query
52-
description: The number of items per page to return.
52+
description: Number of items per page.
5353
required: false
5454
schema:
55-
type: integer
55+
$ref: './schemas/pagination.yml#/itemsPerPage'
5656

5757
page:
5858
name: page
5959
in: query
60-
description: The page number to fetch, starting at 1.
60+
description: Page number of the paginated API response.
6161
required: false
6262
schema:
63-
type: integer
63+
$ref: './schemas/pagination.yml#/page'
6464

6565
order:
6666
name: order
6767
in: query
68-
description: The order of the returned list.
68+
description: Sort order of the response, ascending or descending.
6969
required: false
7070
schema:
7171
$ref: '#/orderKeys'
7272

7373
orderKeys:
7474
type: string
75-
description: Used to order a sorted request.
75+
description: Ascending or descending sort order.
76+
default: desc
7677
enum: [asc, desc]

0 commit comments

Comments
 (0)