Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix workflow schema: change const, adding missing object; etc. #876

Merged
merged 8 commits into from
Jun 3, 2024
20 changes: 20 additions & 0 deletions examples/asyncapi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
document:
dsl: 1.0.0-alpha1
namespace: examples
name: bearer-auth
version: 1.0.0-alpha1
do:
greetUser:
call: asyncapi
with:
document:
uri: https://fake.com/docs/asyncapi.json
operationRef: findPetsByStatus
server: staging
message: getPetByStatusQuery
binding: http
payload:
petId: ${ .pet.id }
authentication:
bearer:
token: ${ .token }
18 changes: 18 additions & 0 deletions examples/use-authentication.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
document:
dsl: 1.0.0-alpha1
namespace: examples
name: bearer-auth
version: 1.0.0-alpha1
use:
authentications:
petStoreAuth:
bearer:
token: ${ .token }
do:
getPetById:
call: http
with:
method: get
endpoint:
uri: https://petstore.swagger.io/v2/pet/{petId}
authentication: petStoreAuth
31 changes: 22 additions & 9 deletions schema/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ $defs:
- properties:
call:
type: string
constant: asyncapi
const: asyncapi
with:
type: object
properties:
Expand All @@ -156,15 +156,17 @@ $defs:
type: object
description: The payload to call the AsyncAPI operation with, if any.
authentication:
ref: '#/$defs/authenticationPolicy'
description: The authentication policy, if any, to use when calling the AsyncAPI operation.
oneOf:
- $ref: '#/$defs/authenticationPolicy'
- type: string
required: [ document, operationRef ]
description: Defines the AsyncAPI call to perform.
required: [ call, with ]
- properties:
call:
type: string
constant: grpc
const: grpc
with:
type: object
properties:
Expand All @@ -187,8 +189,10 @@ $defs:
max: 65535
description: The port number of the GRPC service to call.
authentication:
$ref: '#/$defs/authenticationPolicy'
description: The endpoint's authentication policy, if any.
oneOf:
- $ref: '#/$defs/authenticationPolicy'
- type: string
required: [ name, host ]
method:
type: string
Expand All @@ -203,7 +207,7 @@ $defs:
- properties:
call:
type: string
constant: http
const: http
with:
type: object
properties:
Expand All @@ -228,7 +232,7 @@ $defs:
- properties:
call:
type: string
constant: openapi
const: openapi
with:
type: object
properties:
Expand All @@ -243,8 +247,10 @@ $defs:
additionalProperties: true
description: A name/value mapping of the parameters of the OpenAPI operation to call.
authentication:
$ref: '#/$defs/authenticationPolicy'
description: The authentication policy, if any, to use when calling the OpenAPI operation.
oneOf:
- $ref: '#/$defs/authenticationPolicy'
- type: string
output:
type: string
enum: [ raw, content, response ]
Expand All @@ -264,6 +270,7 @@ $defs:
description: A name/value mapping of the parameters, if any, to call the function with.
required: [ call ]
compositeTask:
type: object
properties:
execute:
type: object
Expand Down Expand Up @@ -291,6 +298,7 @@ $defs:
required: [ execute ]
description: Serves as a pivotal orchestrator within workflow systems, enabling the seamless integration and execution of multiple subtasks to accomplish complex operations
emitTask:
type: object
properties:
emit:
type: object
Expand Down Expand Up @@ -332,6 +340,7 @@ $defs:
default: continue
- type: string
forTask:
type: object
properties:
for:
type: object
Expand Down Expand Up @@ -668,8 +677,10 @@ $defs:
format: uri-template
description: The endpoint's URI.
authentication:
$ref: '#/$defs/authenticationPolicy'
description: The authentication policy to use.
oneOf:
- $ref: '#/$defs/authenticationPolicy'
- type: string
required: [ uri ]
eventConsumptionStrategy:
type: object
Expand Down Expand Up @@ -761,8 +772,10 @@ $defs:
format: uri
description: The endpoint's URI.
authentication:
$ref: '#/$defs/authenticationPolicy'
description: The authentication policy to use.
oneOf:
- $ref: '#/$defs/authenticationPolicy'
- type: string
name:
type: string
description: The external resource's name, if any.
Expand Down
Loading