opengeospatial / ogcapi-common

OGC API - Common provides those elements shared by most or all of the OGC API standards to ensure consistency across the family.
https://ogcapi.ogc.org/common
Other
48 stars 14 forks source link

Add resourceType or itemType property to Collection metadata #310

Open ghobona opened 2 years ago

ghobona commented 2 years ago

There are several implementations that support multiple OGC API Standards.

Further, in the Compliance Program the Validator(TEAM Engine) needs to be able to support software that implements multiple OGC API Standards. In order to differentiate between collections of different resources, it is necessary to provide a hint or some metadata to identify the resource type offered by a collection.

During the May 2022, there was a suggestion for itemType/resourceType to be an array.

cmheazel commented 2 years ago

To maintain compatibility with API-Features, we could add an itemTypes property. ItemType is string. ItemTypes an array of strings. Since neither property is required, this should not break interoperability.

cmheazel commented 2 years ago

SWG meeting June 15, 2022 - Consensus is that the behavior of the ItemType element can vary between different API Standards that deal with items (/item). This makes if inappropriate to specify it in Common.

Suggested approach is to look at the rel element of the link from /collections and /collections/{collectionId} to the collection. This element should indicate the type of resource.

cmheazel commented 2 years ago

Action for Naming Authority - establish a way of checking that two different API Standards are not using a rel in a manner which is inconsistent with other API Standards.

cmheazel commented 2 years ago

Remove itemtype from document, contingent on not breaking EDR API.

cmheazel commented 2 years ago

A review of the text shows that while itemType is included in the schema, it is not a required element. Furthermore there are no requirements governing the use of the itemType element. Recommendation (4) "If the members (items) that make up a collection can be individually accessed by a client, then the itemType key SHOULD be included in the Collection resource to indicate the type of the items (e.g. feature or record)" seems both correct and useful. It should be retained. No change to the document seems to be required.