-
Notifications
You must be signed in to change notification settings - Fork 8
[WIP] Add Json schema support #195
base: master
Are you sure you want to change the base?
Conversation
Great ! We should definitely follow standards ! ref #53 |
I added some changes to the branch, and I updated the description to contain the list of fields we currently support in daybed. I'll be out starting tomorrow for one week, don't hesitate to continue what I started :) |
A few outstanding questions:
|
FWIW, here is the doc I'm using as a reference https://spacetelescope.github.io/understanding-json-schema/ |
For relations between models modelname is a string. |
I was wondering if it is still relevant to have our own schema formalism... I mean, instead of formatting our custom stuff to the standard JSON schema, just accept it as input for model creation ? |
For know it is relevant because our schema is close to what daybed do. |
@leplatrem, I was wondering the exact same thing. I believe what we have for daybed is simpler than json schema, but I may be wrong. Especially, for the geometric fields, there is nothing that deals with them in json schema, so that could be a bit hard to do. For really simple cases, I believe we should accept JSON Schema definitions, and that would make us open to a list of services that already support this formalism. However, that's in my opinion a separate issue. In this one, I think we should focus on outputing a json schema from a daybed (colander) definition. |
for now, mimetype is |
@leplatrem do you have any idea how we can deal with geographic fields here? |
I found only one example, and it looks pretty complete : https://github.com/fge/sample-json-schemas/blob/master/geojson/geometry.json In Daybed we have a geojson geometry field (as above), and some basic geo fields that could be described with the positions part only (coordinates only) |
Here are the types supported by Daybed that we need to convert to JSON Schema:
GeoTypes: