Store workflow definitions as table rows and drop YAML
This commit is contained in:
+6
-13
@@ -1233,28 +1233,21 @@ paths:
|
||||
operationId: getWorkflow
|
||||
responses:
|
||||
"200":
|
||||
description: >
|
||||
The workflow's WorkflowDefinition: as JSON when the request accepts only application/json, else its file as
|
||||
YAML, as an attachment named after it.
|
||||
description: The workflow's definition.
|
||||
content:
|
||||
application/yaml:
|
||||
schema: { type: string }
|
||||
application/json:
|
||||
schema: { $ref: "#/components/schemas/WorkflowDefinition" }
|
||||
"404": { $ref: "#/components/responses/Error" }
|
||||
put:
|
||||
operationId: putWorkflow
|
||||
description: >
|
||||
Creates or replaces the workflow from its file, a WorkflowDefinition as YAML or JSON. The name is one line of
|
||||
1 to 100 characters. Tasks that already froze the workflow keep their copy. With from, it renames workflow
|
||||
Creates or replaces the workflow from its definition. The name is one line of 1 to 100 characters. Tasks that already froze the workflow keep their copy. With from, it renames workflow
|
||||
from to name, which must not be taken, and projects that review with from review with name instead.
|
||||
parameters:
|
||||
- { name: from, in: query, required: false, schema: { type: string } }
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/yaml:
|
||||
schema: { type: string }
|
||||
application/json:
|
||||
schema: { $ref: "#/components/schemas/WorkflowDefinition" }
|
||||
responses:
|
||||
@@ -1479,9 +1472,9 @@ components:
|
||||
WorkflowDefinition:
|
||||
type: object
|
||||
description: >
|
||||
A workflow's file, which holds everything but its name: its steps, run in order. Run on a brief, each stage
|
||||
runs as its own task once the steps before it have finished; as a project's review workflow, each stage is a
|
||||
reviewer of a snapshot and gets the earlier stages' reviews. Sent and returned as YAML.
|
||||
A workflow's definition, which holds everything but its name: its steps, run in order. Run on a brief, each
|
||||
stage runs as its own task once the steps before it have finished; as a project's review workflow, each stage
|
||||
is a reviewer of a snapshot and gets the earlier stages' reviews.
|
||||
required: [steps]
|
||||
properties:
|
||||
description: { type: string, x-go-type-skip-optional-pointer: true }
|
||||
@@ -1528,7 +1521,7 @@ components:
|
||||
required: [name, definition]
|
||||
properties:
|
||||
name: { type: string }
|
||||
definition: { type: string, description: The WorkflowDefinition as YAML. }
|
||||
definition: { $ref: "#/components/schemas/WorkflowDefinition" }
|
||||
|
||||
WorkflowRun:
|
||||
type: object
|
||||
|
||||
Reference in New Issue
Block a user