opengeospatial / ogcapi-processes

Home Page:https://ogcapi.ogc.org/processes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Metadata schemas should allow in-line process metadata.

pvretano opened this issue · comments

Right now, according to the schema in metadata.yaml a process can only reference metadata about the process.

It would be nice if (a) the reference mechanism just used the standard link schema and (b) allowed the metadata to be encoded in-line to make it easier to harvest by a catalog (for example).

A revised schema might look like this:

oneOf:
  - type: object
  - $ref: ../common/link.yaml

... or, it we want to preserve backward compatability, it could look like this

oneOf:
  - type: object
    properties:
       title:
          type: string
       role:
          type: string
       href:
          type: string
  - type: object
    properties:
       title:
          type: string
       role:
          type: string
       value:
          type: object

I'm open to other suggestions ...

I support this proposal. CRIM's implementation already supports this unofficially.
The specific definitions we employ is as follows (aka oneOf metadata.yaml and link.yaml but with added role) :

image

@fmigneault looks good ... the only difference from what I am doing is that value, in my implementation, is an object rather than a string so that I can embed structred metadata.

How does this schema for metadata.yaml look to you?

oneOf:
  - allOf:
    - $ref: ../common-core/link.yaml
    - type: object
      properties:
        role:
          type: string
  - type: object
    properties:
       role:
          type: string
       title:
          type: string
       lang:
          type: string
       value:
         oneOf:
           - type: string
           - type: object

@pvretano Yes that looks good.