kinto-admin
kinto-admin copied to clipboard
Validate provided collection JSON schema
I've just spent a few unecessary minutes trying to figure out a weird error I had in the admin because I misspelled properties in my schema, while it was accepted just fine when submitted.
We should validate the entered JSON schema, eg. using https://github.com/mafintosh/is-my-json-valid.
We should validate the entered JSON schema, eg. using https://github.com/mafintosh/is-my-json-valid.
WELL, probably not with this one.

We already have a JSON schema validator actually.
https://github.com/Kinto/kinto/blob/master/kinto/views/collections.py#L24
Well, could it be tweaked a little then? Entering this doesn't make it fail :/
{
"type": "object",
"porperties": {
"content": {
"type": "string"
},
"title": {
"type": "string"
}
}
}
Note porperties.
For example if there's an option to disallow unknown JSON schema property names in the schema itself, that would be nice.
Duplicate of #253 ?
Not really, here the purpose would be to check that the entered json schema actually matches the json schema spec.
Closed with PR 3043.