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

Confusing guidance on path notation #259

Open
duncandewhurst opened this issue Jan 13, 2022 · 4 comments
Open

Confusing guidance on path notation #259

duncandewhurst opened this issue Jan 13, 2022 · 4 comments
Assignees

Comments

@duncandewhurst
Copy link
Contributor

According to the guidance on text formatting:

-  When referring to a field in JSON Schema, use dot notation, like ``tender.id``. (Slash notation is reserved for `JSON Pointer <https://tools.ietf.org/html/rfc6901>`__. For example, the JSON Pointer for ``tender.id`` is ``/definitions/Tender/properties/id``.)
-  When referring to a field in OCDS data, use a JSON Pointer, like ``/tender/id``.

According to the guidance on word choice:

When referring to a field, prefer the notation for the path in the data, like ``contracts.period``, rather than the notation for the path in the schema, like ``Contract.period``.

Shouldn't it be /contracts/period if it's the notation for the path in the data?

@jpmckinney
Copy link
Member

jpmckinney commented Jan 13, 2022

There is indeed differing guidance here.

For data, I think slash notation is appropriate. However, we use dot notation quite a lot. To avoid hundreds of changes, I think we can change the guidance to prefer / but allow . – but to always prefer consistency with the proximate docs.

@duncandewhurst
Copy link
Contributor Author

That sounds good to me.

The other challenge helpdesk analysts have with applying the current guidance is determining whether a reference relates to the publisher's data or to the schema; for example, if we tell a publisher to populate field X, is that a reference to the field publisher's data or a reference to the field in the schema?

@jpmckinney
Copy link
Member

jpmckinney commented Jan 14, 2022

It's a reference to the field in the data (you can only populate data, you can't populate schema – the schema is unchanging for a given version). I think we almost never need to talk about the field in the schema.

@duncandewhurst
Copy link
Contributor Author

I'll prepare a PR to update the guidance.

@duncandewhurst duncandewhurst self-assigned this Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants