validation considerations
- Dominant language
- Python
- Stars
- 7
- Forks
- 15
- PR merge metrics
- No merged PRs in 30d
Description
follow up from #284
> The mapping from the Pydantic models to the JSON schemas is not one-to-one. Currently, the Pydantic models are the source of truth. In most cases, the Pydantic models are the more restrictive one. This issue in discussion is an exception to that.
what i mean by the validation chain is to determine what piece of code is responsible for validation. either we say that we have jsonschema and pydantic validation, or choose one to be the arbiter of truth (as you say this is currently the pydantic models - but i think the current issue suggests not).
pydantic is of course more flexible and we can say that's where we want validation to be confirmed.
then the question is why we are releasing the json schema and what it's role is for validation. we should really discuss this. where is it being used and why? one area is dandiset metadata with ajv + vue in the meditor. even there we can note that final validation will be done by pydantic when the metadata hits the server. we can have a token based endpoint that simply provides validation using pydantic. are there other use cases of the json schema?
cc: @candleindark @yarikoptic
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.