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

Part 5: relating the Schema requirement class to Part 1 describedBy #928

Open
rouault opened this issue Jun 4, 2024 · 4 comments
Open
Assignees

Comments

@rouault
Copy link
Contributor

rouault commented Jun 4, 2024

Neither https://docs.ogc.org/DRAFTS/23-058.html#overview nor https://docs.ogc.org/DRAFTS/23-058.html#rc_schemas recall that in Part 1 there's already a way to associate a schema with a FeatureCollection by specifying a "rel": "describedBy" link in the FeatureCollection description. I don't know if that must be a requirement for Part 5, or just a note, but that would be worth recalling.

Hum actually looking at https://demo.ldproxy.net/daraa/collections/CulturePnt, I see a { "rel" : "http://www.opengis.net/def/rel/ogc/0.0/schema", "title" : "Schema of features in 'Cultural (Points)'", "href" : "https://demo.ldproxy.net/daraa/collections/CulturePnt/schema" }, where the rel value relates to the one mentioned in https://docs.ogc.org/DRAFTS/23-058.html#_additional_link_relation_types

but no describedBy. So this raises the question: is describedBy deprecated?

@cportele
Copy link
Member

cportele commented Jun 4, 2024

Good point, thank you for raising this.

The reason why Part 5 adds the "schema" link relation type and does no reference the "descibedby" link relation type is that JSON Schema recommends the "describedby" link relation type for linking to the JSON Schema from a JSON instance.

The issue is that while the schema as specified in Part 5 describes the feature properties, it cannot be used directly to validate a GeoJSON or JSON-FG instance using a JSON Schema validator. See this discussion.

Based on the recommendation in JSON Schema, it was our assumption that most software that sees a "describedby" link from a JSON document to a resource with media type application/schema+json would expect that the schema can be used to validate the instance. To avoid this, we decided to mint and use specific media types for the link to the Part 5 schemas.

"describedby" is not deprecated, but it should be used in links from a JSON document to a JSON Schema that can be used to validate the JSON document.

We should make this clearer in Part 5 and also in Part 1.

Does this make sense?

@rouault
Copy link
Contributor Author

rouault commented Jun 4, 2024

Does this make sense?

yes, thanks, that makes sense.

We should make this clearer in Part 5 and also in Part 1.

+1 as the difference between the "physical" schema of describedBy and the "logical" schema of Part 5 is quite subtle when you are not aware of it.

@cportele cportele self-assigned this Jun 4, 2024
@cportele cportele moved this from To do to To be drafted in Features Part 5: Schemas Jun 4, 2024
@cportele
Copy link
Member

cportele commented Jun 4, 2024

Thanks, I will work on a pull request.

@cportele
Copy link
Member

cportele commented Jul 1, 2024

Meeting 2024-07-01: Agreed, we should clarify this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: To be drafted
Development

No branches or pull requests

2 participants