Skip to content

Commit dd272e3

Browse files
authored
Merge pull request #515 from fjtirado/Fix_#514
[Fix_#514] Ignore nodes that only has required
2 parents 5cc3044 + 0c3b01f commit dd272e3

File tree

2 files changed

+260
-48
lines changed

2 files changed

+260
-48
lines changed

api/src/main/resources/schema/workflow.yaml

Lines changed: 239 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -241,33 +241,42 @@ $defs:
241241
properties:
242242
document:
243243
$ref: '#/$defs/externalResource'
244-
title: WithAsyncAPIDocument
244+
title: AsyncAPIDocument
245245
description: The document that defines the AsyncAPI operation to call.
246-
operationRef:
246+
channel:
247247
type: string
248-
title: WithAsyncAPIOperation
248+
title: With
249+
description: The name of the channel on which to perform the operation. Used only in case the referenced document uses AsyncAPI v2.6.0.
250+
operation:
251+
type: string
252+
title: AsyncAPIOperation
249253
description: A reference to the AsyncAPI operation to call.
250254
server:
255+
$ref: '#/$defs/asyncApiServer'
256+
title: AsyncAPIServer
257+
description: An object used to configure to the server to call the specified AsyncAPI operation on.
258+
protocol:
251259
type: string
252-
title: WithAsyncAPIServer
253-
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.
260+
title: AsyncApiProtocol
261+
description: The protocol to use to select the target server.
262+
enum: [ amqp, amqp1, anypointmq, googlepubsub, http, ibmmq, jms, kafka, mercure, mqtt, mqtt5, nats, pulsar, redis, sns, solace, sqs, stomp, ws ]
254263
message:
255-
type: string
256-
title: WithAsyncAPIMessage
257-
description: The name of the message to use. If not set, defaults to the first message defined by the operation.
258-
binding:
259-
type: string
260-
title: WithAsyncAPIBinding
261-
description: The name of the binding to use. If not set, defaults to the first binding defined by the operation.
262-
payload:
263-
type: object
264-
title: WithAsyncAPIPayload
265-
description: The payload to call the AsyncAPI operation with, if any.
264+
$ref: '#/$defs/asyncApiOutboundMessage'
265+
title: AsyncApiMessage
266+
description: An object used to configure the message to publish using the target operation.
267+
subscription:
268+
$ref: '#/$defs/asyncApiSubscription'
269+
title: AsyncApiSubscription
270+
description: An object used to configure the subscription to messages consumed using the target operation.
266271
authentication:
267272
$ref: '#/$defs/referenceableAuthenticationPolicy'
268-
title: WithAsyncAPIAuthentication
273+
title: AsyncAPIAuthentication
269274
description: The authentication policy, if any, to use when calling the AsyncAPI operation.
270-
required: [ document, operationRef ]
275+
oneOf:
276+
- required: [ document, operation, message ]
277+
- required: [ document, operation, subscription ]
278+
- required: [ document, channel, message ]
279+
- required: [ document, channel, subscription ]
271280
unevaluatedProperties: false
272281
- title: CallGRPC
273282
description: Defines the GRPC call to perform.
@@ -341,29 +350,33 @@ $defs:
341350
properties:
342351
method:
343352
type: string
344-
title: WithHTTPMethod
353+
title: HTTPMethod
345354
description: The HTTP method of the HTTP request to perform.
346355
endpoint:
347-
title: WithHTTPEndpoint
356+
title: HTTPEndpoint
348357
description: The HTTP endpoint to send the request to.
349358
$ref: '#/$defs/endpoint'
350359
headers:
351360
type: object
352-
title: WithHTTPHeaders
361+
title: HTTPHeaders
353362
description: A name/value mapping of the headers, if any, of the HTTP request to perform.
354363
body:
355-
title: WithHTTPBody
364+
title: HTTPBody
356365
description: The body, if any, of the HTTP request to perform.
357366
query:
358367
type: object
359-
title: WithHTTPQuery
368+
title: HTTPQuery
360369
description: A name/value mapping of the query parameters, if any, of the HTTP request to perform.
361370
additionalProperties: true
362371
output:
363372
type: string
364-
title: WithHTTPOutput
373+
title: HTTPOutput
365374
description: The http call output format. Defaults to 'content'.
366375
enum: [ raw, content, response ]
376+
redirect:
377+
type: boolean
378+
title: HttpRedirect
379+
description: Specifies whether redirection status codes (`300–399`) should be treated as errors.
367380
required: [ method, endpoint ]
368381
unevaluatedProperties: false
369382
- title: CallOpenAPI
@@ -403,6 +416,10 @@ $defs:
403416
enum: [ raw, content, response ]
404417
title: WithOpenAPIOutput
405418
description: The http call output format. Defaults to 'content'.
419+
redirect:
420+
type: boolean
421+
title: HttpRedirect
422+
description: Specifies whether redirection status codes (`300–399`) should be treated as errors.
406423
required: [ document, operationId ]
407424
unevaluatedProperties: false
408425
- title: CallFunction
@@ -482,6 +499,10 @@ $defs:
482499
description: Defines the properties of event to emit.
483500
required: [ source, type ]
484501
additionalProperties: true
502+
cc:
503+
$ref: '#/$defs/endpoint'
504+
title: EmitCarbonCopyDefinition
505+
description: Defines an additional endpoint, if any, to publish an event's carbon copy to.
485506
required: [ event ]
486507
forTask:
487508
type: object
@@ -581,6 +602,12 @@ $defs:
581602
default: true
582603
title: AwaitProcessCompletion
583604
description: Whether to await the process completion before continuing.
605+
return:
606+
type: string
607+
title: ProcessReturnType
608+
description: Configures the output of the process.
609+
enum: [ stdout, stderr, code, all, none ]
610+
default: stdout
584611
oneOf:
585612
- title: RunContainer
586613
description: Enables the execution of external processes encapsulated within a containerized environment.
@@ -595,6 +622,10 @@ $defs:
595622
type: string
596623
title: ContainerImage
597624
description: The name of the container image to run.
625+
name:
626+
type: string
627+
title: ContainerName
628+
description: A runtime expression, if any, used to give specific name to the container.
598629
command:
599630
type: string
600631
title: ContainerCommand
@@ -611,6 +642,10 @@ $defs:
611642
type: object
612643
title: ContainerEnvironment
613644
description: A key/value mapping of the environment variables, if any, to use when running the configured process.
645+
lifetime:
646+
$ref: '#/$defs/containerLifetime'
647+
title: ContainerLifetime
648+
description: An object, if any, used to configure the container's lifetime
614649
required: [ image ]
615650
required: [ container ]
616651
- title: RunScript
@@ -1257,6 +1292,12 @@ $defs:
12571292
- title: ExpressionDataSchema
12581293
$ref: '#/$defs/runtimeExpression'
12591294
description: An expression based event data schema.
1295+
data:
1296+
title: EventData
1297+
description: The event's payload data
1298+
anyOf:
1299+
- $ref: '#/$defs/runtimeExpression'
1300+
- {}
12601301
additionalProperties: true
12611302
eventConsumptionStrategy:
12621303
type: object
@@ -1274,14 +1315,47 @@ $defs:
12741315
$ref: '#/$defs/eventFilter'
12751316
required: [ all ]
12761317
- title: AnyEventConsumptionStrategy
1277-
properties:
1278-
any:
1279-
type: array
1280-
title: AnyEventConsumptionStrategyConfiguration
1281-
description: A list containing any of the events to consume.
1282-
items:
1283-
$ref: '#/$defs/eventFilter'
1284-
required: [ any ]
1318+
oneOf:
1319+
- properties:
1320+
any:
1321+
type: array
1322+
title: AnyEventConsumptionStrategyConfiguration
1323+
description: A list containing any of the events to consume.
1324+
items:
1325+
$ref: '#/$defs/eventFilter'
1326+
minItems: 1
1327+
until:
1328+
oneOf:
1329+
- type: string
1330+
title: AnyEventUntilCondition
1331+
description: A runtime expression condition evaluated after consuming an event and which determines whether or not to continue listening.
1332+
- allOf:
1333+
- $ref: '#/$defs/eventConsumptionStrategy'
1334+
title: AnyEventUntilConsumed
1335+
description: The strategy that defines the event(s) to consume to stop listening.
1336+
- properties:
1337+
until: false
1338+
required: [ any ]
1339+
- properties:
1340+
any:
1341+
type: array
1342+
title: AnyEventConsumptionStrategyConfiguration
1343+
description: A list containing any of the events to consume.
1344+
items:
1345+
$ref: '#/$defs/eventFilter'
1346+
maxItems: 0
1347+
until:
1348+
oneOf:
1349+
- type: string
1350+
title: AnyEventUntilCondition
1351+
description: A runtime expression condition evaluated after consuming an event and which determines whether or not to continue listening.
1352+
- allOf:
1353+
- $ref: '#/$defs/eventConsumptionStrategy'
1354+
title: AnyEventUntilConsumed
1355+
description: The strategy that defines the event(s) to consume to stop listening.
1356+
- properties:
1357+
until: false
1358+
required: [ any, until ]
12851359
- title: OneEventConsumptionStrategy
12861360
properties:
12871361
one:
@@ -1522,16 +1596,147 @@ $defs:
15221596
catalog:
15231597
type: object
15241598
title: Catalog
1525-
description: The definition of a resource catalog
1599+
description: The definition of a resource catalog.
15261600
unevaluatedProperties: false
15271601
properties:
15281602
endpoint:
15291603
$ref: '#/$defs/endpoint'
15301604
title: CatalogEndpoint
1531-
description: The root URL where the catalog is hosted
1605+
description: The root URL where the catalog is hosted.
15321606
required: [ endpoint ]
15331607
runtimeExpression:
15341608
type: string
15351609
title: RuntimeExpression
15361610
description: A runtime expression.
15371611
pattern: "^\\s*\\$\\{.+\\}\\s*$"
1612+
containerLifetime:
1613+
type: object
1614+
title: ContainerLifetime
1615+
description: The configuration of a container's lifetime
1616+
unevaluatedProperties: false
1617+
properties:
1618+
cleanup:
1619+
type: string
1620+
title: ContainerCleanupPolicy
1621+
description: The container cleanup policy to use
1622+
enum: [ always, never, eventually ]
1623+
default: never
1624+
after:
1625+
$ref: '#/$defs/duration'
1626+
title: ContainerLifetimeDuration
1627+
description: The duration after which to cleanup the container, in case the cleanup policy has been set to 'eventually'
1628+
required: [ cleanup ]
1629+
if:
1630+
properties:
1631+
cleanup:
1632+
const: eventually
1633+
then:
1634+
required: [ after ]
1635+
else:
1636+
not:
1637+
required: [ after ]
1638+
processResult:
1639+
type: object
1640+
title: ProcessResult
1641+
description: The object returned by a run task when its return type has been set 'all'.
1642+
unevaluatedProperties: false
1643+
properties:
1644+
code:
1645+
type: integer
1646+
title: ProcessExitCode
1647+
description: The process's exit code.
1648+
stdout:
1649+
type: string
1650+
title: ProcessStandardOutput
1651+
description: The content of the process's STDOUT.
1652+
stderr:
1653+
type: string
1654+
title: ProcessStandardError
1655+
description: The content of the process's STDERR.
1656+
required: [ code, stdout, stderr ]
1657+
asyncApiServer:
1658+
type: object
1659+
title: AsyncApiServer
1660+
description: Configures the target server of an AsyncAPI operation.
1661+
unevaluatedProperties: false
1662+
properties:
1663+
name:
1664+
type: string
1665+
title: AsyncApiServerName
1666+
description: The target server's name.
1667+
variables:
1668+
type: object
1669+
title: AsyncApiServerVariables
1670+
description: The target server's variables, if any.
1671+
required: [ name ]
1672+
asyncApiOutboundMessage:
1673+
type: object
1674+
title: AsyncApiOutboundMessage
1675+
description: An object used to configure the message to publish using the target operation.
1676+
unevaluatedProperties: false
1677+
properties:
1678+
payload:
1679+
type: object
1680+
title: AsyncApiMessagePayload
1681+
description: The message's payload, if any.
1682+
additionalProperties: true
1683+
headers:
1684+
type: object
1685+
title: AsyncApiMessageHeaders
1686+
description: The message's headers, if any.
1687+
additionalProperties: true
1688+
asyncApiInboundMessage:
1689+
type: object
1690+
title: AsyncApiInboundMessage
1691+
description: Represents a message counsumed by an AsyncAPI subscription.
1692+
allOf:
1693+
- $ref: '#/$defs/asyncApiOutboundMessage'
1694+
properties:
1695+
correlationId:
1696+
type: string
1697+
title: AsyncApiMessageCorrelationId
1698+
description: The message's correlation id, if any.
1699+
asyncApiSubscription:
1700+
type: object
1701+
title: AsyncApiSubscription
1702+
description: An object used to configure the subscription to messages consumed using the target operation.
1703+
unevaluatedProperties: false
1704+
properties:
1705+
filter:
1706+
$ref: '#/$defs/runtimeExpression'
1707+
title: AsyncApiSubscriptionCorrelation
1708+
description: A runtime expression, if any, used to filter consumed messages.
1709+
consume:
1710+
$ref: '#/$defs/asyncApiMessageConsumptionPolicy'
1711+
title: AsyncApiMessageConsumptionPolicy
1712+
description: An object used to configure the subscription's message consumption policy.
1713+
required: [ consume ]
1714+
asyncApiMessageConsumptionPolicy:
1715+
type: object
1716+
title: AsyncApiMessageConsumptionPolicy
1717+
description: An object used to configure a subscription's message consumption policy.
1718+
unevaluatedProperties: false
1719+
properties:
1720+
for:
1721+
$ref: '#/$defs/duration'
1722+
title: AsyncApiMessageConsumptionPolicyFor
1723+
description: Specifies the time period over which messages will be consumed.
1724+
oneOf:
1725+
- properties:
1726+
amount:
1727+
type: integer
1728+
title: AsyncApiMessageConsumptionPolicyAmount
1729+
description: The amount of (filtered) messages to consume before disposing of the subscription.
1730+
required: [ amount ]
1731+
- properties:
1732+
while:
1733+
$ref: '#/$defs/runtimeExpression'
1734+
title: AsyncApiMessageConsumptionPolicyWhile
1735+
description: A runtime expression evaluated after each consumed (filtered) message to decide if message consumption should continue.
1736+
required: [ while ]
1737+
- properties:
1738+
until:
1739+
$ref: '#/$defs/runtimeExpression'
1740+
title: AsyncApiMessageConsumptionPolicyUntil
1741+
description: A runtime expression evaluated before each consumed (filtered) message to decide if message consumption should continue.
1742+
required: [ until ]

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy