Skip to content

Commit

Permalink
refactor: fix lint spec error
Browse files Browse the repository at this point in the history
Signed-off-by: Junwei Dai <[email protected]>
  • Loading branch information
Junwei Dai committed Sep 5, 2024
1 parent 03ed38a commit fb4174d
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 28 deletions.
77 changes: 50 additions & 27 deletions spec/namespaces/flow_framework.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,9 @@ paths:
'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
Expand All @@ -48,11 +41,11 @@ paths:
'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
Expand All @@ -70,7 +63,7 @@ paths:
$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
Expand All @@ -82,9 +75,9 @@ paths:
- $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:
Expand Down Expand Up @@ -209,10 +202,10 @@ components:
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

View workflow job for this annotation

GitHub Actions / lint

There should be no space after '['

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

View workflow job for this annotation

GitHub Actions / lint

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

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

View workflow job for this annotation

GitHub Actions / lint

There should be no space after '['

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

View workflow job for this annotation

GitHub Actions / lint

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

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

View workflow job for this annotation

GitHub Actions / lint

There should be no space after '['

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

View workflow job for this annotation

GitHub Actions / lint

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

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

View workflow job for this annotation

GitHub Actions / lint

There should be no space after '['

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

View workflow job for this annotation

GitHub Actions / lint

There should be no space before ']'
responses:
flow_framework.create@201:
content:
Expand All @@ -225,6 +218,21 @@ components:
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

View workflow job for this annotation

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

View workflow job for this annotation

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:
Expand Down Expand Up @@ -254,7 +262,7 @@ components:
result:
type: string
description: The result of the deletion operation.
enum: [deleted, not_found]
enum: [ deleted, not_found ]
_shards:
type: object
properties:
Expand All @@ -273,7 +281,7 @@ components:
_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:
Expand Down Expand Up @@ -312,12 +320,27 @@ components:
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
Expand Up @@ -6,7 +6,7 @@ info:
paths: {}
components:
schemas:
FlowFrameworkAPIDisabledException:
FlowFrameworkAPIDisabledError:
content:
application/json:
type: object
Expand Down

0 comments on commit fb4174d

Please sign in to comment.