openownership / data-standard

The Beneficial Ownership Data Standard (BODS) is an open standard providing a specification for modelling and publishing information on the beneficial ownership and control of corporate vehicles
http://standard.openownership.org
Other
63 stars 13 forks source link

jsonschema directive not building tables from JSON pointer notation? #81

Closed kd-ods closed 5 years ago

kd-ods commented 6 years ago

The jsonschema directive is building tables for person-statement.json, beneficial-ownership-statement.json and so on, but not for the objects defined in components.json. Using this:

.. jsonschema:: ../schema/components.json#/definitions/StatementReference

...generates this error:

/vagrant/data-standard/docs/schema.md:1: WARNING: JSON Schema file not readable: ../schema/components.json#/definitions/StatementReference

See this markdown file for instances. https://github.com/openownership/data-standard/blob/60-refactor-docs/docs/schema.md

Bjwebb commented 6 years ago

You need to use :pointer::

.. jsonschema:: ../schema/components.json
   :pointer: /definitions/StatementReference

(I've not checked this example, so their might be typos, but you can see this in use for OCDS at https://github.com/open-contracting/standard/blob/1.1-dev/standard/docs/en/schema/reference.md#parties)

kd-ods commented 6 years ago

Cheers, Bjwebb! (Is this documented anywhere except its use for OCDS?)

Bjwebb commented 6 years ago

Looks like it isn't, no.