Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include examples for individual field values in schema reference page #240

Open
duncandewhurst opened this issue Sep 21, 2020 · 3 comments
Labels
build process This issue relates to the build process

Comments

@duncandewhurst
Copy link
Contributor

In addition to the full worked example, it would be easier to refer implementers to examples for individual fields if these were included in the schema reference tables.

We'd need to look at how to rearrange the reference tables to fit the example in and some examples would be quite long, but we could use collapsing/expanding to take care of that, e.g.

image

@duncandewhurst duncandewhurst added the documentation This issue relates to the documentation label Sep 21, 2020
@stevieflow
Copy link

@duncandewhurst looks interesting.

Tangential, but might be of interest: when @Bjwebb @caprenter and I did the IATI 2.01 documentation, we included the relevant block for the parent element in the (XML) schema, and then highlighted the particular sub-element that was relevant to the documentation page. It involved annotating an example XML file - which was then pulled in via rst. It worked - but was work!

Unfortunately, the latest version of IATI documentation has ripped all that out :) . The annotation in the example file, does remain.

@duncandewhurst
Copy link
Contributor Author

Thanks @stevieflow, I was thinking along similar lines here, i.e. update the jsonschema sphinx directive to pull in the relevant bit of the example JSON file based on the JSON pointer, so I don't think we'd need to annotate the JSON file.

@jpmckinney
Copy link
Member

There are a few places now in which JSON Schema is parsed for presentation. The Extension Explorer adds a few features beyond what sphinxcontrib-jsonschema offers – mainly, better reporting of types (e.g. "Period" with a link to its definition, instead of "object"). open-contracting/ocdskit#151 is about centralizing that logic, so that we don't need to add new features in multiple places going forward.

@jpmckinney jpmckinney changed the title Include examples in schema reference page Include examples for individual fields in schema reference page Nov 30, 2023
@jpmckinney jpmckinney changed the title Include examples for individual fields in schema reference page Include examples for individual field values in schema reference page Dec 7, 2023
@jpmckinney jpmckinney added build process This issue relates to the build process and removed documentation This issue relates to the documentation labels Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build process This issue relates to the build process
Projects
None yet
Development

No branches or pull requests

3 participants