Conclusion 2023-04-21
Closing this issue. Originally opened because Teams Engine compliance tests on demo service based on Hakunapi complained about some requirements ("Precondition: requirement class http://www.opengis.net/spec/ogcapi-features-2/1.0/req/crs must be implemented"). However this referred to a standard requirement class (req
), not to a conformance class (conf
).
Hakunapi currently provides conformance classes in conf
form when requested by /conformance
resource as specified by code ConformanceClass.java. This should be correct and so this issue is closed. If there are some services based on Hakunapi that uses req
form, those services must be fixed.
The demo service should be fine:
https://beta-paikkatieto.maanmittauslaitos.fi/inspire-addresses/features/v1/conformance
Issue description 2023-04-06
Not clear is this an issue with the OGC API Features standard definitions (that has conflicting definitions) or an issue with Hakunapi implementation.
OGC API - Features - Part 2
OGC API - Features - Part 2 (https://docs.opengeospatial.org/is/18-058r1/18-058r1.html) has some conflicting definitions:
- chapter 2: conformance:
http://www.opengis.net/spec/ogcapi-features-2/1.0/conf/crs.
- chapter 6: Requirements Class Coordinate Reference Systems by Reference:
http://www.opengis.net/spec/ogcapi-features-2/1.0/req/crs
- Annex A: Abstract Test Suite (Normative):
http://www.opengis.net/spec/ogcapi-features-2/1.0/conf/crs
OGC API - Features - Part 1
Latest approved standard: https://docs.ogc.org/is/17-069r4/17-069r4.html
Chapter 2 (conformance) defines:
http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/core
http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/html
http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson
http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/gmlsf0
http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/gmlsf2
http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30
But then chapters 7 - 9 (specifications of these classes) define something other:
http://www.opengis.net/spec/ogcapi-features-1/1.0/req/core
http://www.opengis.net/spec/ogcapi-features-1/1.0/req/html
http://www.opengis.net/spec/ogcapi-features-1/1.0/req/geojson
http://www.opengis.net/spec/ogcapi-features-1/1.0/req/gmlsf0
http://www.opengis.net/spec/ogcapi-features-1/1.0/req/gmlsf2
http://www.opengis.net/spec/ogcapi-features-1/1.0/req/oas30
Chapter 7.4. Declaration of conformance classes has a sample for conformance/
resource:
{
"conformsTo": [
"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/core",
"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30",
"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/html",
"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson"
]
}
The Annex A: Abstract Test Suite (Normative) :
http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/core
http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson
http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/gmlsf0
http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/gmlsf2
http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/html
http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30
Hakunapi usage can be demonstrated by demo app (published in #18) : https://beta-paikkatieto.maanmittauslaitos.fi/inspire-addresses/features/v1/conformance
Hakunapi uses following classes, which is correct according to chapter 2 and (normative) annex A but not correct according to chapters 7-9:
http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/core
http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30
http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson
http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/html
Also Hakunapi uses following class that's not defined by standard:
http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/gpkg
OGC API - Features - Part 3: Filtering
Latest draft: http://docs.ogc.org/DRAFTS/19-079r1.html
Chapter 2 (conformance):
http://www.opengis.net/spec/ogcapi-features-3/1.0/conf/filter
http://www.opengis.net/spec/ogcapi-features-3/1.0/conf/features-filter
Chapters 6 - 9
http://www.opengis.net/spec/ogcapi-features-3/1.0/req/queryables
http://www.opengis.net/spec/ogcapi-features-3/1.0/req/queryables-query-parameters
http://www.opengis.net/spec/ogcapi-features-3/1.0/req/filter
http://www.opengis.net/spec/ogcapi-features-3/1.0/req/features-filter
Annex A: Abstract Test Suite (Normative)
http://www.opengis.net/spec/ogcapi-features-3/1.0/conf/queryables
http://www.opengis.net/spec/ogcapi-features-3/1.0/conf/queryables-query-parameters
http://www.opengis.net/spec/ogcapi-features-3/1.0/conf/filter
http://www.opengis.net/spec/ogcapi-features-3/1.0/conf/features-filter
Again conflicting definitions on the standard draft.
Hakunapi uses currently
http://www.opengis.net/spec/ogcapi-features-3/1.0/conf/filter
http://www.opengis.net/spec/ogcapi-features-3/1.0/conf/features-filter
Common Query Language CQL 2
Latest draft: https://docs.ogc.org/DRAFTS/21-065.html
Chapter 2 (conformance)
Chapter 6 - 8 defines a format like http://www.opengis.net/spec/cql2/1.0/req/basic-cql2
for all conformance/requirement classes mentioned above. And appendix A using conf
OGC API - Common
The standard OGC API - Common - Part 1: Core
- This Standard identifies five conformance classes. The conformance classes implemented by an OGC API are advertised through the /conformance resource on the implementation instance of the API’s landing page. Each conformance class is defined by one requirements class.
- 9.3. Declaration of Conformance Classes
- ease of access is also supported by the structure of the Conformance Declaration resource. It is a simple list of URIs. This is a structure that requires almost no parsing and little interpretation and is designed to be accessible to even the simplest client.
- example:
http://www.opengis.net/spec/ogcapi-common-1/1.0/conf/core
-
- Encoding requirement classes, defines for example:
http://www.opengis.net/spec/ogcapi-common-1/1.0/req/html
http://www.opengis.net/spec/ogcapi-common-1/1.0/req/json
- A.4. Conformance Class JSON
This would clearly suggest that we should use the identifier, here for JSON the identifier is http://www.opengis.net/spec/ogcapi-common-1/1.0/conf/json
to announce (for example in /conformance resource) a conformance class that is defined by a requirement class.
But then this standard strikes again.
B.2. Conformance Examples
This example response in JSON is for an implementation of the OGC API-Common Standard that supports OpenAPI 3.0 for the API definition, as well as HTML and JSON as encodings for resources.
{
"conformsTo": [
"http://www.opengis.net/spec/ogcapi-common-1/1.0/req/core",
"http://www.opengis.net/spec/ogcapi-common-1/1.0/req/landing-page",
"http://www.opengis.net/spec/ogcapi-common-1/1.0/req/oas30",
"http://www.opengis.net/spec/ogcapi-common-1/1.0/req/html",
"http://www.opengis.net/spec/ogcapi-common-1/1.0/req/json"
]
}
This would suggest using http://www.opengis.net/spec/ogcapi-common-1/1.0/req/json
as an identifier!