Skip to main content

Module validation

Module validation 

Source
Expand description

JSON schema validation middleware

Enums§

ContentTypeKind
Classify Content-Type header values after validation.

Functions§

is_form_urlencoded
Fast classification: is this Content-Type application/x-www-form-urlencoded?
is_json_content_type
Check if a media type is JSON or has a +json suffix
is_json_like
Fast classification: does this Content-Type represent JSON (application/json or +json)?
is_json_like_str
Fast classification for already-extracted header strings.
is_multipart_form_data
Fast classification: is this Content-Type multipart/form-data?
validate_content_length
Validate Content-Length header matches actual body size
validate_content_type_headers
Validate Content-Type header and related requirements
validate_content_type_headers_and_classify
Validate Content-Type and return its classification (if present).
validate_json_content_type
Validate that Content-Type is JSON-compatible when route expects JSON