schema validation
Checking incoming data against a declared shape, such as allowed field names and types, and rejecting anything that does not fit.
In more detail
Declaring an input schema per operation and forbidding extra properties at the parser makes the safe shape the default for every endpoint. Handlers no longer have to remember to drop unknown fields.
Related terms
- serialization — Turning an in-memory object into bytes, such as JSON text, that can be sent or stored, and parsing it back again.
- mass assignment — A bug where a handler copies every field of a request body into a data model, so a caller can set fields such as role or balance that were never meant to be writable.
- 400 Bad Request — The HTTP status meaning the request is malformed or asks for something outside what the API allows, such as a page size above the maximum.
Taught in
- Mass Assignment — Application Security & Threat Modeling for Engineers