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

Validation of OGC requirements as standalone YAML #242

Open
opoudjis opened this issue Aug 17, 2021 · 7 comments
Open

Validation of OGC requirements as standalone YAML #242

opoudjis opened this issue Aug 17, 2021 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@opoudjis
Copy link
Contributor

opoudjis commented Aug 17, 2021

metanorma/ogcapi-processes#2 has resulted in the addition of OGC requirements, properly specified, to metanorma-ogc, as documented in https://www.metanorma.org/author/ogc/topics/requirements/

The Modular Specification, https://www.ogc.org/standards/modularspec, has a grammar of OGC requirements, setting out the cardinalities and attributes of different types of requirement; see Appendix C of that document, which is also represented in https://github.com/opengeospatial/NamingAuthority/blob/master/definitions/models/modspec.ttl and in metanorma/metanorma-requirements-models#11 (which resulted in a LutaML encoding of the UML in ModSpec Appendix C).

It is desirable to validate requirements entered for OGC against this model. This validation could be done within metanorma, but it makes more sense to validate OGC requirements as standalone YAML files, to be included into OGC Metanorma documents via a lutaml plugin.

So

[recommendation,label=/ogc/recommendation/wfs/2,obligation=permission,subject=user,inherit=/ss/584/2015/level/1,classification="control-class:Technical;priority:P0"]
.Widgets
====
[.component,class=conditions]
---
. Candidate test subject is a witch
. Widget has been suitably calibrated for aerodynamics
---

[.component,class=part]
---
Determine travel distance by flight path
---

[[a2]]
[.component,class=part]
---
Independently verify flight path
---

Widgets are tested for aerodynamic flight potential in partnership with witches.
Consult local coven for more information.
====

would be sourced as a standalone YAML file looking like:

class: recommendation
type: requirement_class
obligation: permission
label: /ogc/recommendation/wfs/2
subject: user
inherit: /ss/584/2015/level/1
classification:
  control-class: technical
  priority: p0
caption: Widgets
component:
  conditions:
    - Candidate test subject is a witch
    - Widget has been suitably calibrated for aerodynamics
  part:
    - Determine travel distance by flight path
    - Independently verify flight path

text: |
  Widgets are tested for aerodynamic flight potential in partnership with witches.
  Consult local coven for more information.

And the file would be validated by lutaml for conformance to the UML grammar according to its type.

@ghobona
Copy link

ghobona commented Nov 6, 2023

Discussed with OGC staff on 2023-11-06.

Agreement to leave this Issue open until a resource becomes available to work on it.

The resource would be a ruby developer that understands the ModSpec.

@opoudjis opoudjis assigned ronaldtse and unassigned w00lf Dec 10, 2023
@opoudjis opoudjis added the enhancement New feature or request label Dec 10, 2023
@ghobona
Copy link

ghobona commented Feb 15, 2024

Discussed 2024-02-15

Ribose will provide a prototype for showing to the OAB.

@ghobona
Copy link

ghobona commented Mar 19, 2024

@opoudjis to look into whether there is a schema validation tool/language for YAML (e.g. similar to JSON Schema or XSD).

@opoudjis
Copy link
Contributor Author

opoudjis commented Mar 19, 2024

Done in #493 (comment) . There are lots of ad hoc schemas specific to implementations, and done as YAML objects themselves. But the standard way of doing it is JSON Schema, since JSON and YAML are both just serialisations of objects; and there is a well-used Ruby implementation of JSON Schema. JSON Schema is kind of clumsy, but I would recommend its use as a recognised standard.

@ronaldtse
Copy link
Contributor

Validation implementation:

@ronaldtse
Copy link
Contributor

This is done in:

@opoudjis opoudjis self-assigned this Sep 9, 2024
@opoudjis
Copy link
Contributor Author

opoudjis commented Sep 9, 2024

Review and confirm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 👀 In review
Development

No branches or pull requests

4 participants