FAQ

  • GitHub GitHub Repo stars
  • Discord Discord Server
  • ✨ New! Try the OpenAPI Doctor ✨ The OpenAPI Doctor
    Recommended

    json-schema-ref-valid


    Formats: Severity:

    This rule checks that ordinary JSON Schema $ref values resolve.

    Reference resolution is handled by vacuum’s libopenapi-backed index and rolodex pipeline. Dynamic references such as $dynamicRef and recursive references are preserved and are not treated as ordinary lexical $ref values.

    Why did this violation appear?

    A $ref points to a file, URL or JSON Pointer that vacuum could not resolve.

    Bad example

    {
      "$ref": "#/$defs/Hat"
    }
    

    without a matching root $defs.Hat.

    Good example

    {
      "$defs": {
        "Hat": {
          "type": "string"
        }
      },
      "$ref": "#/$defs/Hat"
    }
    

    How do I fix this violation?

    Fix the reference target, add the missing $defs entry, or bundle the schema if it is part of an exploded schema pack.