Skip to content

Commit

Permalink
add dataset schema
Browse files Browse the repository at this point in the history
  • Loading branch information
antony-wilson committed May 13, 2024
1 parent ce15793 commit 45a61aa
Showing 1 changed file with 184 additions and 3 deletions.
187 changes: 184 additions & 3 deletions mod_api/static/mod_api/openAPI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ components:
- ttl
- xml
default: html
example: html

artefact:
description: The UID of the artefact.
Expand Down Expand Up @@ -119,6 +118,22 @@ components:
schema:
type: string

resources:
description: "OK"
content:
text/html:
schema:
$ref: "#/components/schemas/html"
text/turtle:
schema:
type: string
application/json:
schema:
type: string
application/rdf+xml:
schema:
type: string

error_message:
description: The provided parameters are incorrect.
content:
Expand Down Expand Up @@ -246,10 +261,34 @@ components:
- $ref: '#/components/schemas/Resource'
- type: object
properties:
accrualPeriodicity:
title: frequency
description: The frequency at which dataset is published.
$ref: "http://purl.org/dc/terms/Frequency"
distribution:
title: dataset distribution
description: An available distribution of the dataset.
$ref: "#/components/schemas/Distribution"
spatial:
title: spatial/geographical coverage
description: The geographical area covered by the dataset.
$ref: "http://purl.org/dc/terms/Location"
spatialResolutionInMeters:
title: spatial resolution
description: Minimum spatial separation resolvable in a dataset, measured in meters.
type: number
temporal:
title: temporal coverage
description: The temporal period that the dataset covers.
$ref: "http://purl.org/dc/terms/PeriodOfTime"
temporalResolution:
title: temporal resolution
description: Minimum time period resolvable in the dataset.
$ref: "https://www.w3.org/TR/xmlschema11-2/#duration"
wasGeneratedBy:
title: was generated by
description: An activity that generated, or provides the business context for, the creation of the dataset.
$ref: "https://www.w3.org/TR/prov-o/#Activity"

DctermsAgent:
title: Agent
Expand Down Expand Up @@ -278,6 +317,7 @@ components:
DctRelation:
title: Relation
description: A related resource.

DctRightsStatement:
title: Rights Statement
description: A statement about the intellectual property rights (IPR) held in or over a resource, a legal document giving official permission to do something with a resource, or a statement about access rights.
Expand Down Expand Up @@ -731,7 +771,7 @@ paths:
"200":
$ref: "#/components/responses/notes"

# Information about a semantic artefacts
# Information about a semantic artefact
/artefact/{artefact}:
parameters:
- $ref: "#/components/parameters/artefact"
Expand Down Expand Up @@ -767,7 +807,6 @@ paths:
"404":
$ref: "#/components/responses/error_message"


# Information about a semantic artefact catalog record
/artefact/{artefact}/record:
parameters:
Expand All @@ -786,4 +825,146 @@ paths:
"404":
$ref: "#/components/responses/error_message"

# Get an iterator over all the resources within an artefact
/artefact/{artefact}/resources:
parameters:
- $ref: "#/components/parameters/artefact"
- $ref: "#/components/parameters/format_param"

get:
tags:
- Artefact
summary: Get an iterator over all the resources within an artefact.
description: Retrieves an iterator over all the resources within an artefact.
operationId: getRecord
responses:
"200":
$ref: "#/components/responses/resources"
"404":
$ref: "#/components/responses/error_message"

# Get an iterator over all owl:Classes within an artefact
/artefact/{artefact}/classes:
parameters:
- $ref: "#/components/parameters/artefact"
- $ref: "#/components/parameters/format_param"

get:
tags:
- Artefact
summary: Get an iterator over all owl:Classes within an artefact.
description: Retrieves an iterator over all owl:Classes within an artefact.
operationId: getRecord
responses:
"200":
$ref: "#/components/responses/resources"
"404":
$ref: "#/components/responses/error_message"

# Get an iterator over all skos:Concept within an artefact
/artefact/{artefact}/concepts:
parameters:
- $ref: "#/components/parameters/artefact"
- $ref: "#/components/parameters/format_param"

get:
tags:
- Artefact
summary: Get an iterator over all skos:Concept within an artefact.
description: Retrieves an iterator over all skos:Concept within an artefact.
operationId: getRecord
responses:
"200":
$ref: "#/components/responses/resources"
"404":
$ref: "#/components/responses/error_message"

# Get an iterator over all the rdf:Property within an artefact
/artefact/{artefact}/properties:
parameters:
- $ref: "#/components/parameters/artefact"
- $ref: "#/components/parameters/format_param"

get:
tags:
- Artefact
summary: Get an iterator over all the rdf:Property within an artefact.
description: Retrieves an iterator over all the rdf:Property within an artefact.
operationId: getRecord
responses:
"200":
$ref: "#/components/responses/resources"
"404":
$ref: "#/components/responses/error_message"

# Get an iterator over all the instances (owl individuals) within an artefact
/artefact/{artefact}/individuals:
parameters:
- $ref: "#/components/parameters/artefact"
- $ref: "#/components/parameters/format_param"

get:
tags:
- Artefact
summary: Get an iterator over all the instances (owl individuals) within an artefact.
description: Retrieves an iterator over all the instances (owl individuals) within an artefact.
operationId: getRecord
responses:
"200":
$ref: "#/components/responses/resources"
"404":
$ref: "#/components/responses/error_message"

# Get an iterator over all the skos:Scheme within an artefact
/artefact/{artefact}/schemes:
parameters:
- $ref: "#/components/parameters/artefact"
- $ref: "#/components/parameters/format_param"

get:
tags:
- Artefact
summary: Get an iterator over all the skos:Scheme within an artefact.
description: Retrieves an iterator over all the skos:Scheme within an artefact.
operationId: getRecord
responses:
"200":
$ref: "#/components/responses/resources"
"404":
$ref: "#/components/responses/error_message"

# Get an iterator over all the skos:Collection within an artefact
/artefact/{artefact}/collection:
parameters:
- $ref: "#/components/parameters/artefact"
- $ref: "#/components/parameters/format_param"

get:
tags:
- Artefact
summary: Get an iterator over all the skos:Collection within an artefact.
description: Retrieves an iterator over all the skos:Collection within an artefact.
operationId: getRecord
responses:
"200":
$ref: "#/components/responses/resources"
"404":
$ref: "#/components/responses/error_message"

# Get an iterator over all the skos-xl:Label within an artefact
/artefact/{artefact}/labels:
parameters:
- $ref: "#/components/parameters/artefact"
- $ref: "#/components/parameters/format_param"

get:
tags:
- Artefact
summary: Get an iterator over all the skos-xl:Label within an artefact.
description: Retrieves an iterator over all the skos-xl:Label within an artefact.
operationId: getRecord
responses:
"200":
$ref: "#/components/responses/resources"
"404":
$ref: "#/components/responses/error_message"

0 comments on commit 45a61aa

Please sign in to comment.