Adapt to JSON Schema 2020-12 changes in items
#534
Labels
JSON Schemas
Editing of WorkflowTask arguments based on JSON Schemas
items
#534
There is at least one more issue related to #531, which will require a bit more work (i.e. handling/testing
pydantic_v1
andpydantic_v2
schemas in different ways).Pydantic V2 generates JSON Schemas that comply with draft 2020-12, which means that they follow the new style for items: https://json-schema.org/draft/2020-12/release-notes#changes-to-items-and-additionalitems. Briefly
Starting from a task Python function with an argument
arg_A: tuple[int, int] = (1, 1)
, we end up with this kind of JSON Schema:which currently cannot be loaded in fractal-web, due to
error compiling schema Error: strict mode: unknown keyword: "prefixItems"
.Since we need to tackle this question on the form-generation side, let's also check whether we should configure ajv differently for the two
pydantic_v1/v2
cases, that is by specifying the JSON Schema draft explicitly.The text was updated successfully, but these errors were encountered: