Closed AMorgaut closed 3 months ago
Actually it looks like this specification has been more driven by existing framework templating implementations
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.
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: