Skip to content

jsonschema: Add support for mentioning minItems and maxItems if repeated validation present #123

@gauravojha

Description

@gauravojha

If the field is a repeated field, it allows to add validations on minItems and maxItems. There is a json schema support to mention this in the generated schema for the type array.

Currently, when the jsonschema is generated, it doesn't mention the minItems and maxItems for the array. Adding this support would really be helpful as when we generate a json schema for a repeated field, the schema will mention any item constraints for the array.

https://tour.json-schema.org/content/04-Arrays/01-Specifying-Length-of-an-Array

https://www.learnjsonschema.com/2020-12/validation/minitems/
https://www.learnjsonschema.com/2020-12/validation/maxitems/

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