Skip to content

Specify the media type for proto representations#346

Merged
duglin merged 2 commits intocloudevents:masterfrom
rachelmyers:proto-media-type
Nov 29, 2018
Merged

Specify the media type for proto representations#346
duglin merged 2 commits intocloudevents:masterfrom
rachelmyers:proto-media-type

Conversation

@rachelmyers
Copy link
Copy Markdown
Contributor

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.

Signed-off-by: Rachel Myers <rachelmyers@google.com>
@rachelmyers rachelmyers mentioned this pull request Nov 8, 2018
Comment thread protobuf-format.md Outdated
| 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`.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this needs a MUST in there somewhere

Copy link
Copy Markdown
Contributor Author

@rachelmyers rachelmyers Nov 14, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@duglin
Copy link
Copy Markdown
Collaborator

duglin commented Nov 15, 2018 via email

@JemDay
Copy link
Copy Markdown
Contributor

JemDay commented Nov 15, 2018

Unfortunately the example code needs tweaking to account for the recent changes to property naming ; eg eventTime -> time, cloudEventsVersion -> specversion etc.

@rachelmyers
Copy link
Copy Markdown
Contributor Author

@JemDay Totally true. It's outside the scope of this PR adding media type definition, but I'll make a follow up.

@JemDay
Copy link
Copy Markdown
Contributor

JemDay commented Nov 15, 2018

@rachelmyers - I'm happy to open PR for that if you wish ... let me know ...

@rachelmyers
Copy link
Copy Markdown
Contributor Author

@JemDay That would be great; thanks.

Signed-off-by: Rachel Myers <rachelmyers@google.com>
Comment thread json-format.md
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`.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this to the PR!

@duglin
Copy link
Copy Markdown
Collaborator

duglin commented Nov 16, 2018

LGTM

@JemDay
Copy link
Copy Markdown
Contributor

JemDay commented Nov 16, 2018

+1

@duglin
Copy link
Copy Markdown
Collaborator

duglin commented Nov 29, 2018

Approved on 11/29 call

@duglin duglin merged commit cfe0663 into cloudevents:master Nov 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants