Skip to content

Commit fb4174d

Browse files
author
Junwei Dai
committed
refactor: fix lint spec error
Signed-off-by: Junwei Dai <[email protected]>
1 parent 03ed38a commit fb4174d

File tree

2 files changed

+51
-28
lines changed

2 files changed

+51
-28
lines changed

spec/namespaces/flow_framework.yaml

+50-27
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,9 @@ paths:
2323
'201':
2424
$ref: '#/components/responses/flow_framework.create@201'
2525
'403':
26-
$ref: '../schemas/flow_framework._errors.yaml#/components/schemas/FlowFrameworkAPIDisabledException'
26+
$ref: '#/components/responses/flow_framework.create@403'
2727
'400':
28-
description: Bad Request - Multiple possible reasons
29-
oneOf:
30-
- $ref: '../schemas/flow_framework._errors.yaml#/components/schemas/BadRequestError'
31-
- $ref: '../schemas/flow_framework._errors.yaml#/components/schemas/ConflictError'
32-
- $ref: '../schemas/flow_framework._errors.yaml#/components/schemas/MissingParameterError'
33-
- $ref: '../schemas/flow_framework._errors.yaml#/components/schemas/ParameterConflictError'
34-
- $ref: '../schemas/flow_framework._errors.yaml#/components/schemas/MaxWorkflowsLimitError'
35-
- $ref: '../schemas/flow_framework._errors.yaml#/components/schemas/WorkflowSaveError'
28+
$ref: '#/components/responses/flow_framework.create@400'
3629
/_plugins/_flow_framework/workflow/{workflow_id}:
3730
delete:
3831
operationId: flow_framework.delete.0
@@ -48,11 +41,11 @@ paths:
4841
'200':
4942
$ref: '#/components/responses/flow_framework.delete@200'
5043
'400':
51-
$ref: '../schemas/flow_framework._errors.yaml#/components/schemas/WorkFlowIdNullError'
44+
$ref: '#/components/responses/flow_framework.delete@400'
5245
'403':
53-
$ref: '../schemas/flow_framework._errors.yaml#/components/schemas/FlowFrameworkAPIDisabledException'
46+
$ref: '#/components/responses/flow_framework.delete@403'
5447
'404':
55-
$ref: '../schemas/flow_framework._errors.yaml#/components/schemas/TemplateNotFoundError'
48+
$ref: '#/components/responses/flow_framework.delete@404'
5649
put:
5750
operationId: flow_framework.update.0
5851
x-operation-group: flow_framework.update
@@ -70,7 +63,7 @@ paths:
7063
$ref: '#/components/responses/flow_framework.update@201'
7164
description: It returns the workflow_id
7265
'404':
73-
$ref: '../schemas/flow_framework._errors.yaml#/components/schemas/TemplateNotFoundError'
66+
$ref: '#/components/responses/flow_framework.update@404'
7467
get:
7568
operationId: flow_framework.get.0
7669
x-operation-group: flow_framework.get
@@ -82,9 +75,9 @@ paths:
8275
- $ref: '#/components/parameters/flow_framework.get::path.workflow_id'
8376
responses:
8477
'200':
85-
$ref: '#/components/responses/flow_framework.get'
78+
$ref: '#/components/responses/flow_framework.get@200'
8679
'404':
87-
$ref: '../schemas/flow_framework._errors.yaml#/components/schemas/TemplateNotFoundError'
80+
$ref: '#/components/responses/flow_framework.get@404'
8881
components:
8982
parameters:
9083
flow_framework.get::path.workflow_id:
@@ -209,10 +202,10 @@ components:
209202
type: string
210203
description: A list of minimum required OpenSearch versions.
211204
oneOf:
212-
- required: [name]
213-
- required: [description]
214-
- required: [use_case]
215-
- required: [version]
205+
- required: [ name ]
206+
- required: [ description ]
207+
- required: [ use_case ]
208+
- required: [ version ]
216209
responses:
217210
flow_framework.create@201:
218211
content:
@@ -225,6 +218,21 @@ components:
225218
description: The ID of the workflow to be updated. Required for the PUT method.
226219
required:
227220
- workflow_id
221+
flow_framework.create@403:
222+
content:
223+
application/json:
224+
$ref: '../schemas/flow_framework.errors.yaml#/components/schemas/FlowFrameworkAPIDisabledError'
225+
flow_framework.create@400:
226+
description: Bad Request - Multiple possible reasons
227+
content:
228+
application/json:
229+
oneOf:
230+
- $ref: '../schemas/flow_framework.errors.yaml#/components/schemas/BadRequestError'
231+
- $ref: '../schemas/flow_framework.errors.yaml#/components/schemas/ConflictError'
232+
- $ref: '../schemas/flow_framework.errors.yaml#/components/schemas/MissingParameterError'
233+
- $ref: '../schemas/flow_framework.errors.yaml#/components/schemas/ParameterConflictError'
234+
- $ref: '../schemas/flow_framework.errors.yaml#/components/schemas/MaxWorkflowsLimitError'
235+
- $ref: '../schemas/flow_framework.errors.yaml#/components/schemas/WorkflowSaveError'
228236
flow_framework.update@201:
229237
content:
230238
application/json:
@@ -254,7 +262,7 @@ components:
254262
result:
255263
type: string
256264
description: The result of the deletion operation.
257-
enum: [deleted, not_found]
265+
enum: [ deleted, not_found ]
258266
_shards:
259267
type: object
260268
properties:
@@ -273,7 +281,7 @@ components:
273281
_primary_term:
274282
type: integer
275283
description: The primary term assigned to the document after the deletion.
276-
flow_framework.get:
284+
flow_framework.get@200:
277285
content:
278286
application/json:
279287
schema:
@@ -312,12 +320,27 @@ components:
312320
last_updated_time:
313321
type: integer
314322
flow_framework.update@404:
323+
description: Template Not Found Error
315324
content:
316-
application/json: { }
317-
flow_framework.create@400:
318-
content:
319-
application/json: { }
325+
application/json:
326+
$ref: '../schemas/flow_framework.errors.yaml#/components/schemas/TemplateNotFoundError'
320327
flow_framework.delete@400:
328+
description: Work Flow Id Null Error
329+
content:
330+
application/json:
331+
$ref: '../schemas/flow_framework.errors.yaml#/components/schemas/WorkFlowIdNullError'
332+
flow_framework.delete@403:
333+
description: Flow Framework API Disabled Error
334+
content:
335+
application/json:
336+
$ref: '../schemas/flow_framework.errors.yaml#/components/schemas/FlowFrameworkAPIDisabledError'
337+
flow_framework.delete@404:
338+
description: Template Not Found Error
339+
content:
340+
application/json:
341+
$ref: '../schemas/flow_framework.errors.yaml#/components/schemas/TemplateNotFoundError'
342+
flow_framework.get@404:
343+
description: Template Not Found Error
321344
content:
322-
description: Workflow ID can not be null
323-
application/json: { }
345+
application/json:
346+
$ref: '../schemas/flow_framework.errors.yaml#/components/schemas/TemplateNotFoundError'

spec/schemas/flow_framework._errors.yaml spec/schemas/flow_framework.errors.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ info:
66
paths: {}
77
components:
88
schemas:
9-
FlowFrameworkAPIDisabledException:
9+
FlowFrameworkAPIDisabledError:
1010
content:
1111
application/json:
1212
type: object

0 commit comments

Comments
 (0)