keystone.api.validation package¶
Submodules¶
Module contents¶
API request/response validating middleware.
- keystone.api.validation.request_body_schema(schema: Dict[str, Any] | None = None)[source]¶
Register a schema to validate request body.
schema
will be used for validating the request body just before the API method is executed.- Parameters:
schema – The JSON Schema schema used to validate the target. If empty value is passed no validation will be performed.
min_version – A string indicating the minimum API version
schema
applies against.max_version – A string indicating the maximum API version
schema
applies against.
- keystone.api.validation.request_query_schema(schema: Dict[str, Any] | None = None)[source]¶
Register a schema to validate request query string parameters.
schema
will be used for validating request query strings just before the API method is executed.- Parameters:
schema – The JSON Schema schema used to validate the target. If empty value is passed no validation will be performed.
- keystone.api.validation.response_body_schema(schema: Dict[str, Any] | None = None)[source]¶
Register a schema to validate response body.
schema
will be used for validating the response body just after the API method is executed.- Parameters:
schema – The JSON Schema schema used to validate the target. If empty value is passed no validation will be performed.
min_version – A string indicating the minimum API version
schema
applies against.max_version – A string indicating the maximum API version
schema
applies against.