Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions schema/events.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,19 @@
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Serverless Workflow specification - events schema",
"type": "object",
"definitions": {
"events": {
"type": "array",
"description": "Workflow CloudEvent definitions. Defines CloudEvents that can be consumed or produced",
"items": {
"type": "object",
"$ref": "#/definitions/eventdef"
}
"events": {
"type": "array",
"description": "Workflow CloudEvent definitions. Defines CloudEvents that can be consumed or produced",
"items": {
"type": "object",
"$ref": "#/definitions/eventdef"
},
"minItems": 1
},
"required": [
"events"
],
"definitions": {
"eventdef": {
"type": "object",
"properties": {
Expand Down
21 changes: 12 additions & 9 deletions schema/functions.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,19 @@
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Serverless Workflow specification - functions schema",
"type": "object",
"definitions": {
"functions": {
"type": "array",
"description": "Workflow function definitions",
"items": {
"type": "object",
"$ref": "#/definitions/function"
},
"minLength": 1
"functions": {
"type": "array",
"description": "Workflow function definitions",
"items": {
"type": "object",
"$ref": "#/definitions/function"
},
"minItems": 1
},
"required": [
"functions"
],
"definitions": {
"function": {
"type": "object",
"properties": {
Expand Down
276 changes: 188 additions & 88 deletions schema/workflow.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,96 +3,196 @@
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Serverless Workflow specification - workflow schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Workflow unique identifier",
"minLength": 1
},
"name": {
"type": "string",
"description": "Workflow name",
"minLength": 1
},
"description": {
"type": "string",
"description": "Workflow description"
},
"version": {
"type": "string",
"description": "Workflow version",
"minLength": 1
},
"schemaVersion": {
"type": "string",
"description": "Serverless Workflow schema version",
"minLength": 1
},
"dataInputSchema": {
"type": "string",
"format": "uri",
"description": "URI to JSON Schema that workflow data input adheres to"
},
"dataOutputSchema": {
"type": "string",
"format": "uri",
"description": "URI to JSON Schema that workflow data output adheres to"
},
"metadata": {
"$ref": "common.json#/definitions/metadata"
},
"events": {
"$ref": "events.json#/definitions/events"
},
"functions": {
"$ref": "functions.json#/definitions/functions"
},
"states": {
"type": "array",
"description": "State definitions",
"items": {
"anyOf": [
{
"title": "Delay State",
"$ref": "#/definitions/delaystate"
},
{
"title": "Event State",
"$ref": "#/definitions/eventstate"
},
{
"title": "Operation State",
"$ref": "#/definitions/operationstate"
},
{
"title": "Parallel State",
"$ref": "#/definitions/parallelstate"
},
{
"title": "Switch State",
"$ref": "#/definitions/switchstate"
},
{
"title": "SubFlow State",
"$ref": "#/definitions/subflowstate"
},
{
"title": "Inject State",
"$ref": "#/definitions/injectstate"
"oneOf": [
{
"properties": {
"id": {
"type": "string",
"description": "Workflow unique identifier",
"minLength": 1
},
"name": {
"type": "string",
"description": "Workflow name",
"minLength": 1
},
"description": {
"type": "string",
"description": "Workflow description"
},
"version": {
"type": "string",
"description": "Workflow version",
"minLength": 1
},
"schemaVersion": {
"type": "string",
"description": "Serverless Workflow schema version",
"minLength": 1
},
"dataInputSchema": {
"type": "string",
"format": "uri",
"description": "URI to JSON Schema that workflow data input adheres to"
},
"dataOutputSchema": {
"type": "string",
"format": "uri",
"description": "URI to JSON Schema that workflow data output adheres to"
},
"metadata": {
"$ref": "common.json#/definitions/metadata"
},
"events": {
"$ref": "events.json#/events"
},
"functions": {
"$ref": "functions.json#/functions"
},
"states": {
"type": "array",
"description": "State definitions",
"items": {
"anyOf": [
{
"title": "Delay State",
"$ref": "#/definitions/delaystate"
},
{
"title": "Event State",
"$ref": "#/definitions/eventstate"
},
{
"title": "Operation State",
"$ref": "#/definitions/operationstate"
},
{
"title": "Parallel State",
"$ref": "#/definitions/parallelstate"
},
{
"title": "Switch State",
"$ref": "#/definitions/switchstate"
},
{
"title": "SubFlow State",
"$ref": "#/definitions/subflowstate"
},
{
"title": "Inject State",
"$ref": "#/definitions/injectstate"
},
{
"title": "ForEach State",
"$ref": "#/definitions/foreachstate"
},
{
"title": "Callback State",
"$ref": "#/definitions/callbackstate"
}
]
},
{
"title": "ForEach State",
"$ref": "#/definitions/foreachstate"
"minItems": 1
}
}
},
{
"properties": {
"id": {
"type": "string",
"description": "Workflow unique identifier",
"minLength": 1
},
"name": {
"type": "string",
"description": "Workflow name",
"minLength": 1
},
"description": {
"type": "string",
"description": "Workflow description"
},
"version": {
"type": "string",
"description": "Workflow version",
"minLength": 1
},
"schemaVersion": {
"type": "string",
"description": "Serverless Workflow schema version",
"minLength": 1
},
"dataInputSchema": {
"type": "string",
"format": "uri",
"description": "URI to JSON Schema that workflow data input adheres to"
},
"dataOutputSchema": {
"type": "string",
"format": "uri",
"description": "URI to JSON Schema that workflow data output adheres to"
},
"metadata": {
"$ref": "common.json#/definitions/metadata"
},
"events": {
"type": "string",
"format": "uri",
"description": "URI to a resource containing event definitions (json or yaml)"
},
"functions": {
"type": "string",
"format": "uri",
"description": "URI to a resource containing function definitions (json or yaml)"
},
"states": {
"type": "array",
"description": "State definitions",
"items": {
"anyOf": [
{
"title": "Delay State",
"$ref": "#/definitions/delaystate"
},
{
"title": "Event State",
"$ref": "#/definitions/eventstate"
},
{
"title": "Operation State",
"$ref": "#/definitions/operationstate"
},
{
"title": "Parallel State",
"$ref": "#/definitions/parallelstate"
},
{
"title": "Switch State",
"$ref": "#/definitions/switchstate"
},
{
"title": "SubFlow State",
"$ref": "#/definitions/subflowstate"
},
{
"title": "Inject State",
"$ref": "#/definitions/injectstate"
},
{
"title": "ForEach State",
"$ref": "#/definitions/foreachstate"
},
{
"title": "Callback State",
"$ref": "#/definitions/callbackstate"
}
]
},
{
"title": "Callback State",
"$ref": "#/definitions/callbackstate"
}
]
},
"minLength": 1
"minItems": 1
}
}
}
},
],
"required": [
"id",
"name",
Expand Down Expand Up @@ -1756,4 +1856,4 @@
"required": []
}
}
}
}
Loading