From 1aae2d48cd1e5b5643009466637adcfb87a6eeaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klaus=20Dei=C3=9Fner?= Date: Fri, 26 Jun 2020 16:22:54 +0200 Subject: [PATCH] Add property "sourcetemplate" to eventprovider/service (#636) * Add property "sourcetemplate" to entity eventprovider/service Signed-off-by: Klaus Deissner * Added restriction to Level 1 templates Made sourcetemplate a child of type Signed-off-by: Klaus Deissner --- discovery.md | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/discovery.md b/discovery.md index 106701d68..10cf06831 100644 --- a/discovery.md +++ b/discovery.md @@ -245,7 +245,7 @@ entity. - Examples: - `http://cloud.example.com/docs/blobstorage` -###### specversions +##### specversions - Type: Array of `Strings` per [RFC 2046](https://tools.ietf.org/html/rfc2046) - Description: CloudEvents [`specversions`](https://github.com/cloudevents/spec/blob/master/spec.md#specversion) @@ -254,7 +254,7 @@ entity. - REQUIRED - MUST be a non-empty array or non-empty strings -###### subscriptionurl +##### subscriptionurl - Type: `URL` - Description: An absolute URL indicating where CloudSubscriptions `subscribe` @@ -262,7 +262,7 @@ entity. - Constraints: - REQUIRED -###### subscriptionconfig +##### subscriptionconfig - Type: `Map` of `String` to `String` - Description: A map indicating supported options for the `config` parameter @@ -275,7 +275,7 @@ entity. - Examples: - ?? -###### authscope +##### authscope - Type: `String` - Description: Authorization scope needed for creating subscriptions. @@ -285,7 +285,7 @@ entity. - Example: - `storage.read` -###### protocols +##### protocols - Type: `List` of `String` - Description: This field describes the different values that might be passed @@ -315,7 +315,7 @@ entity. - `com.github.pull.create` - `com.example.object.delete.v2` -##### description (Type) +###### description (type) - Type: `String` - Description: Human readable description. @@ -323,7 +323,7 @@ entity. - OPTIONAL - If present, MUST be a non-empty string -##### datacontenttype +###### datacontenttype - Type: `String` - Description: CloudEvents [`datacontenttype`](https://github.com/cloudevents/spec/blob/master/spec.md#datacontenttype) @@ -334,7 +334,7 @@ entity. - If present, MUST adhere to the format specified in [RFC 2046](https://tools.ietf.org/html/rfc2046) -##### dataschema +###### dataschema - Type: `URI` - Description: CloudEvents [`datacontenttype`](https://github.com/cloudevents/spec/blob/master/spec.md#dataschema) @@ -344,7 +344,7 @@ entity. - OPTIONAL - If present, MUST be a non-empty URI -##### dataschematype +###### dataschematype - Type: `String` per [RFC 2046](https://tools.ietf.org/html/rfc2046) - Description: If using `dataschemacontent` for inline schema storage, the @@ -356,7 +356,7 @@ entity. - Examples: - `application/json` -##### dataschemacontent +###### dataschemacontent - Type: `String` - Description: An inline representation of the schema of the `data` attribute @@ -368,6 +368,19 @@ entity. the `datacontenttype`. - If `dataschama` is present, this field MUST NOT be present. +###### sourcetemplate + +- Type: `URI Template` +- Description: A URI Template according to [RFC + 6570](https://tools.ietf.org/html/rfc6570) that defines how the source + attribute will be generated. +- Constraints: + - OPTIONAL + - If present, MUST be a Level 1 template compliant to [RFC + 6570](https://tools.ietf.org/html/rfc6570) +- Examples: + - "http://blob.store/{bucket}" + ###### extensions - Type: `Array` of structures @@ -402,13 +415,13 @@ entity. "type": "com.example.storage.object.create", "specversions": [ "1.x-wip" ], "datacontenttype": "application/json", - "dataschema": "http://schemas.example.com/download/com.example.storage.object.create.json" + "dataschema": "http://schemas.example.com/download/com.example.storage.object.create.json", + "sourcetemplate": "https://storage.example.com/service/storage/{objectID}" } ] } ``` - ### REST Paths Each path in the REST API represents either a list (or search) over