Closed
Description
Misbehaved clients might pose a problem if they pull a schema over the network every time it's being validated against, when it's instead possible to cache for a long period of time. Server owners won't like JSON Schema very much if this becomes a problem.
JSON Schema does not rely on or need HTTP, even if schemas are referenced with an http
or https
URI. However, in some hypermedia cases, it is still useful to download schemas over the network.
For these cases, add a section about behavior of clients when they make HTTP requests:
- Clients SHOULD set or prepend a User-Agent header specific to the JSON Schema implementation, that is not merely the HTTP library being used (if any). e.g. Instead of
User-Agent: curl/7.43.0
useUser-Agent: so-cool-json-schema/1.0.2 curl/7.43.0
. Since symbols are listed in decreasing order of significance, the JSON Schema library name/version goes first, then the more generic HTTP library name (if any) - Clients SHOULD set a
From
header so that server operators can contact the owner of a potentially misbehaving script. - Clients SHOULD observe caching headers and not re-request documents within their freshness period
Metadata
Metadata
Assignees
Labels
No labels