-
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
datacontentencoding is not OPTIONAL #481
Comments
Good point @cneijenhuis I agree with your suggestion. I think # 1 is best, and explain more clearly what REQUIRED means. |
@duglin If I'm not mistaken, their PRs already indicate when it is REQUIRED in the constraints. My point is that an OPTIONAL attribute MUST NOT state it is REQUIRED in some circumstances in the constraints section. A "skimming" reader may skip the optional attributes - it would be quite a surprise that these are not optional, after all... |
@cneijenhuis if #484 is adopted, does the new header for the "optional attributes" section address your concern? |
Mostly, but I think the Notational Convention section should be changed as well, e.g. to:
|
I'm not sure that kind of text is required since to me the text around the MUSTs makes it clear that if the condition specified is met, then the MUST applies. The classic example is:
The presence of this requirement in the "optional attributes" section doesn't really change whether or not people are required to adhere to the MUST. Basically the word "OPTIONAL" in the header of the section is meaningless other than to say these attribute might appear while the ones in the REQUIRED section will appear. Perhaps we should find another word other than OPTIONAL for the title. Would that help? Or just title the section "Conditional Attributes" ?? But that's just me :-) If people think more text is needed, then we just need to find the right wording because not everything in that section is "conditional". Perhaps something like this at the top of the "OPTIONAL and conditional attributes" section: While the attributes listed in this section are not mandatory for all CloudEvents, some of them might be based the particular use case. wdyt? |
@cneijenhuis what's the status of this one? Want to open a PR? |
#492 may resolve this - either it gets adopted, or I'll do a PR. |
Closed due to #492 - if incorrect please let me know |
The notational convention states:
The
datacontentencoding
is listed as an OPTIONAL attribute, however producers MUST or MUST NOT set the attribute - in other words, they MUST support the feature (which can mean they have to omit the attribute):The same will be true for
datacontenttype
if we adopt either #470 or #471 .My suggestion is to either move them to REQUIRED attributes and clarify that this includes a requirement to NOT set the attribute, or to create a new section for attributes that are producers are REQUIRED to use correctly (incl. omitting them), but consumers have to handle them not being there.
The text was updated successfully, but these errors were encountered: