FAQ

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

    json-schema-examples-valid


    Formats: Severity:

    This rule checks that default and examples values match the schema that declares them.

    Bad example

    {
      "type": "integer",
      "default": "large"
    }
    

    Good example

    {
      "type": "integer",
      "default": 3
    }
    

    How do I fix this violation?

    Update the example or default value so it validates against the schema.