Skip to content
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

feat(coap): add conformance section #275

Merged
merged 1 commit into from
Apr 5, 2023
Merged

Conversation

JKRhb
Copy link
Member

@JKRhb JKRhb commented Mar 26, 2023

Inspired by the MQTT Binding Document, this PR adds a conformance section to the CoAP document which would make it possible to use keywords like MUST or SHOULD to formulate (quasi-)normative statements.

I partly opened this PR to discuss if including such a section is actually possible for a binding document or if all statements must be strictly informative – if a conformance section cannot be included, then the existing documents (namely the MQTT binding) would require adjustments as well.

@JKRhb JKRhb requested a review from ektrah as a code owner March 26, 2023 20:53
@egekorkan
Copy link
Contributor

I think that this is a good start and almost complete from my point of view

@JKRhb JKRhb added the coap related to coap protocol binding label Mar 26, 2023
@ektrah
Copy link
Member

ektrah commented Mar 27, 2023

I'm not sure if this adds a lot of value to the document. The two sections are normative in the sense that they're providing the vocabulary and defaults you'll have to use if you want to be interoperable. Conformance to these sections would mean that your implementation does this correctly and is therefore interoperable. That kind of trivial, isn't it?

@JKRhb
Copy link
Member Author

JKRhb commented Mar 27, 2023

I think the main benefit would be the possibility to use RFC 2119 keywords (ReSpec automatically adds some boilerplate based on what is used within the document, see here). If we don't need that (or aren't allowed to use the keywords in a binding document) then we can just close this PR.

However, for the sake of consistency, I think it should be discussed in general if binding documents need/should include a conformance section since the MQTT document has one while the Modbus document does not.

@ektrah
Copy link
Member

ektrah commented Mar 27, 2023

RFC 2119 keywords do not indicate requirements for conformance, they indicate what implementations may and must do to achieve interoperability with each other. (If you read RFCs, you'll find that there aren't any sections on conformance terms. It's always about interoperability.)

The document currently already specifies what implementations must do to be interoperable, whether with or without RFC 2119 keywords. IMHO adding a conformance section wouldn't change much about that.

@egekorkan
Copy link
Contributor

So far as I know, all our documents should have a conformance section. Respec automatically generates the content of the conformance section once you put the section id. See https://github.com/w3c/wot-binding-templates/blob/main/index.html#L216 which has an empty section but the generated document has https://w3c.github.io/wot-binding-templates/#conformance

@JKRhb I have realized that the preview actually does not contain the explanation about the assertive keywords: https://deploy-preview-275--wot-binding-templates.netlify.app/bindings/protocols/coap/index.html

Is there a way to add what you put but keep the auto-generated content?

@JKRhb
Copy link
Member Author

JKRhb commented Mar 29, 2023

@JKRhb I have realized that the preview actually does not contain the explanation about the assertive keywords: https://deploy-preview-275--wot-binding-templates.netlify.app/bindings/protocols/coap/index.html

Is there a way to add what you put but keep the auto-generated content?

I think the explanation regarding the RFC 2119 keywords is only generated if one of the keywords is actually being used within the document (and then limited to what is actually being used). E.g., if you put a MUST in the document somewhere, then the explanation text should appear automatically, like so:

image

Currently, none of the keywords are present in the document, therefore the explanation is omitted.

Copy link
Member

@ektrah ektrah left a comment

Choose a reason for hiding this comment

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

I'm fine with adding the W3C boilerplate and using RFC 2119 keywords in the document. I think more thought is needed as to what conformance actually means in the context of protocol bindings.

@egekorkan
Copy link
Contributor

I think more thought is needed as to what conformance actually means in the context of protocol bindings.

I agree but this sort of extends to TDs in general. The normative consuming and parsing in the next charter should handle this

@egekorkan
Copy link
Contributor

egekorkan commented Apr 5, 2023

Call of 05.04:

  • Merging and creating issue for @ektrah last comment.

@egekorkan egekorkan merged commit 9bc8656 into w3c:main Apr 5, 2023
@JKRhb JKRhb deleted the coap-conformance branch April 5, 2023 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
coap related to coap protocol binding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants