diff --git a/examples/call-http-query-parameters.yaml b/examples/call-http-query-parameters.yaml index 6f34c67e..f17d3043 100644 --- a/examples/call-http-query-parameters.yaml +++ b/examples/call-http-query-parameters.yaml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.yaml +# yaml-language-server: $schema=../schema/workflow.yaml document: dsl: 1.0.0-alpha2 namespace: examples diff --git a/examples/star-wars-homeworld.yaml b/examples/star-wars-homeworld.yaml index c443feb0..103f1838 100644 --- a/examples/star-wars-homeworld.yaml +++ b/examples/star-wars-homeworld.yaml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.yaml +# yaml-language-server: $schema=../schema/workflow.yaml document: dsl: 1.0.0-alpha2 namespace: examples diff --git a/schema/workflow.yaml b/schema/workflow.yaml index 7162014e..66d89ce6 100644 --- a/schema/workflow.yaml +++ b/schema/workflow.yaml @@ -979,8 +979,7 @@ $defs: description: Inline configuration of the OAuth2 authentication policy. properties: authority: - type: string - format: uri-template + $ref: '#/$defs/uriTemplate' title: OAuth2AutenthicationDataAuthority description: The URI that references the OAuth2 authority to use. grant: @@ -1114,11 +1113,10 @@ $defs: description: A URI reference that identifies the error type. oneOf: - title: LiteralErrorType + $ref: '#/$defs/uriTemplate' description: The literal error type. - type: string - format: uri-template - - $ref: '#/$defs/runtimeExpression' - title: ExpressionErrorType + - title: ExpressionErrorType + $ref: '#/$defs/runtimeExpression' description: An expression based error type. status: type: integer @@ -1144,14 +1142,23 @@ $defs: title: ErrorDetails description: A human-readable explanation specific to this occurrence of the error. required: [ type, status ] + uriTemplate: + title: UriTemplate + anyOf: + - title: LiteralUriTemplate + type: string + format: uri-template + pattern: "^[A-Za-z][A-Za-z0-9+\\-.]*://.*" + - title: LiteralUri + type: string + format: uri + pattern: "^[A-Za-z][A-Za-z0-9+\\-.]*://.*" endpoint: title: Endpoint description: Represents an endpoint. oneOf: - $ref: '#/$defs/runtimeExpression' - - title: LiteralEndpoint - type: string - format: uri-template + - $ref: '#/$defs/uriTemplate' - title: EndpointConfiguration type: object unevaluatedProperties: false @@ -1162,10 +1169,9 @@ $defs: oneOf: - title: LiteralEndpointURI description: The literal endpoint's URI. - type: string - format: uri-template - - $ref: '#/$defs/runtimeExpression' - title: ExpressionEndpointURI + $ref: '#/$defs/uriTemplate' + - title: ExpressionEndpointURI + $ref: '#/$defs/runtimeExpression' description: An expression based endpoint's URI. authentication: $ref: '#/$defs/referenceableAuthenticationPolicy' @@ -1185,9 +1191,7 @@ $defs: title: EventSource description: Identifies the context in which an event happened. oneOf: - - title: LiteralSource - type: string - format: uri-template + - $ref: '#/$defs/uriTemplate' - $ref: '#/$defs/runtimeExpression' type: type: string @@ -1214,11 +1218,10 @@ $defs: description: The schema describing the event format. oneOf: - title: LiteralDataSchema + $ref: '#/$defs/uriTemplate' description: The literal event data schema. - type: string - format: uri-template - - $ref: '#/$defs/runtimeExpression' - title: ExpressionDataSchema + - title: ExpressionDataSchema + $ref: '#/$defs/runtimeExpression' description: An expression based event data schema. additionalProperties: true eventConsumptionStrategy: