Skip to content

[Fix_#514] Ignore nodes that only has required #515

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

Merged
merged 1 commit into from
Jan 15, 2025
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
273 changes: 239 additions & 34 deletions api/src/main/resources/schema/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -241,33 +241,42 @@ $defs:
properties:
document:
$ref: '#/$defs/externalResource'
title: WithAsyncAPIDocument
title: AsyncAPIDocument
description: The document that defines the AsyncAPI operation to call.
operationRef:
channel:
type: string
title: WithAsyncAPIOperation
title: With
description: The name of the channel on which to perform the operation. Used only in case the referenced document uses AsyncAPI v2.6.0.
operation:
type: string
title: AsyncAPIOperation
description: A reference to the AsyncAPI operation to call.
server:
$ref: '#/$defs/asyncApiServer'
title: AsyncAPIServer
description: An object used to configure to the server to call the specified AsyncAPI operation on.
protocol:
type: string
title: WithAsyncAPIServer
description: A a reference to the server to call the specified AsyncAPI operation on. If not set, default to the first server matching the operation's channel.
title: AsyncApiProtocol
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't API be capitalized as the others? AsyncAPIProtocol

description: The protocol to use to select the target server.
enum: [ amqp, amqp1, anypointmq, googlepubsub, http, ibmmq, jms, kafka, mercure, mqtt, mqtt5, nats, pulsar, redis, sns, solace, sqs, stomp, ws ]
message:
type: string
title: WithAsyncAPIMessage
description: The name of the message to use. If not set, defaults to the first message defined by the operation.
binding:
type: string
title: WithAsyncAPIBinding
description: The name of the binding to use. If not set, defaults to the first binding defined by the operation.
payload:
type: object
title: WithAsyncAPIPayload
description: The payload to call the AsyncAPI operation with, if any.
$ref: '#/$defs/asyncApiOutboundMessage'
title: AsyncApiMessage
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

description: An object used to configure the message to publish using the target operation.
subscription:
$ref: '#/$defs/asyncApiSubscription'
title: AsyncApiSubscription
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

description: An object used to configure the subscription to messages consumed using the target operation.
authentication:
$ref: '#/$defs/referenceableAuthenticationPolicy'
title: WithAsyncAPIAuthentication
title: AsyncAPIAuthentication
description: The authentication policy, if any, to use when calling the AsyncAPI operation.
required: [ document, operationRef ]
oneOf:
- required: [ document, operation, message ]
- required: [ document, operation, subscription ]
- required: [ document, channel, message ]
- required: [ document, channel, subscription ]
unevaluatedProperties: false
- title: CallGRPC
description: Defines the GRPC call to perform.
Expand Down Expand Up @@ -341,29 +350,33 @@ $defs:
properties:
method:
type: string
title: WithHTTPMethod
title: HTTPMethod
description: The HTTP method of the HTTP request to perform.
endpoint:
title: WithHTTPEndpoint
title: HTTPEndpoint
description: The HTTP endpoint to send the request to.
$ref: '#/$defs/endpoint'
headers:
type: object
title: WithHTTPHeaders
title: HTTPHeaders
description: A name/value mapping of the headers, if any, of the HTTP request to perform.
body:
title: WithHTTPBody
title: HTTPBody
description: The body, if any, of the HTTP request to perform.
query:
type: object
title: WithHTTPQuery
title: HTTPQuery
description: A name/value mapping of the query parameters, if any, of the HTTP request to perform.
additionalProperties: true
output:
type: string
title: WithHTTPOutput
title: HTTPOutput
description: The http call output format. Defaults to 'content'.
enum: [ raw, content, response ]
redirect:
type: boolean
title: HttpRedirect
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HTTPRedirect?

description: Specifies whether redirection status codes (`300–399`) should be treated as errors.
required: [ method, endpoint ]
unevaluatedProperties: false
- title: CallOpenAPI
Expand Down Expand Up @@ -403,6 +416,10 @@ $defs:
enum: [ raw, content, response ]
title: WithOpenAPIOutput
description: The http call output format. Defaults to 'content'.
redirect:
type: boolean
title: HttpRedirect
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

description: Specifies whether redirection status codes (`300–399`) should be treated as errors.
required: [ document, operationId ]
unevaluatedProperties: false
- title: CallFunction
Expand Down Expand Up @@ -482,6 +499,10 @@ $defs:
description: Defines the properties of event to emit.
required: [ source, type ]
additionalProperties: true
cc:
$ref: '#/$defs/endpoint'
title: EmitCarbonCopyDefinition
description: Defines an additional endpoint, if any, to publish an event's carbon copy to.
required: [ event ]
forTask:
type: object
Expand Down Expand Up @@ -581,6 +602,12 @@ $defs:
default: true
title: AwaitProcessCompletion
description: Whether to await the process completion before continuing.
return:
type: string
title: ProcessReturnType
description: Configures the output of the process.
enum: [ stdout, stderr, code, all, none ]
default: stdout
oneOf:
- title: RunContainer
description: Enables the execution of external processes encapsulated within a containerized environment.
Expand All @@ -595,6 +622,10 @@ $defs:
type: string
title: ContainerImage
description: The name of the container image to run.
name:
type: string
title: ContainerName
description: A runtime expression, if any, used to give specific name to the container.
command:
type: string
title: ContainerCommand
Expand All @@ -611,6 +642,10 @@ $defs:
type: object
title: ContainerEnvironment
description: A key/value mapping of the environment variables, if any, to use when running the configured process.
lifetime:
$ref: '#/$defs/containerLifetime'
title: ContainerLifetime
description: An object, if any, used to configure the container's lifetime
required: [ image ]
required: [ container ]
- title: RunScript
Expand Down Expand Up @@ -1257,6 +1292,12 @@ $defs:
- title: ExpressionDataSchema
$ref: '#/$defs/runtimeExpression'
description: An expression based event data schema.
data:
title: EventData
description: The event's payload data
anyOf:
- $ref: '#/$defs/runtimeExpression'
- {}
additionalProperties: true
eventConsumptionStrategy:
type: object
Expand All @@ -1274,14 +1315,47 @@ $defs:
$ref: '#/$defs/eventFilter'
required: [ all ]
- title: AnyEventConsumptionStrategy
properties:
any:
type: array
title: AnyEventConsumptionStrategyConfiguration
description: A list containing any of the events to consume.
items:
$ref: '#/$defs/eventFilter'
required: [ any ]
oneOf:
- properties:
any:
type: array
title: AnyEventConsumptionStrategyConfiguration
description: A list containing any of the events to consume.
items:
$ref: '#/$defs/eventFilter'
minItems: 1
until:
oneOf:
- type: string
title: AnyEventUntilCondition
description: A runtime expression condition evaluated after consuming an event and which determines whether or not to continue listening.
- allOf:
- $ref: '#/$defs/eventConsumptionStrategy'
title: AnyEventUntilConsumed
description: The strategy that defines the event(s) to consume to stop listening.
- properties:
until: false
required: [ any ]
- properties:
any:
type: array
title: AnyEventConsumptionStrategyConfiguration
description: A list containing any of the events to consume.
items:
$ref: '#/$defs/eventFilter'
maxItems: 0
until:
oneOf:
- type: string
title: AnyEventUntilCondition
description: A runtime expression condition evaluated after consuming an event and which determines whether or not to continue listening.
- allOf:
- $ref: '#/$defs/eventConsumptionStrategy'
title: AnyEventUntilConsumed
description: The strategy that defines the event(s) to consume to stop listening.
- properties:
until: false
required: [ any, until ]
- title: OneEventConsumptionStrategy
properties:
one:
Expand Down Expand Up @@ -1522,16 +1596,147 @@ $defs:
catalog:
type: object
title: Catalog
description: The definition of a resource catalog
description: The definition of a resource catalog.
unevaluatedProperties: false
properties:
endpoint:
$ref: '#/$defs/endpoint'
title: CatalogEndpoint
description: The root URL where the catalog is hosted
description: The root URL where the catalog is hosted.
required: [ endpoint ]
runtimeExpression:
type: string
title: RuntimeExpression
description: A runtime expression.
pattern: "^\\s*\\$\\{.+\\}\\s*$"
containerLifetime:
type: object
title: ContainerLifetime
description: The configuration of a container's lifetime
unevaluatedProperties: false
properties:
cleanup:
type: string
title: ContainerCleanupPolicy
description: The container cleanup policy to use
enum: [ always, never, eventually ]
default: never
after:
$ref: '#/$defs/duration'
title: ContainerLifetimeDuration
description: The duration after which to cleanup the container, in case the cleanup policy has been set to 'eventually'
required: [ cleanup ]
if:
properties:
cleanup:
const: eventually
then:
required: [ after ]
else:
not:
required: [ after ]
processResult:
type: object
title: ProcessResult
description: The object returned by a run task when its return type has been set 'all'.
unevaluatedProperties: false
properties:
code:
type: integer
title: ProcessExitCode
description: The process's exit code.
stdout:
type: string
title: ProcessStandardOutput
description: The content of the process's STDOUT.
stderr:
type: string
title: ProcessStandardError
description: The content of the process's STDERR.
required: [ code, stdout, stderr ]
asyncApiServer:
type: object
title: AsyncApiServer
description: Configures the target server of an AsyncAPI operation.
unevaluatedProperties: false
properties:
name:
type: string
title: AsyncApiServerName
description: The target server's name.
variables:
type: object
title: AsyncApiServerVariables
description: The target server's variables, if any.
required: [ name ]
asyncApiOutboundMessage:
type: object
title: AsyncApiOutboundMessage
description: An object used to configure the message to publish using the target operation.
unevaluatedProperties: false
properties:
payload:
type: object
title: AsyncApiMessagePayload
description: The message's payload, if any.
additionalProperties: true
headers:
type: object
title: AsyncApiMessageHeaders
description: The message's headers, if any.
additionalProperties: true
asyncApiInboundMessage:
type: object
title: AsyncApiInboundMessage
description: Represents a message counsumed by an AsyncAPI subscription.
allOf:
- $ref: '#/$defs/asyncApiOutboundMessage'
properties:
correlationId:
type: string
title: AsyncApiMessageCorrelationId
description: The message's correlation id, if any.
asyncApiSubscription:
type: object
title: AsyncApiSubscription
description: An object used to configure the subscription to messages consumed using the target operation.
unevaluatedProperties: false
properties:
filter:
$ref: '#/$defs/runtimeExpression'
title: AsyncApiSubscriptionCorrelation
description: A runtime expression, if any, used to filter consumed messages.
consume:
$ref: '#/$defs/asyncApiMessageConsumptionPolicy'
title: AsyncApiMessageConsumptionPolicy
description: An object used to configure the subscription's message consumption policy.
required: [ consume ]
asyncApiMessageConsumptionPolicy:
type: object
title: AsyncApiMessageConsumptionPolicy
description: An object used to configure a subscription's message consumption policy.
unevaluatedProperties: false
properties:
for:
$ref: '#/$defs/duration'
title: AsyncApiMessageConsumptionPolicyFor
description: Specifies the time period over which messages will be consumed.
oneOf:
- properties:
amount:
type: integer
title: AsyncApiMessageConsumptionPolicyAmount
description: The amount of (filtered) messages to consume before disposing of the subscription.
required: [ amount ]
- properties:
while:
$ref: '#/$defs/runtimeExpression'
title: AsyncApiMessageConsumptionPolicyWhile
description: A runtime expression evaluated after each consumed (filtered) message to decide if message consumption should continue.
required: [ while ]
- properties:
until:
$ref: '#/$defs/runtimeExpression'
title: AsyncApiMessageConsumptionPolicyUntil
description: A runtime expression evaluated before each consumed (filtered) message to decide if message consumption should continue.
required: [ until ]
Loading
Loading