Path matching according to OpenAPI spec: wrong resolution

Issue #301 new
Former user created an issue

Given the OpenAPI spec attached, I wonder if POST /v2/pet/findByStatus shouldn't be matched with the /pet/findByStatus resource instead of the /pet/{petId} because the OpenAPI spec says that concrete paths would be matched before their templated counterparts. There is no word on verb matching.

https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#patterned-fields

A relative path to an individual endpoint. The field name MUST begin with a slash. The path is appended (no relative URL resolution) to the expanded URL from the Server Object's url field in order to construct the full URL. Path templating is allowed. When matching URLs, concrete (non-templated) paths would be matched before their templated counterparts. Templated paths with the same hierarchy but different templated names MUST NOT exist as they are identical. In case of ambiguous matching, it's up to the tooling to decide which one to use.

Comments (0)

  1. Log in to comment