spraakbanken / sparv-pipeline

Språkbanken's text analysis tool
https://spraakbanken.gu.se/sparv
MIT License
25 stars 6 forks source link

Make generate JSON Schema compatible with react-jsonschema-form? #177

Open arildm opened 8 months ago

arildm commented 8 months ago

We want to use the sparv schema output to generate a config form in Mink, but some details seem to be missing to be able to properly generate form components.

I pasted the schema at the react-jsonschema-form playground and got some errors:

Note: I don't know yet if react-jsonschema-form is the lib we will want to use for this.

MartinHammarstedt commented 8 months ago

It doesn't seem to like when the datatype is undefined (including the datatype of items in an array). We don't require explicit datatypes in the Sparv config currently, and sometimes you actually want to allow any type of data, which is represented in JSON Schema by NOT specifying the datatype. I'm not sure how to best solve this.