AndrewWalsh / openapi-devtools

Browser extension that generates API specs for any app or website
https://chrome.google.com/webstore/detail/openapi-devtools/jelghndoknklgabjgaeppjhommkkmdii
MIT License
3.92k stars 72 forks source link

Path parameters with colons not OpenAPI 3.1 compliant? #21

Open elrubio opened 2 weeks ago

elrubio commented 2 weeks ago

First off, thanks a lot for this super-useful tool! 🙏🏼

When I passed my generated spec file to my code generator, it complained about invalid path parameters containing colons.

Indeed, the OpenAPI specs only seem to allow curly braces and don't mention colons:

3.2 Path Templating

Path templating refers to the usage of template expressions, delimited by curly braces ({}), to mark a section of a URL path as replaceable using path parameters.

After changing my spec file accordingly, code generation worked.

Is there a specific reason your generated documents deviate from the OpenAPI spec? Could this be changed to meet the standard?

AndrewWalsh commented 2 weeks ago

Thanks @elrubio, that's definitely a bug, I kind of hacked this together.

I will address this along with the other PR next week.