Skip to content

Commit ea32e49

Browse files
Merge branch 'serverlessworkflow:main' into matthias-pichler/remove-reliance-875
2 parents bb7a0d8 + cad3d64 commit ea32e49

File tree

3 files changed

+60
-9
lines changed

3 files changed

+60
-9
lines changed

examples/asyncapi.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
document:
2+
dsl: 1.0.0-alpha1
3+
namespace: examples
4+
name: bearer-auth
5+
version: 1.0.0-alpha1
6+
do:
7+
greetUser:
8+
call: asyncapi
9+
with:
10+
document:
11+
uri: https://fake.com/docs/asyncapi.json
12+
operationRef: findPetsByStatus
13+
server: staging
14+
message: getPetByStatusQuery
15+
binding: http
16+
payload:
17+
petId: ${ .pet.id }
18+
authentication:
19+
bearer:
20+
token: ${ .token }

examples/use-authentication.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
document:
2+
dsl: 1.0.0-alpha1
3+
namespace: examples
4+
name: bearer-auth
5+
version: 1.0.0-alpha1
6+
use:
7+
authentications:
8+
petStoreAuth:
9+
bearer:
10+
token: ${ .token }
11+
do:
12+
getPetById:
13+
call: http
14+
with:
15+
method: get
16+
endpoint:
17+
uri: https://petstore.swagger.io/v2/pet/{petId}
18+
authentication: petStoreAuth

schema/workflow.yaml

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ $defs:
136136
- properties:
137137
call:
138138
type: string
139-
constant: asyncapi
139+
const: asyncapi
140140
with:
141141
type: object
142142
properties:
@@ -159,15 +159,17 @@ $defs:
159159
type: object
160160
description: The payload to call the AsyncAPI operation with, if any.
161161
authentication:
162-
ref: '#/$defs/authenticationPolicy'
163162
description: The authentication policy, if any, to use when calling the AsyncAPI operation.
163+
oneOf:
164+
- $ref: '#/$defs/authenticationPolicy'
165+
- type: string
164166
required: [ document, operationRef ]
165167
description: Defines the AsyncAPI call to perform.
166168
required: [ call, with ]
167169
- properties:
168170
call:
169171
type: string
170-
constant: grpc
172+
const: grpc
171173
with:
172174
type: object
173175
properties:
@@ -190,8 +192,10 @@ $defs:
190192
max: 65535
191193
description: The port number of the GRPC service to call.
192194
authentication:
193-
$ref: '#/$defs/authenticationPolicy'
194195
description: The endpoint's authentication policy, if any.
196+
oneOf:
197+
- $ref: '#/$defs/authenticationPolicy'
198+
- type: string
195199
required: [ name, host ]
196200
method:
197201
type: string
@@ -206,7 +210,7 @@ $defs:
206210
- properties:
207211
call:
208212
type: string
209-
constant: http
213+
const: http
210214
with:
211215
type: object
212216
properties:
@@ -231,7 +235,7 @@ $defs:
231235
- properties:
232236
call:
233237
type: string
234-
constant: openapi
238+
const: openapi
235239
with:
236240
type: object
237241
properties:
@@ -246,8 +250,10 @@ $defs:
246250
additionalProperties: true
247251
description: A name/value mapping of the parameters of the OpenAPI operation to call.
248252
authentication:
249-
$ref: '#/$defs/authenticationPolicy'
250253
description: The authentication policy, if any, to use when calling the OpenAPI operation.
254+
oneOf:
255+
- $ref: '#/$defs/authenticationPolicy'
256+
- type: string
251257
output:
252258
type: string
253259
enum: [ raw, content, response ]
@@ -267,6 +273,7 @@ $defs:
267273
description: A name/value mapping of the parameters, if any, to call the function with.
268274
required: [ call ]
269275
compositeTask:
276+
type: object
270277
properties:
271278
execute:
272279
type: object
@@ -294,6 +301,7 @@ $defs:
294301
required: [ execute ]
295302
description: Serves as a pivotal orchestrator within workflow systems, enabling the seamless integration and execution of multiple subtasks to accomplish complex operations
296303
emitTask:
304+
type: object
297305
properties:
298306
emit:
299307
type: object
@@ -335,6 +343,7 @@ $defs:
335343
default: continue
336344
- type: string
337345
forTask:
346+
type: object
338347
properties:
339348
for:
340349
type: object
@@ -674,8 +683,10 @@ $defs:
674683
format: uri-template
675684
description: The endpoint's URI.
676685
authentication:
677-
$ref: '#/$defs/authenticationPolicy'
678686
description: The authentication policy to use.
687+
oneOf:
688+
- $ref: '#/$defs/authenticationPolicy'
689+
- type: string
679690
required: [ uri ]
680691
eventConsumptionStrategy:
681692
type: object
@@ -770,8 +781,10 @@ $defs:
770781
format: uri
771782
description: The endpoint's URI.
772783
authentication:
773-
$ref: '#/$defs/authenticationPolicy'
774784
description: The authentication policy to use.
785+
oneOf:
786+
- $ref: '#/$defs/authenticationPolicy'
787+
- type: string
775788
name:
776789
type: string
777790
description: The external resource's name, if any.

0 commit comments

Comments
 (0)