rs_dpr_service/openapi_validation.md
Openapi_core methods for OGC validation of the endpoints
validate_request(request)
async
Validate an endpoint request according to the ogc specifications
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
Request
|
endpoint request |
required |
Returns:
| Type | Description |
|---|---|
dict[Any, Any]
|
(dict) dictionary corresponding to the valid body |
Source code in docs/rs-dpr-service/rs_dpr_service/openapi_validation.py
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | |
validate_response(request, data, status_code=HTTP_200_OK)
Validate an endpoint response according to the ogc specifications (described as yaml schemas) - Raises an exception if the response has an unvalid format
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
Request
|
input request |
required |
data
|
dict
|
data to send in the endpoint response |
required |
Source code in docs/rs-dpr-service/rs_dpr_service/openapi_validation.py
66 67 68 69 70 71 72 73 74 75 76 77 78 79 | |