Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

186
Views
What is the purpose of "additionalItems" property on arrays in rjsf?

I'm studying rjsf documentation and I'm confused about the additionalItems section of array docs.

Here is the example code from the docs:

const Form = JSONSchemaForm.default;

const schema = {
  type: "array",
  items: {
    type: "string"
  },
  additionalItems: {
    type: "boolean"
  }
};

ReactDOM.render((
  <Form schema={schema} />
), document.getElementById("app"));

and here is the official codepen

The rendered form seems to behave exactly the same if I remove the additionalItems, so what is the purpose? I guess it has one, since it's explicitly brought up in the docs, but I can't figure it out :)

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

additionalItems: <schema> is used to indicate how items are treated beyond the enumerated items you specify in the schema, or even if they are allowed at all.

In this schema, the first array item must be a string, the second must be a number, but any additional items beyond that are allowed and can be anything:

{
  "type": "array",
  "items": [
    { "type": "string" },
    { "type": "number" }
  ]
}

In this schema, the first item must be a string, the second must be a number, and all items after that must be booleans:

{
  "type": "array",
  "items": [
    { "type": "string" },
    { "type": "number" }
  ],
  "additionalItems": { "type": "boolean" }
}

And in this schema, there are no more items permitted at all after the first two:

{
  "type": "array",
  "items": [
    { "type": "string" },
    { "type": "number" }
  ],
  "additionalItems": false
}

You can read more about this keyword in the documentation: https://json-schema.org/understanding-json-schema/reference/array.html

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!