karenetheridge / OpenAPI-Modern

Validate HTTP requests and responses against an OpenAPI v3.1 document
https://metacpan.org/release/OpenAPI-Modern/
Other
5 stars 3 forks source link

prohibit "identical" paths, where only the placeholder names differ #46

Closed karenetheridge closed 5 months ago

karenetheridge commented 1 year ago

/users/{id} and /users/{name} cannot both exist. However, this is not checked in the metaschema (due to an inability to express this in JSON Schema), and we don't check for it in code either.

We can check for this by replacing all placeholders in paths with a token that would be illegal in a URI (say a control character) and then checking for uniqueness (use bits of the PP implementation of uniq, that uses a %seen hash for counting occurrences).

karenetheridge commented 5 months ago

This was done in version 0.041 (2023-03-13).