-
Notifications
You must be signed in to change notification settings - Fork 8
Use JSON schema in definitions #53
Comments
It could be plugable.
http://json-schema.org/latest/json-schema-validation.html#anchor108
Play with this to get an idea: http://exavolt.github.io/onde/#?schema_url=schemas/jquery-package.json |
SPORE Doesn't deal with schemas. Unless I'm missing something it's only about api discovery. |
Thanks for bringing this to the table. Using Json Schema seems indeed something to consider, using our own format wouldn't bring any good. About the concerns you have: Should we replace or supersede what we have with JSONSchema?I'm tempted to say we should use JSONSchema in parallel with the daybed formalism, but it means we need to write translation logic between the two, which I'm not sure would be reliable. If we validate JSONSchema as good enough to do what we are doing atm, maybe we should just switch there. I've made a couple of queries to my search engine of choice and found that someone already did something related, so we may give it a go. (also, it means we lack the other direction, which is json schema to colander). Does it handle what we have or plan?I'm unsure about that, but it seems pretty complete. But JSon Schema doesn't seem to be very easy to extend:
Also, the documentation say they support geo fields, but only lat/long from what I see, which might not be enough for us. The specification document also states that it is about to expire "Expires: August 3, 2013", not sure what it means. Redundancy with SPOREIt's not redundant with SPORE, and can be complimentary. The latter describes APIs in how we interact with them (HTTP Verbs, acceptable status code, resources URI), whereas JSON Schema does, well, schema validation. I'm aware I'm not addressing all the questions you ask, but that's a start. I think we need to start playing with it to be sure of what we do. For now I'm not totally sold to the thing because I find it really complicated, or at least some beginner documentation is not made available. Don't hesitate to share any good doc you found on it here. |
After discussion with @AntoineCezar and debates in issue #9 it seems relevant to use JSON schema for model definitions, instead of our own formalism.
A basic investigation needs to address the following questions:
More generally, should JSON schema validation come as a Cornice extension or as internal Daybed mechanics ?
The text was updated successfully, but these errors were encountered: