Closed smsearcy closed 3 years ago
I have a working implementation for this and will open a PR once I get the tests sorted out (assuming the enhancement is agreeable).
Edit: Tests fail with Pyramid 2.0 due to changes in how the finished_callbacks
are handled via scripting.prepare()
. I think we should be able to use pyramid.testing.testConfig
instead. I've started another branch to sort that out (to keep this PR simple).
When a route pattern includes placeholders that are used as predicates in a view's
match_param
, this means there can be multiple view functions with different documentation and unique URLs, however currently only one view's documentation is loaded and the path documented with APISpec includes placeholders the end user likely does not know about.For example, the following route and views would currently only document as a single endpoint (
/foo/{id}/{view}
) when I think it should document two endpoints (/foo/{id}/bar
and/foo/{id}/baz
).Edit: Grammar/clarity