schemas icon indicating copy to clipboard operation
schemas copied to clipboard

schema in definitions.json should $ref json-table-schema.json

Open danfowler opened this issue 9 years ago • 5 comments

The schema as defined in definitions.json has diverged from json-table-schema.json.

danfowler avatar Jan 21 '16 14:01 danfowler

What's the issue exactly?

It used to be: https://github.com/dataprotocols/schemas/blob/f502096cfd34ede6879942ee8d4a97bd8ff66301/data-package.json#L128

Which has almost no specificity whatsoever. I can't see anything here that is non-compliant. Can you outline the issues?

pwalsh avatar Jan 21 '16 18:01 pwalsh

Having an actual schema for JTS defined in definitions.json is certainly an improvement. But now we have two definitions for JSON Table Schema in this repo: one in definitions.json and one in json-table-schema.json and they are not the same. In the interests of DRY, perhaps we should define the JSON Table Schema only in json-table-schema.json and reference it from definitions.json.

danfowler avatar Jan 22 '16 09:01 danfowler

ok, so it hasn't diverged, but we should consolidate for DRY.

Remember that these schemas are used in very different ways, and every $ref we need to check it does not break any libs we use.

We can pick this up next time someone works on the core libs in Python or Javascript.

pwalsh avatar Jan 22 '16 09:01 pwalsh

:+1:

danfowler avatar Jan 22 '16 09:01 danfowler

@pwalsh Flagging that in https://github.com/frictionlessdata/schemas/pull/55 I stopped short of doing anything related to this issue.

Probably sufficient to do the reverse what I suggested in the title and have json-table-schema.json $ref the schema section of definitions.json like the other schemas. This way an extra $ref resolution is not added to libraries reading any of the Data Package schemas.

danfowler avatar Aug 05 '16 21:08 danfowler