open-contracting / extension-explorer

Disclose more data about your contracting processes, using extensions to the Open Contracting Data Standard
https://extensions.open-contracting.org/
BSD 3-Clause "New" or "Revised" License
3 stars 0 forks source link

Schema: Location of definitions #17

Open kindly opened 6 years ago

kindly commented 6 years ago

At the moment the schema reference page just gives the list of all the fields within all the definitions that exist in the extension.

It would be useful to also display what paths (i.e jsonpointer paths) within the schema showing where those definitions live.

timgdavies commented 6 years ago

In thinking this through, I think we hit a slight issue in that it may only be useful to know about the dereferenced schema paths, but this can lead to lots of duplication of information. E.g. if you extend 'value' object, you don't really want to show users every single place this is changed.

I think though we can interpret updates to things in "/definitions" as 'additional fields every where that object X is used', and updates to things under '/properties' as 'additional fields in X section'.

I've mocked this up below.

image

I've mocked this up below. Note also that in this mock up I've:

kindly commented 6 years ago

@timgdavies thanks for the mockup. That was pretty close to what I was getting at.

/awards/items /tender/items /contract/items

This extension introduces the following properties to the objects at those locations:


So we just show *all* the dereferenced paths, as that seems to be the most useful.  I do not think there will ever be too many for this to be a problem, even for the Value object in my opinion, but we could have a cutoff of say 5 (and perhaps a modal showing them all).
jpmckinney commented 5 years ago

I've done part of this. The remaining parts are: