$schema: https://json-schema.org/draft/2020-12/schema
$defs:
  conceptSchemeOrId:
    oneOf:
    - $ref: https://opengeospatial.github.io/bblocks/annotated-schemas/ogc-utils/iri-or-curie/schema.yaml
    - $ref: '#'
  conceptSchemeOrIdArray:
    oneOf:
    - $ref: '#/$defs/conceptSchemeOrId'
    - type: array
      items:
        $ref: '#/$defs/conceptSchemeOrId'
type: object
properties:
  id:
    $ref: https://opengeospatial.github.io/bblocks/annotated-schemas/ogc-utils/iri-or-curie/schema.yaml
  concepts:
    $ref: https://ogcincubator.github.io/bblocks-skos/build/annotated/skos/concept/schema.yaml#/$defs/conceptOrIdArray
    x-jsonld-reverse: skos:inScheme
    x-jsonld-type: '@id'
  topConcepts:
    $ref: https://ogcincubator.github.io/bblocks-skos/build/annotated/skos/concept/schema.yaml#/$defs/conceptOrIdArray
    x-jsonld-id: skos:hasTopConcept
    x-jsonld-type: '@id'
allOf:
- $ref: https://ogcincubator.github.io/bblocks-skos/build/annotated/skos/common/schema.yaml
oneOf:
- not:
    required:
    - skosType
- required:
  - skosType
  properties:
    skosType:
      const: ConceptScheme
