You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This does not, however, seem to work. Currently, extract_cstruct puts request.path (a string) into cstruct['path'] (and does not appear to make request.matchdict available at all.)
I would suggest that extract_cstruct should be modified to make request.matchdict available in the cstruct; either as cstruct['path'] (replacing request.path) or as cstruct['matchdict'].
Am I missing something?
The text was updated successfully, but these errors were encountered:
I'm open to both approaches: request['path'] as before, or in a new key 'matchdict'. The first one would just be a simple bug fix, the other one is a new feature with the required details in the upgrading docs.
Would you be willing to open a pull-request with the small fix please?
In Cornice < 2, when a schema item had
location=path
, it was extracted/validated fromrequest.matchdict
. This allowed for code likeIn Cornice >= 2, I would naively translate the above to
This does not, however, seem to work. Currently,
extract_cstruct
putsrequest.path
(a string) intocstruct['path']
(and does not appear to makerequest.matchdict
available at all.)I would suggest that
extract_cstruct
should be modified to makerequest.matchdict
available in the cstruct; either ascstruct['path']
(replacingrequest.path
) or ascstruct['matchdict']
.Am I missing something?
The text was updated successfully, but these errors were encountered: