Skip to content

Commit

Permalink
Merge pull request #1018 from matthias-pichler/matthias-pichler/fix-u…
Browse files Browse the repository at this point in the history
…ri-template

Fix Uri-Template
  • Loading branch information
cdavernas authored Oct 11, 2024
2 parents 14714e5 + 28d821b commit 5ec4c5d
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 22 deletions.
2 changes: 1 addition & 1 deletion examples/call-http-query-parameters.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/star-wars-homeworld.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
43 changes: 23 additions & 20 deletions schema/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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'
Expand All @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit 5ec4c5d

Please sign in to comment.