Replies: 1 comment 3 replies
-
|
There are two "normal" patterns: RFC9110 §5.6's Common Rules for Defining Field Values and RFC8941 Structured Field Values for HTTP Everything else is a special case to a greater or lesser degree. Header data models would go in a registry, just like we already do for media type data models. The registry would indicate that, for each header, the model is one of:
At this point it is not clear to me if we will sometimes want to provide a custom model for certain fields that could be expressed in RFC9110§5.6 or RFC8941 terms. That probably will have to do with how elegant the generic data models for those rules can be. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In last week's call we reached a tentative decision that "maybe we should focus on creating a well defined model for an HTTP request/response with sufficient semantics for APIs."
I'd like to suggest starting with HTTP fields (headers and trailers). This is a big pain point in OAS 3, and the modeling abilities there are minimal. It would be a huge win to back-port header modeling to 3.2 (or assuming we try to push a 3.2 out quickly, more likely this backport would go into 3.3). Here are some relevant issues, all of which center around more complex and detailed representations of headers:
I've started working up an overall JSON Schema-representable model of RFC 9110 §5.6 "Common Rules for Defining Field Values" and RFC 8941 "Structured Field Values for HTTP", which would cover a fair number of cases.[EDIT: I don't think I got far with this and don't remember what I did with it.] We would want to keep these sets of rules distinct even though they have some overlap. There would also need to be some special-cases because of the long history of HTTP fields, and we'd probably want a registry to allow defining additional custom models as needed.But mostly, we should be able to handle a lot of existing headers through 9110 plus a few custom models, and most new headers through 8941.
Beta Was this translation helpful? Give feedback.
All reactions