Skip to content

Commit 9d6ab0b

Browse files
committed
implement put and delete API for compositions and rules
1 parent 9a29c26 commit 9d6ab0b

File tree

2 files changed

+126
-0
lines changed

2 files changed

+126
-0
lines changed

specs/composition-full/paths/objects/objects.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,65 @@ get:
2525
$ref: '../../../common/responses/MethodNotAllowed.yml'
2626
'404':
2727
$ref: '../../../common/responses/CompositionNotFound.yml'
28+
29+
put:
30+
tags:
31+
- Compositions
32+
operationId: putComposition
33+
x-acl:
34+
- editSettings
35+
- settings
36+
summary: Upsert a composition
37+
description: |
38+
Upsert a composition in the current Algolia application.
39+
parameters:
40+
- $ref: '../urlParams.yml#/compositionID'
41+
requestBody:
42+
required: true
43+
content:
44+
application/json:
45+
schema:
46+
$ref: '../../common/schemas/components/Composition.yml#/composition'
47+
responses:
48+
'200':
49+
description: OK
50+
content:
51+
application/json:
52+
schema:
53+
$ref: '../../../common/responses/common.yml#/taskID'
54+
'400':
55+
$ref: '../../../common/responses/BadRequest.yml'
56+
'402':
57+
$ref: '../../../common/responses/FeatureNotEnabled.yml'
58+
'403':
59+
$ref: '../../../common/responses/MethodNotAllowed.yml'
60+
'422':
61+
$ref: '../../../common/responses/UnprocessableEntity.yml'
62+
63+
delete:
64+
tags:
65+
- Compositions
66+
operationId: deleteComposition
67+
x-acl:
68+
- editSettings
69+
- settings
70+
summary: Delete a composition
71+
description: |
72+
Delete a composition from the current Algolia application.
73+
parameters:
74+
- $ref: '../urlParams.yml#/compositionID'
75+
responses:
76+
'200':
77+
description: OK
78+
content:
79+
application/json:
80+
schema:
81+
$ref: '../../../common/responses/common.yml#/taskID'
82+
'400':
83+
$ref: '../../../common/responses/BadRequest.yml'
84+
'402':
85+
$ref: '../../../common/responses/FeatureNotEnabled.yml'
86+
'403':
87+
$ref: '../../../common/responses/MethodNotAllowed.yml'
88+
'404':
89+
$ref: '../../../common/responses/CompositionNotFound.yml'

specs/composition-full/paths/rules/rule.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,67 @@ get:
2727
$ref: '../../../common/responses/MethodNotAllowed.yml'
2828
'404':
2929
$ref: '../../../common/responses/IndexNotFound.yml'
30+
31+
put:
32+
tags:
33+
- Rules
34+
operationId: putCompositionRule
35+
x-acl:
36+
- editSettings
37+
- settings
38+
summary: Upsert a composition rule
39+
description: |
40+
Upsert a Composition Rule for the specified composition ID.
41+
parameters:
42+
- $ref: '../urlParams.yml#/compositionID'
43+
- $ref: './parameters.yml#/ObjectIDRule'
44+
requestBody:
45+
required: true
46+
content:
47+
application/json:
48+
schema:
49+
$ref: '../../common/schemas/components/CompositionRule.yml#/compositionRule'
50+
responses:
51+
'200':
52+
description: OK
53+
content:
54+
application/json:
55+
schema:
56+
$ref: '../../../common/responses/common.yml#/taskID'
57+
'400':
58+
$ref: '../../../common/responses/BadRequest.yml'
59+
'402':
60+
$ref: '../../../common/responses/FeatureNotEnabled.yml'
61+
'403':
62+
$ref: '../../../common/responses/MethodNotAllowed.yml'
63+
'422':
64+
$ref: '../../../common/responses/UnprocessableEntity.yml'
65+
66+
delete:
67+
tags:
68+
- Rules
69+
operationId: deleteCompositionRule
70+
x-acl:
71+
- editSettings
72+
- settings
73+
summary: Delete a Composition Rule
74+
description: |
75+
Delete a Composition Rule from the specified Composition ID.
76+
parameters:
77+
- $ref: '../urlParams.yml#/compositionID'
78+
- $ref: './parameters.yml#/ObjectIDRule'
79+
responses:
80+
'200':
81+
description: OK
82+
content:
83+
application/json:
84+
schema:
85+
$ref: '../../../common/responses/common.yml#/taskID'
86+
'400':
87+
$ref: '../../../common/responses/BadRequest.yml'
88+
'402':
89+
$ref: '../../../common/responses/FeatureNotEnabled.yml'
90+
'403':
91+
$ref: '../../../common/responses/MethodNotAllowed.yml'
92+
'404':
93+
$ref: '../../../common/responses/CompositionNotFound.yml'

0 commit comments

Comments
 (0)