diff --git a/schema/workflow.yaml b/schema/workflow.yaml index d98321f3..6d6cd0db 100644 --- a/schema/workflow.yaml +++ b/schema/workflow.yaml @@ -302,8 +302,7 @@ $defs: type: string description: The event's unique identifier source: - type: string - format: uri + $ref: '#/$defs/uri' description: Identifies the context in which an event happened type: type: string @@ -317,8 +316,7 @@ $defs: type: string description: Content type of data value. This attribute enables data to carry any type of content, whereby format and encoding might differ from that of the chosen event format. dataschema: - type: string - format: uri + $ref: '#/$defs/uri' required: [ source, type ] additionalProperties: true required: [ event ] @@ -567,8 +565,7 @@ $defs: type: object properties: authority: - type: string - format: uri + $ref: '#/$defs/uri' description: The URI that references the OAuth2 authority to use. grant: type: string @@ -643,15 +640,14 @@ $defs: type: object properties: type: - type: string - format: uri + $ref: '#/$defs/uri' description: A URI reference that identifies the error type. status: type: integer description: The status code generated by the origin for this occurrence of the error. instance: type: string - format: uri + format: json-pointer description: A JSON Pointer used to reference the component the error originates from. title: type: string @@ -664,8 +660,7 @@ $defs: type: object properties: uri: - type: string - format: uri + $ref: '#/$defs/uri' description: The endpoint's URI. authentication: $ref: '#/$defs/authenticationPolicy' @@ -757,8 +752,7 @@ $defs: type: object properties: uri: - type: string - format: uri + $ref: '#/$defs/uri' description: The endpoint's URI. authentication: $ref: '#/$defs/authenticationPolicy' @@ -875,4 +869,12 @@ $defs: description: The duration after which to timeout. required: [ after ] description: The definition of a timeout. + uri: + oneOf: + - type: string + format: uri + - type: string + # taken from [RFC3986](https://tools.ietf.org/html/rfc3986#appendix-B) + pattern: ^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$ + required: [ document, do ] \ No newline at end of file