Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add flow_framework namespace specs #553

Merged
merged 21 commits into from
Sep 6, 2024
Prev Previous commit
Next Next commit
refactor: fix lint spec error
Signed-off-by: Junwei Dai <[email protected]>
Junwei Dai committed Sep 5, 2024
commit fb4174d1eb6e98fa80c0c7142f891cca73ff342c
77 changes: 50 additions & 27 deletions spec/namespaces/flow_framework.yaml
Original file line number Diff line number Diff line change
@@ -23,16 +23,9 @@
'201':
$ref: '#/components/responses/flow_framework.create@201'
'403':
$ref: '../schemas/flow_framework._errors.yaml#/components/schemas/FlowFrameworkAPIDisabledException'
$ref: '#/components/responses/flow_framework.create@403'
'400':
description: Bad Request - Multiple possible reasons
oneOf:
- $ref: '../schemas/flow_framework._errors.yaml#/components/schemas/BadRequestError'
- $ref: '../schemas/flow_framework._errors.yaml#/components/schemas/ConflictError'
- $ref: '../schemas/flow_framework._errors.yaml#/components/schemas/MissingParameterError'
- $ref: '../schemas/flow_framework._errors.yaml#/components/schemas/ParameterConflictError'
- $ref: '../schemas/flow_framework._errors.yaml#/components/schemas/MaxWorkflowsLimitError'
- $ref: '../schemas/flow_framework._errors.yaml#/components/schemas/WorkflowSaveError'
$ref: '#/components/responses/flow_framework.create@400'
/_plugins/_flow_framework/workflow/{workflow_id}:
delete:
operationId: flow_framework.delete.0
@@ -48,11 +41,11 @@
'200':
$ref: '#/components/responses/flow_framework.delete@200'
'400':
$ref: '../schemas/flow_framework._errors.yaml#/components/schemas/WorkFlowIdNullError'
$ref: '#/components/responses/flow_framework.delete@400'
'403':
$ref: '../schemas/flow_framework._errors.yaml#/components/schemas/FlowFrameworkAPIDisabledException'
$ref: '#/components/responses/flow_framework.delete@403'
'404':
$ref: '../schemas/flow_framework._errors.yaml#/components/schemas/TemplateNotFoundError'
$ref: '#/components/responses/flow_framework.delete@404'
put:
operationId: flow_framework.update.0
x-operation-group: flow_framework.update
@@ -70,7 +63,7 @@
$ref: '#/components/responses/flow_framework.update@201'
description: It returns the workflow_id
'404':
$ref: '../schemas/flow_framework._errors.yaml#/components/schemas/TemplateNotFoundError'
$ref: '#/components/responses/flow_framework.update@404'
get:
operationId: flow_framework.get.0
x-operation-group: flow_framework.get
@@ -82,9 +75,9 @@
- $ref: '#/components/parameters/flow_framework.get::path.workflow_id'
responses:
'200':
$ref: '#/components/responses/flow_framework.get'
$ref: '#/components/responses/flow_framework.get@200'
'404':
$ref: '../schemas/flow_framework._errors.yaml#/components/schemas/TemplateNotFoundError'
$ref: '#/components/responses/flow_framework.get@404'
components:
parameters:
flow_framework.get::path.workflow_id:
@@ -209,10 +202,10 @@
type: string
description: A list of minimum required OpenSearch versions.
oneOf:
- required: [name]
- required: [description]
- required: [use_case]
- required: [version]
- required: [ name ]

Check failure on line 205 in spec/namespaces/flow_framework.yaml

GitHub Actions / lint

There should be no space after '['

Check failure on line 205 in spec/namespaces/flow_framework.yaml

GitHub Actions / lint

There should be no space before ']'
- required: [ description ]

Check failure on line 206 in spec/namespaces/flow_framework.yaml

GitHub Actions / lint

There should be no space after '['

Check failure on line 206 in spec/namespaces/flow_framework.yaml

GitHub Actions / lint

There should be no space before ']'
- required: [ use_case ]

Check failure on line 207 in spec/namespaces/flow_framework.yaml

GitHub Actions / lint

There should be no space after '['

Check failure on line 207 in spec/namespaces/flow_framework.yaml

GitHub Actions / lint

There should be no space before ']'
- required: [ version ]

Check failure on line 208 in spec/namespaces/flow_framework.yaml

GitHub Actions / lint

There should be no space after '['

Check failure on line 208 in spec/namespaces/flow_framework.yaml

GitHub Actions / lint

There should be no space before ']'
responses:
flow_framework.create@201:
content:
@@ -225,6 +218,21 @@
description: The ID of the workflow to be updated. Required for the PUT method.
required:
- workflow_id
flow_framework.create@403:
content:
application/json:
$ref: '../schemas/flow_framework.errors.yaml#/components/schemas/FlowFrameworkAPIDisabledError'

Check failure on line 224 in spec/namespaces/flow_framework.yaml

GitHub Actions / lint

Expected indentation of 10 spaces but found 12 spaces
flow_framework.create@400:
description: Bad Request - Multiple possible reasons
content:
application/json:
oneOf:

Check failure on line 229 in spec/namespaces/flow_framework.yaml

GitHub Actions / lint

Expected indentation of 10 spaces but found 12 spaces
- $ref: '../schemas/flow_framework.errors.yaml#/components/schemas/BadRequestError'
- $ref: '../schemas/flow_framework.errors.yaml#/components/schemas/ConflictError'
- $ref: '../schemas/flow_framework.errors.yaml#/components/schemas/MissingParameterError'
- $ref: '../schemas/flow_framework.errors.yaml#/components/schemas/ParameterConflictError'
- $ref: '../schemas/flow_framework.errors.yaml#/components/schemas/MaxWorkflowsLimitError'
- $ref: '../schemas/flow_framework.errors.yaml#/components/schemas/WorkflowSaveError'
flow_framework.update@201:
content:
application/json:
@@ -254,7 +262,7 @@
result:
type: string
description: The result of the deletion operation.
enum: [deleted, not_found]
enum: [ deleted, not_found ]
_shards:
type: object
properties:
@@ -273,7 +281,7 @@
_primary_term:
type: integer
description: The primary term assigned to the document after the deletion.
flow_framework.get:
flow_framework.get@200:
content:
application/json:
schema:
@@ -312,12 +320,27 @@
last_updated_time:
type: integer
flow_framework.update@404:
description: Template Not Found Error
content:
application/json: { }
flow_framework.create@400:
content:
application/json: { }
application/json:
$ref: '../schemas/flow_framework.errors.yaml#/components/schemas/TemplateNotFoundError'
flow_framework.delete@400:
description: Work Flow Id Null Error
content:
application/json:
$ref: '../schemas/flow_framework.errors.yaml#/components/schemas/WorkFlowIdNullError'
flow_framework.delete@403:
description: Flow Framework API Disabled Error
content:
application/json:
$ref: '../schemas/flow_framework.errors.yaml#/components/schemas/FlowFrameworkAPIDisabledError'
flow_framework.delete@404:
description: Template Not Found Error
content:
application/json:
$ref: '../schemas/flow_framework.errors.yaml#/components/schemas/TemplateNotFoundError'
flow_framework.get@404:
description: Template Not Found Error
content:
description: Workflow ID can not be null
application/json: { }
application/json:
$ref: '../schemas/flow_framework.errors.yaml#/components/schemas/TemplateNotFoundError'
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ info:
paths: {}
components:
schemas:
FlowFrameworkAPIDisabledException:
FlowFrameworkAPIDisabledError:
content:
application/json:
type: object