Replies: 2 comments 1 reply
-
WHATWG's general mode of operation is to codify what implementations are actually doing. From what i can figure out of this URL Pattern spec, it's doing a somewhat different, although overlapping, thing from RFC 6570 URI Templates. With Moonwalk (OAS 4) proposing full RFC 6570 support, the question is probably whether there are any use cases that are much better served by WHATWG's approach. I'm pretty certain that there are plenty of cases that 6570 enables that this new spec does not, but I can't entirely tell with just a quick look. |
Beta Was this translation helpful? Give feedback.
-
Can anyone summarize the grammar and capabilities of the WHATWG URL Pattern spec? As if it were a normal spec defined in terms of observable behavior instead of pseudocode for implementing a browser or analogous piece of software? I am trying to figure out if it makes more sense to model after this than after RFC6570 but I confess I'm struggling to extract actual meaning out of the flood of implementation details. |
Beta Was this translation helpful? Give feedback.
-
The Open API Path templating seems to be inspired and partially compatible with the IETF [RFC6570] URI Template Specification which is great
Open API Path Templating
Examples
But WHATWG recently announced its new URL Pattern specification
WHATWG URL Pattern Path Templating
Example:
https://urlpattern.spec.whatwg.org/#patterns
Impact
As you can see both pattern syntax is very different and not compatible
/foo/{bar}/baz
/foo/:bar/baz
There has been an issue pushed a while ago to this standard working repository
Actually it looks like this specification has been more driven by existing framework templating implentation (like express.js route parameters, Angular routing, ...) than by existing standards, while there also exists tools that had to be written to convert such product path template to the standard one (and vice-versa).
This feel pretty sad to me and I'm not sure what should be the best thing that could be done on Open API side:
Beta Was this translation helpful? Give feedback.
All reactions