HTTP Request Input Validation
The REST API accepts the media type application/json for
all requests that have a body (payload), and returns application/json for
all responses.
Input is parsed and deserialized to an Object using the serialization framework provided by Micronaut. Any errors during this process will be caught and returned as HTTP 400 to the client along with a message describing the problem. After deserialization, the Request Objects are validated against rules that check for the following:
- Null or empty
- That numeric parameters are numbers of the required type and within the required range
- That text, URI, and UUID parameters match expected values or regular expressions corresponding to the required type
Any failures in validation at this point will also be handled and an HTTP 400 error is returned with a message describing the problem. All regular expressions used in the validation of input data are evaluated to confirm that they are not susceptible to Regular Expression denial-of-service (DOS) vulnerabilities.
Parent topic: General Considerations for Container Configuration