opengeospatial / ogcapi-records

An open standard for the discovery of geospatial resources on the Web.
https://ogcapi.ogc.org/records
Other
56 stars 26 forks source link

Validate all examples #309

Open rob-metalinkage opened 9 months ago

rob-metalinkage commented 9 months ago

See #308 for an example of need for this.

Set up automated validation of examples to avoid this problem.

Contact OGC COSI staff for assistance if required.

OGC Building Blocks templates use a validation pipeline available from https://github.com/opengeospatial/bblocks-postprocess

This could be directly applied or adapted to use the existing repository, or a new OGC building blocks repository set up as a wrapper for all normative and informative content to perform validation and provide an opportunity to undertake further automation such as exercising mappings to other schemas.

pvretano commented 8 months ago

30-OCT-2023: JSON-FG has a script that validates all JSON examples; we will steal it for Records too. @tomkralidis will look into it.

tomkralidis commented 8 months ago

FYI this needs to wait until core/openapi/ogcapi-records-1.yaml is refactored/valid (note that we have discussed implementing the same approach as in OGC API - Coverages).

pvretano commented 7 months ago

SWG meeting 11-DEC-2023: @pvretano will endeavour to validate core/openapi/ogcapi-records-1.yaml before the next SWG meeting so that @tomkralidis can complete his modifications.

tomkralidis commented 6 months ago

@pvretano is core/openapi/ogcapi-records-1.yaml up to date so that I can finish the examples?

kalxas commented 6 months ago

I have merged the above pull request so we can move forward

tomkralidis commented 6 months ago

2024-01-05: I am working on the CI, pending updates to the OpenAPI schema setup (to be discussed at SWG 2024-01-08 meeting.

tomkralidis commented 5 months ago

I took another look at this today. There are a few issues:

grep -R "include::" core/standard/| grep examples
core/standard//clause_7_building_blocks.adoc:include::../examples/json/keywords-themes.json[]
core/standard//clause_7_building_blocks.adoc:include::../examples/json/associations-simple-and-uri-template.json[]
core/standard//clause_7_building_blocks.adoc:include::../examples/json/templated-link-inline.json[]
core/standard//clause_7_building_blocks.adoc:include::../examples/json/templated-link-ref.json[]
core/standard//clause_7_building_blocks.adoc:include::../examples/json/record-collection.json[]
core/standard//clause_7_building_blocks.adoc:include::../examples/json/record.json[]
core/standard//clause_7_building_blocks.adoc:include::../examples/json/defaultSortOrder.json[]
core/standard//clause_7_building_blocks.adoc:include::../examples/json/sortables.json[]
core/standard//annex_common.adoc:include::../examples/json/landingPage.json[]
core/standard//annex_common.adoc:include::../examples/json/conformance.json[]
core/standard//annex_common.adoc:include::../examples/json/collections.json[]
core/standard//annex_common.adoc:include::../examples/json/collection.json[]
core/standard//clause_8_deployments.adoc:include::../examples/yaml/collection-extended.yaml[]

In the meantime, a CI is added in #340 that ensures the complete OpenAPI examples are always tested when a PR is issued the touches those files.

kalxas commented 5 months ago

Shall we close the issue or move it to the backlog? In any case this should not block sending the specification to OAB anymore.

pvretano commented 5 months ago

22-JAN-2024: @pvretano will review the JSON examples to make sure they are consistent with the YAML schemas and close out this issue.