Extension Field Registry

x-jsonschema-$anchor - The JSON Schema $anchor identifier for a schema resource, used when targeting OpenAPI versions that do not directly support it.

The x-jsonschema-$anchor extension mirrors the JSON Schema $anchor keyword by serializing it as x-jsonschema-$anchor when targeting OpenAPI versions where $anchor is not directly available.

It can appear as a property in the following objects: ["Schema Object"].

Used by: (informational)

Schema

{"type"=>"string"}

Example

openapi: 3.0.4
info:
  title: My API
  version: 1.0.0
paths: {}
components:
  schemas:
    User:
      type: object
      x-jsonschema-$anchor: User
      properties:
        id:
          type: string