ThomasAribart / json-schema-to-ts

Infer TS types from JSON schemas 📝
MIT License
1.46k stars 31 forks source link

Support Draft 2020-12 changes to items and additionalItems #190

Open yhuard opened 7 months ago

yhuard commented 7 months ago

Hi!

Thanks for this great lib! I was playing around and noticed that it doesn't fully support JSON Schema Draft 2020-12.

More specifically, do you plan to support the changes introduced in Draft 2020-12 regarding the tuples validation?

The items and additionalItems keywords have been replaced with prefixItems and items where prefixItems has the same functionality as the array-of-schemas for of the old items and the new items keyword has the same functionality as the old additionalItems keyword.

https://json-schema.org/draft/2020-12/release-notes#changes-to-items-and-additionalitems