Weaver: Workflow Execution Management Service (EMS); Application, Deployment and Execution Service (ADES); OGC API - Processes; WPS; CWL Application Package
[ ] use content_type in cornice decorator over request view to validate the list of permitted content types in request body
[ ] add 415 Unsupported Media Type to responses corresponding to content_type validation
(should be auto-handled by add_cornice_service handler, but test to validate)
[ ] use from cornice.validators import DEFAULT_VALIDATORS, colander_validator, colander_body_validator, colander_headers_validator, colander_path_validator, colander_querystring_validator to validate items referred by schema
(see also https://github.com/Cornices/cornice/issues/587)
Description
Using the following definitions:
It is possible to make better use of Cornice utilities to perform pre/post validations instead of manual try/except with raise of the HTTPException.
[ ] #112 (see https://cornice.readthedocs.io/en/latest/i18n.html)
[ ] #210
[ ] #456
[ ] use
content_type
in cornice decorator over request view to validate the list of permitted content types in request body415 Unsupported Media Type
to responses corresponding tocontent_type
validation (should be auto-handled byadd_cornice_service
handler, but test to validate)[ ] use
from cornice.validators import DEFAULT_VALIDATORS, colander_validator, colander_body_validator, colander_headers_validator, colander_path_validator, colander_querystring_validator
to validate items referred byschema
(see also https://github.com/Cornices/cornice/issues/587)[ ] use
accept
and let cornice/colander perform the406 Not Acceptable
check (consider https://cornice.readthedocs.io/en/latest/validation.html#using-callables-1 to handlef
instead ofaccept
- inject ihe header?)[ ] #215 return contents for corresponding errors (ie: format the JSON with expected OGC structure) using custom
error_handler
(see https://cornice.readthedocs.io/en/latest/validation.html#dealing-with-errors)