-
Notifications
You must be signed in to change notification settings - Fork 584
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A schema (constraints) for context and data attributes identified by schemaURL #311
Comments
This dovetails open issue #108 |
@dmigliori what are your plans for this one? |
@dmigliori what's the status of this one? |
@duglin I still think this is a valid issue. For example, in the KubeCon Europe demo of supply chain event management, the Topic, Subject, and Data attributes conformed to a specific schema that aligned to an airport/commerce ontology (ACRIS/schema.org). I think this schema needs to be specified somewhere in a CE message header, as CE can be implemented to support various schemas that further constrain CE attributes (e.g. making optional attributes required). |
@dmigliori when you say "schema" can you elaborate a bit on how receivers will use that info? I'm trying to mentally walk through how a receiver of an CE would process the incoming event:
So, with all of that, are you asking for a single value that allows for a receiver to know, for example, that this event adheres to the "xyz data model" ? Could that not be encoded in the |
@duglin I'm suggesting to change to the description of the schemaURL attribute from: "A link to the schema that the data attribute adheres to." to: "A link to the schema that further defines constraints for the values of one or more of the following attributes: id, source, type, subject, time, and data" This would allow multiple event formats to be supported under the umbrella/generic CloudEvents schema. For example if schemaURL was set to "https://www.gs1.org/standards/epcis", both producers and consumers of EPCIS events would know how to include EPCIS-specific elements within CloudEvent attributes. Further, the schemaURL could specify that certain optional CloudEvent attributes are required (e.g. time). I don't see a reason why the schemaURL needs to be limited to just the "data" attribute. |
Interesting. Would you be ok with a slight wording change? " I think it's important that we retain the idea that this value's main purpose in life is to define the shape of WDTY? |
@duglin that works. will you draft a PR? |
closes cloudevents#311 Signed-off-by: Doug Davis <dug@us.ibm.com>
@dmigliori done: #465 |
Many of the context attributes (e.g., eventType, source, eventID, contentType) are not tightly constrained to maintain flexibility in specific implementations. However, as noted in the intro to the spec "event publishers (producers) tend to describe events differently. The lack of a common way of describing events means developers are constantly re-learning how to receive (consume) events." Loosely constrained attributes will not effectively address this key problem.
The spec currently describes the schemaURL attribute as "a link to the schema that the 'data' attribute adheres to". Suggest that this be broadened to "a link to the schema defining further constraints to context and data attributes" Thus, a single schema can ensure semantic interop of context attributes between event producers and consumers within a specific domain or ecosystem - not just data.
Further, suggest that the schemaURL and cloudEventsVersion attributes are "schema attributes" that describe the "context and data attributes" and should not be included as "context attributes" describing the occurrence (data).
The text was updated successfully, but these errors were encountered: