Skip to content

Rename "contenttype" to "datatype" #354

@duglin

Description

@duglin

From looking at the RocketMQ PR (#352) I think there's going to be some confusion going forward between the CloudEvents "contenttype" property and a transport-level "ContentType" property. I might be mistaken but I believe that in #352 they're using the CE one in place of a transport level one. We need to make it clear the the CloudEvents "contenttype" property is NOT about the encoding of the CloudEvent, rather its about the encoding of the "data" property - nothing else. I believe that using a well-known (and a bit vague) phase like "Content Type" might cause more confusion going forward. To help, I suggest that we rename it to something that more clearly scopes it to its intended usage - some options:

  • datatype
  • dataencoding
  • datacontenttype

I have a slight preference for datatype.

This does make me wonder about the relationship between this property and the schemaurl property. Conceptually, I understand the two but I wonder if we really need to split them into two separate properties. For example, could the schemaurl information not be encoded into the datatype as an extra parameter - if needed. It might be worth noting that https://en.wikipedia.org/wiki/List_of_HTTP_header_fields doesn't show a schemaurl type of HTTP header.

I'd like to hear some thoughts on this before I open a PR for either, or both, topics.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions