JSON Schema Validation
JSON Schema is "a vocabulary that allows you to annotate and validate JSON documents".
By applying JSON Schema Validation to your OBP endpoints you can constrain POST and PUT request bodies. For example, you can set minimum / maximum lengths of fields and constrain values to certain lists or regular expressions.
See JSONSchema.org for more information about the JSON Schema standard.
To create a JSON Schema from an any JSON Request body you can use JSON Schema Net
(The video link below shows how to use that)
Note: OBP Dynamic Entities also use JSON Schema Validation so you don't need to additionally wrap the resulting endpoints with extra JSON Schema Validation but you could do.
You can apply JSON schema validations to any OBP endpoint's request body using the POST and PUT endpoints listed in the link below.
PLEASE SEE the following video explanation: JSON schema validation of request for Static and Dynamic Endpoints and Entities