Looking to master JSON Schema for OpenAPI?

A 9+ hour course taught by a member of the JSON Schema Technical Steering Committee

externalDocs : Object

externalDocs

Object

Points to an external resource that further documents the schema.

Value This keyword must be set to an object that declares a url string, optionally a description string, and optionally any number of x- prefixed extensions Hint: Use the jsonschema metaschema and jsonschema lint commands to catch keywords set to invalid values
Kind Other
Applies To Any
Base Dialect 2020-12
Changed In None
Introduced In OpenAPI 3.1
Vocabulary OpenAPI 3.2
Specification https://spec.openapis.org/oas/v3.2.1.html#schema-external-docs
Metaschema https://spec.openapis.org/oas/3.2/meta/2026-02-26
Official Tests None
Default None
Annotation None
Affected By
Affects None
Also See

The externalDocs keyword points to an external resource that further documents the schema it occurs in, such as a reference page or a guide. It declares a required url and an optional description that may use CommonMark 0.27 syntax. This keyword does not affect validation and is not an annotation.

Examples

A schema that constrains object instances and points to its documentation Schema
{
  "$schema": "https://spec.openapis.org/oas/3.2/dialect/2026-02-26",
  "type": "object",
  "externalDocs": {
    "description": "The *Pet* data model",
    "url": "https://example.com/docs/pet.html"
  }
}
Valid An object value is valid, and the declared documentation plays no part in the outcome Instance
{ "kind": "cat" }
Invalid A non-object value is invalid Instance
"Misty"
A schema whose relative documentation references resolve against its identifier Schema
{
  "$schema": "https://spec.openapis.org/oas/3.2/dialect/2026-02-26",
  "$id": "https://example.com/schemas/pet",
  "externalDocs": { "url": "../docs/pet.html" },
  "properties": {
    "kind": {
      "type": "string",
      "externalDocs": {
        "url": "../docs/kind.html",
        "x-internal-id": 7
      }
    }
  }
}
Valid An object value that matches the declared property is valid Instance
{ "kind": "cat" }
Invalid An object value that does not match the declared property is invalid Instance
{ "kind": 7 }