-
Notifications
You must be signed in to change notification settings - Fork 114
Open
Description
In 2020-12 dialect JSchema.ToString(SchemaVersion.Draft2020_12) generate prefixItems keyword instead of items when generating an array. Even if JSchema.ItemsPositionValidation=false. What should be done to generate items when I want to validate array of arbitrary length? According to json-schema docs, prefixItems keyword is used to validate arrays by applying a schema to each corresponding index of the array.
Example of C# type and resulting schema below:
public class TestType
{
public List<string> SomeObjects { get; set; }
}
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"SomeObjects": {
"type": "array",
"prefixItems": {
"type": "string"
}
}
}
}
bootzin and maboivin
Metadata
Metadata
Assignees
Labels
No labels