Specify the media type for proto representations#346
Specify the media type for proto representations#346duglin merged 2 commits intocloudevents:masterfrom
Conversation
Signed-off-by: Rachel Myers <rachelmyers@google.com>
| | Integer | int_value | ||
| | Any | Not applicable. Any is the enclosing CloudEventAny message itself | ||
|
|
||
| Protocol Buffer representations of CloudEvents use the media type `application/cloudevents+proto`. |
There was a problem hiding this comment.
I think this needs a MUST in there somewhere
There was a problem hiding this comment.
Maybe. I left it out so the wording here matches the wording in the JSON spec:
Such a representation uses the media type
application/cloudevents+json.
|
Ah good catch. We should fix it in both places
Thanks,
-Doug
Sent from my iPhone
… On Nov 15, 2018, at 7:43 AM, Rachel Myers ***@***.***> wrote:
@rachelmyers commented on this pull request.
In protobuf-format.md:
> @@ -88,6 +88,7 @@ The CloudEvents type system MUST be mapped into the fields of
| Integer | int_value
| Any | Not applicable. Any is the enclosing CloudEventAny message itself
+Protocol Buffer representations of CloudEvents use the media type `application/cloudevents+proto`.
Maybe. I left it out so the wording here matches the wording in the JSON spec: Such a representation uses the media type application/cloudevents+json.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
|
Unfortunately the example code needs tweaking to account for the recent changes to property naming ; eg eventTime -> time, cloudEventsVersion -> specversion etc. |
|
@JemDay Totally true. It's outside the scope of this PR adding media type definition, but I'll make a follow up. |
|
@rachelmyers - I'm happy to open PR for that if you wish ... let me know ... |
|
@JemDay That would be great; thanks. |
Signed-off-by: Rachel Myers <rachelmyers@google.com>
2f954c5 to
31d76c1
Compare
| Each CloudEvents event can be wholly represented as a JSON object. | ||
|
|
||
| Such a representation uses the media type `application/cloudevents+json`. | ||
| Such a representation MUST use the media type `application/cloudevents+json`. |
There was a problem hiding this comment.
Thanks for adding this to the PR!
|
LGTM |
|
+1 |
|
Approved on 11/29 call |
This PR addresses a concern raised by @JemDay that the proto spec didn't specify which media type should be used in the envelopes for messages using the proto spec.
This follows the convention of the json spec and specifies the media type of
application/cloudevents+proto.