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

Validate all examples #309

Open
rob-metalinkage opened this issue Oct 7, 2023 · 9 comments · Fixed by #329
Open

Validate all examples #309

rob-metalinkage opened this issue Oct 7, 2023 · 9 comments · Fixed by #329
Assignees

Comments

@rob-metalinkage
Copy link

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
Copy link
Contributor

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
Copy link
Contributor

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 pvretano self-assigned this Dec 11, 2023
@pvretano
Copy link
Contributor

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
Copy link
Contributor

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

@kalxas
Copy link
Member

kalxas commented Jan 2, 2024

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

@tomkralidis
Copy link
Contributor

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
Copy link
Contributor

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

  • core/examples/json: some JSONs here are examples that can be directly validated against a JSON schema, others are partial snippets that are used in the document:
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
Copy link
Member

kalxas commented Jan 20, 2024

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
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Review
Development

Successfully merging a pull request may close this issue.

4 participants