Skip to content

Possible bug in time schema definition #482

@photonbit

Description

@photonbit

I am working on pygeometa output validation geopython/pygeometa#264 and I've found something that I am not sure if it a problem with my validation implementation, or it is a bug in the standard specification.

In https://schemas.opengis.net/ogcapi/records/part1/1.0/openapi/schemas/recordGeoJSON.yaml, time is defined as

  time:
    oneOf:
      - type: object
        nullable: true
      - $ref: 'time.yaml'

and time.yaml indicates:

---
nullable: true
type: object
properties:
# ...

That makes me see two potential problems:

  • time.yaml is already defining a nullable object, so the case added in recordGeoJSON.yaml is duplicating this case.
  • Any object, empty or not, will validate -type: object and time.yaml. If the duplicated case needs to exist in recordGeoJSON.yaml, then anyOf should be used instead of oneOf.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions