question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add JsonSchema array support for minItems, maxItems

See original GitHub issue

See reference: https://json-schema.org/understanding-json-schema/reference/array.html#length

It should be possible to define a schema like:

jsonSchema {
  array(minItems = 2, maxItems = 100) { string() } 
}

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
nor-ekcommented, May 10, 2022

can assign me

0reactions
Kantiscommented, Aug 29, 2022

Sorry, the last item was closed with https://github.com/kotest/kotest/pull/3026 . All done ✅

Read more comments on GitHub >

github_iconTop Results From Across the Web

array — Understanding JSON Schema 2020-12 documentation
In JSON, each element in an array may be of a different type. ... The length of the array can be specified using...
Read more >
Assigning maxItems property in an array in JSON Schema ...
This way you get an indirect way to modify values (just need to modify minArrayItems). Another option is to add a pre-processing step...
Read more >
Variable arrays of elements in DFHJS2LS - IBM
An array with a varying number of elements is represented in the JSON schema by using the minItems and maxItems keywords in the...
Read more >
Arrays - JSON Schema
We can restrict the contents of an array using a JSON Schema. ... arrRes := items | additems | minitems | maxitems |...
Read more >
JSON Schema in RDF - W3C
This document introduces an RDF vocabulary for JSON schema definitions. ... 2.3.8 format; 2.3.9 maxItems; 2.3.10 maxLength; 2.3.11 maximum; 2.3.12 minItems ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found