ietf-wg-httpapi / rfc7807bis

Revision of RFC7807: HTTP Problem Details
Other
20 stars 8 forks source link

Add CDDL data definition for JSON form of problem object #59

Closed cabo closed 1 year ago

cabo commented 1 year ago

(Did not write the text integrating this in Appendix A or making a new appendix; editor's choice.)

dret commented 1 year ago

Adding to @mnot's comment in the email thread: This seems more like advocacy for a specific tech than user needs. Personally, I've heard people asking about JSON schema but never for CDDL.

darrelmiller commented 1 year ago

@cabo In a recent reading of the RFC 8610 I came across this guidance,

In no case is it intended that a CDDL tool would be "writing code" for an implementation. https://www.rfc-editor.org/rfc/rfc8610#section-4.2

A liberal interpretation of this guidance would make CDDL inappropriate for a large group of HTTP API consumers and producers. Many developers use code generation tools for creating boilerplate code for either calling HTTP APIs or implementing HTTP APIs. I think it would be valuable to have a better understanding of the reasoning behind this guidance before including CDDL schemas in RFCs targeted at HTTP API developers.

cabo commented 1 year ago

Hi Darrel,

the section you cite is trying to warn about the dangers of overzealous validation. Generating code from a data description may lead to exactly that, so this is what the last sentence is about. However, there are various efforts that do generate code from CDDL, so the sentence taken out of context is somewhat overtaken by events. In any case, this PR is about complementing the English and json-schema.org descriptions by one that fits on a whiteboard, which may have value beyond being able to automatically generate code from that description.