You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As I did not find an open issue regarding that, I wanted to ask if there is currently work being done to support the new syntax, or if it's still open. Alternatively I wanted to ask if there is a workaround to use this draft version, in case these changes are not wanted for this library.
On a first look through the library it appeared like only this method needed to be changed:
private addProperty() {
let itemSchema = this.schema.items
if (Array.isArray(this.schema.items)) {
const itemSchemas = this.schema.items as object[]
if (itemSchemas.length > (<FormProperty[]>this.properties).length) {
itemSchema = itemSchema[(<FormProperty[]>this.properties).length]
} else if (this.schema.additionalItems) {
itemSchema = this.schema.additionalItems
} else {
// souldn't add new items since schema is undefined for the item at its position
return null
}
}
let newProperty = this.formPropertyFactory.createProperty(itemSchema, this);
(<FormProperty[]>this.properties).push(newProperty);
return newProperty;
}
It may be enough to just use "prefixItems" instead of "items" and "items" instead of "additionalItems" to implement the new changes, as it appears that they are effectively just renamed in the new draft.
The text was updated successfully, but these errors were encountered:
In the latest json schema draft the syntax has changed for arrays and how additional items are being defined.
See: https://json-schema.org/draft/2020-12/release-notes.html
As I did not find an open issue regarding that, I wanted to ask if there is currently work being done to support the new syntax, or if it's still open. Alternatively I wanted to ask if there is a workaround to use this draft version, in case these changes are not wanted for this library.
On a first look through the library it appeared like only this method needed to be changed:
It may be enough to just use "prefixItems" instead of "items" and "items" instead of "additionalItems" to implement the new changes, as it appears that they are effectively just renamed in the new draft.
The text was updated successfully, but these errors were encountered: