Skip to content

Commit 5813b7f

Browse files
authored
Merge pull request #96 from tsurdilo/updateschemas
Updated schemas to latest and updated redirects
2 parents e03c0e0 + 4e9b925 commit 5813b7f

18 files changed

+3615
-57
lines changed

_redirects

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# See: https://docs.netlify.com/routing/redirects/
22
# https://docs.netlify.com/routing/redirects/redirect-options/
3-
/schemas/previous/* /schemas/0.5/:splat 200
4-
/schemas/latest/* /schemas/0.6/:splat 200
5-
/schemas/snapshot/* /schemas/0.7/:splat 200
3+
/schemas/previous/* /schemas/0.6/:splat 200
4+
/schemas/latest/* /schemas/0.7/:splat 200
5+
/schemas/snapshot/* /schemas/0.8/:splat 200
66
/services/diagrams https://diagram-service-secure-serverless-workflow.apps.kogito-cloud.automation.rhmw.io/swdiagram 200

schemas/0.7/auth.json

Lines changed: 218 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,218 @@
1+
{
2+
"$id": "https://serverlessworkflow.io/schemas/0.7/auth.json",
3+
"$schema": "http://json-schema.org/draft-07/schema#",
4+
"description": "Serverless Workflow specification - auth schema",
5+
"type": "object",
6+
"auth": {
7+
"oneOf": [
8+
{
9+
"type": "string",
10+
"format": "uri",
11+
"description": "URI to a resource containing auth definitions (json or yaml)"
12+
},
13+
{
14+
"type": "array",
15+
"description": "Workflow auth definitions",
16+
"items": {
17+
"type": "object",
18+
"$ref": "#/definitions/authdef"
19+
},
20+
"additionalItems": false,
21+
"minItems": 1
22+
}
23+
]
24+
},
25+
"required": [
26+
"auth"
27+
],
28+
"definitions": {
29+
"authdef": {
30+
"type": "object",
31+
"properties": {
32+
"name": {
33+
"type": "string",
34+
"description": "Unique auth definition name",
35+
"minLength": 1
36+
},
37+
"scheme": {
38+
"type": "string",
39+
"description": "Defines the auth type",
40+
"enum": [
41+
"basic",
42+
"bearer",
43+
"oauth2"
44+
],
45+
"default": "basic"
46+
},
47+
"properties": {
48+
"oneOf": [
49+
{
50+
"type": "string",
51+
"description": "Expression referencing a workflow secret that contains all needed auth info"
52+
},
53+
{
54+
"title": "Basic Auth Info",
55+
"$ref": "#/definitions/basicpropsdef"
56+
},
57+
{
58+
"title": "Bearer Auth Info State",
59+
"$ref": "#/definitions/beareripropsdef"
60+
},
61+
{
62+
"title": "OAuth2 Info",
63+
"$ref": "#/definitions/oauth2propsdef"
64+
}
65+
]
66+
}
67+
},
68+
"required": [
69+
"name",
70+
"properties"
71+
]
72+
},
73+
"basicpropsdef": {
74+
"oneOf": [
75+
{
76+
"type": "string",
77+
"description": "Expression referencing a workflow secret that contains all needed basic auth info"
78+
},
79+
{
80+
"type": "object",
81+
"description": "Basic auth information",
82+
"properties": {
83+
"username": {
84+
"type": "string",
85+
"description": "String or a workflow expression. Contains the user name",
86+
"minLength": 1
87+
},
88+
"password": {
89+
"type": "string",
90+
"description": "String or a workflow expression. Contains the user password",
91+
"minLength": 1
92+
},
93+
"metadata": {
94+
"$ref": "common.json#/definitions/metadata"
95+
}
96+
},
97+
"required": [
98+
"username",
99+
"password"
100+
],
101+
"additionalProperties": false
102+
}
103+
]
104+
},
105+
"beareripropsdef": {
106+
"oneOf": [
107+
{
108+
"type": "string",
109+
"description": "Expression referencing a workflow secret that contains all needed bearer auth info"
110+
},
111+
{
112+
"type": "object",
113+
"description": "Bearer auth information",
114+
"properties": {
115+
"token": {
116+
"type": "string",
117+
"description": "String or a workflow expression. Contains the token",
118+
"minLength": 1
119+
},
120+
"metadata": {
121+
"$ref": "common.json#/definitions/metadata"
122+
}
123+
},
124+
"required": [
125+
"token"
126+
],
127+
"additionalProperties": false
128+
}
129+
]
130+
},
131+
"oauth2propsdef": {
132+
"oneOf": [
133+
{
134+
"type": "string",
135+
"description": "Expression referencing a workflow secret that contains all needed OAuth2 auth info"
136+
},
137+
{
138+
"type": "object",
139+
"description": "OAuth2 information",
140+
"properties": {
141+
"authority": {
142+
"type": "string",
143+
"description": "String or a workflow expression. Contains the authority information",
144+
"minLength": 1
145+
},
146+
"grantType": {
147+
"type": "string",
148+
"description": "Defines the grant type",
149+
"enum": [
150+
"password",
151+
"clientCredentials",
152+
"tokenExchange"
153+
],
154+
"additionalItems": false
155+
},
156+
"clientId": {
157+
"type": "string",
158+
"description": "String or a workflow expression. Contains the client identifier",
159+
"minLength": 1
160+
},
161+
"clientSecret": {
162+
"type": "string",
163+
"description": "Workflow secret or a workflow expression. Contains the client secret",
164+
"minLength": 1
165+
},
166+
"scopes": {
167+
"type": "array",
168+
"description": "Array containing strings or workflow expressions. Contains the OAuth2 scopes",
169+
"items": {
170+
"type": "string"
171+
},
172+
"minItems": 1,
173+
"additionalItems": false
174+
},
175+
"username": {
176+
"type": "string",
177+
"description": "String or a workflow expression. Contains the user name. Used only if grantType is 'resourceOwner'",
178+
"minLength": 1
179+
},
180+
"password": {
181+
"type": "string",
182+
"description": "String or a workflow expression. Contains the user password. Used only if grantType is 'resourceOwner'",
183+
"minLength": 1
184+
},
185+
"audiences": {
186+
"type": "array",
187+
"description": "Array containing strings or workflow expressions. Contains the OAuth2 audiences",
188+
"items": {
189+
"type": "string"
190+
},
191+
"minItems": 1,
192+
"additionalItems": false
193+
},
194+
"subjectToken": {
195+
"type": "string",
196+
"description": "String or a workflow expression. Contains the subject token",
197+
"minLength": 1
198+
},
199+
"requestedSubject": {
200+
"type": "string",
201+
"description": "String or a workflow expression. Contains the requested subject",
202+
"minLength": 1
203+
},
204+
"requestedIssuer": {
205+
"type": "string",
206+
"description": "String or a workflow expression. Contains the requested issuer",
207+
"minLength": 1
208+
},
209+
"metadata": {
210+
"$ref": "common.json#/definitions/metadata"
211+
}
212+
},
213+
"required": ["grantType", "clientId"]
214+
}
215+
]
216+
}
217+
}
218+
}
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
{
2+
"$id": "https://serverlessworkflow.io/schemas/0.7/extensions/ratelimiting.json",
3+
"$schema": "http://json-schema.org/draft-07/schema#",
4+
"description": "Serverless Workflow specification - Various workflow rate limiting settings",
5+
"type": "object",
6+
"definitions": {
7+
"ratelimiting": {
8+
"type": "object",
9+
"description": "Serverless Workflow Rate Limiting Extension",
10+
"properties": {
11+
"extensionid": {
12+
"type": "string",
13+
"default": "workflow-ratelimiting-extension",
14+
"description": "Extension unique identifier"
15+
},
16+
"workflowid": {
17+
"type": "string",
18+
"minLength": 1,
19+
"description": "Workflow definition unique identifier (workflow id property)"
20+
},
21+
"workflowVersions": {
22+
"type": "array",
23+
"description": "Workflow versions. If not defined, applies to all workflow instances (regardless of their associated workflow version)",
24+
"items": {
25+
"type": "string"
26+
}
27+
},
28+
"singleInstance": {
29+
"description": "Rate Limit settings per single instance of a workflow with provided workflowid",
30+
"$ref": "#/definitions/ratelimits"
31+
},
32+
"allInstances": {
33+
"description": "Rate Limit settings across all instance of a workflow with provided workflowid",
34+
"$ref": "#/definitions/ratelimits"
35+
}
36+
},
37+
"required": [
38+
"extensionid",
39+
"workflowid"
40+
]
41+
},
42+
"ratelimits": {
43+
"type": "object",
44+
"properties": {
45+
"maxActionsPerSecond": {
46+
"type": "number",
47+
"default": 0,
48+
"description": "Sets the rate limiting on number of actions that can be executed per second. Notice that the number is represented as number type, so that you can set it to less than 1 if needed. For example, set the number to 0.1 means workflow actions can be executed once every 10 seconds. Default zero value means 'unlimited'"
49+
},
50+
"maxConcurrentActions": {
51+
"type": "number",
52+
"default": 100,
53+
"description": "Maximum number of actions that can be executed in parallel"
54+
},
55+
"maxProducedEventsPerSecond": {
56+
"type": "number",
57+
"default": 0,
58+
"description": "Sets the rate limiting on number of events that can be produced per second. Notice that the number is represented as number type, so that you can set it to less than 1 if needed. For example, set the number to 0.1 means workflow can produce events once every 10 seconds. Default zero value means 'unlimited'"
59+
},
60+
"maxStates": {
61+
"type": "integer",
62+
"default": 0,
63+
"description": "Maximum number of workflow states that should be executed. Default is zero, meaning unlimited."
64+
},
65+
"maxTransitions": {
66+
"type": "integer",
67+
"default": 0,
68+
"description": "Maximum number of workflow transitions that should be executed. Default is zero, meaning unlimited."
69+
}
70+
}
71+
}
72+
}
73+
}

schemas/0.7/functions.json

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,29 @@
3636
},
3737
"operation": {
3838
"type": "string",
39-
"description": "If type is `rest`, <path_to_openapi_definition>#<operation_id>. If type is `rpc`, <path_to_grpc_proto_file>#<service_name>#<service_method>. If type is `graphql`, <url_to_graphql_endpoint>#<literal \"mutation\" or \"query\">#<query_or_mutation_name>. If type is `expression`, defines the workflow expression.",
39+
"description": "If type is `rest`, <path_to_openapi_definition>#<operation_id>. If type is `asyncapi`, <path_to_asyncapi_definition>#<operation_id>. If type is `rpc`, <path_to_grpc_proto_file>#<service_name>#<service_method>. If type is `graphql`, <url_to_graphql_endpoint>#<literal \\\"mutation\\\" or \\\"query\\\">#<query_or_mutation_name>. If type is `odata`, <URI_to_odata_service>#<Entity_Set_Name>. If type is `expression`, defines the workflow expression.",
4040
"minLength": 1
4141
},
4242
"type": {
4343
"type": "string",
44-
"description": "Defines the function type. Is either `rest`, `rpc`, `graphql` or `expression`. Default is `rest`",
44+
"description": "Defines the function type. Is either `rest`, `asyncapi, `rpc`, `graphql`, `odata`, or `expression`. Default is `rest`",
4545
"enum": [
4646
"rest",
47+
"asyncapi",
4748
"rpc",
4849
"graphql",
50+
"odata",
4951
"expression"
5052
],
5153
"default": "rest"
54+
},
55+
"authRef": {
56+
"type": "string",
57+
"description": "References an auth definition name to be used to access to resource defined in the operation parameter",
58+
"minLength": 1
59+
},
60+
"metadata": {
61+
"$ref": "common.json#/definitions/metadata"
5262
}
5363
},
5464
"additionalProperties": false,

0 commit comments

Comments
 (0)