Open tflorac opened 3 years ago
Hi Thierry,
To be honest with you I never used these optional path parameters. Based on your feedback, it looks like Cornice does not support them well. It doesn't mean it couldn't, if you want to track this down, the view registering code is this: https://github.com/Cornices/cornice/blob/54e29682e4f22b9ad944c1f96c24a6972937fb1f/cornice/pyramidhook.py#L191-L264
Alternatively, you can register several routes in the right order to obtain the same result
Hi,
I'm trying to build a Cornice service which should accept an optional path parameter, so I followed Pyramid guidelines and set path as "
/api/rest/doc/{doc_id}{version:.*}
".But then:
request.matchdict['version']
is set to "/1
" (for example), instead of just "1
", as described in Pyramid documentation;doc_id}{version
"!So is this syntax supported by Cornice, or should I handle it in another way?
Best regards,
Thierry