Skip to content

[Json Schema] Increase coverage of constraints/validators #4

@Krever

Description

@Krever

Lets make all of the below result in a validator and that we have tests for it

🔤 String Constraints

  • minLength: Minimum number of characters
  • maxLength: Maximum number of characters
  • pattern: Regular expression the string must match

🔢 Number / Integer Constraints

  • minimum: Minimum value (inclusive)
  • maximum: Maximum value (inclusive)
  • exclusiveMinimum: Must be strictly greater than this value
  • exclusiveMaximum: Must be strictly less than this value
  • multipleOf: Must be a multiple of the given number

Other

  • const: Value must match exactly

📦 Array Constraints

  • minItems: Minimum number of elements
  • maxItems: Maximum number of elements
  • uniqueItems: All elements must be unique

🧩 Object Constraints

  • minProperties: Minimum number of properties
  • maxProperties: Maximum number of properties

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions