Description
I maintain an example Pyramid app that uses openapi-core under the hood. When upgrading the library from 0.13.1 to 0.13.3 I've encountered a strange bug: responses fail because they don't match schemas of other endpoints. Weird, right? Read on.
In the PR linked above, you can see that I had to move the endpoint definition for /articles/{slug}/
to a position after endpoint definitions of more specific endpoints, such as /articles/{slug}/comments
, /articles/{slug}/comments/{id}
and /articles/{slug}/favorite
. Otherwise, a valid request to /articles/{slug}/comments
would fail during response validation with ValidationError:'article' is a required property
.
It seems that something changed in how paths are registered and this change now requires that more specific subpaths are now defined before less specific paths. I.e. /item/{id}
needs to be defined below /item/{id}/foo
in openapi.yaml
file.
I haven't yet managed to isolate this bug further. @p1c2u do you have any ideas off the top of your head what could cause this?