FAQ

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

    oas-schema-check


    Formats: Severity:

    This checks that all schemas have a valid type, and perform basic type validation on the schema based on the JSON Schema specification.

    Why did this violation appear?

    The schema identified does not have a valid type. Allowed types:

    • string
    • number
    • integer
    • boolean
    • array
    • object

    If the schema does contain one of these types, it’s failed one of the other type checks, such as:

    String

    • minLength - The minimum length of the string
    • maxLength - The maximum length of the string
    • pattern - A ECMA-262 regular expression pattern to match against

    Number

    • minimum - The minimum value of the number
    • maximum - The maximum value of the number
    • exclusiveMinimum - The minimum value of the number, exclusive
    • exclusiveMaximum - The maximum value of the number, exclusive
    • multipleOf - The number must be a multiple of this value

    Object

    • minProperties - The minimum number of properties allowed
    • maxProperties - The maximum number of properties allowed
    • required - The required properties of the object

    Array

    • minItems - The minimum number of items allowed
    • maxItems - The maximum number of items allowed
    • minContains - The minimum number of items that must match the ‘contains’ schema
    • maxContains - The maximum number of items that must match the ‘contains’ schema

    How do I fix this violation?

    Fix the schema type and corresponding type validation.