Skip to content

Commit

Permalink
Add schemas for remaining responses.
Browse files Browse the repository at this point in the history
  • Loading branch information
rpgoldman committed Apr 13, 2022
1 parent d2ff28d commit a2d0fff
Showing 1 changed file with 114 additions and 14 deletions.
128 changes: 114 additions & 14 deletions src/main/resources/docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,20 +57,14 @@ paths:
content:
application/json:
schema:
type: object
properties:
isConsistent:
type: boolean
label:
type: string
logicalAxiomsCount:
type: integer
$ref: "#/components/schemas/kbInfo"
examples:
response:
value:
label: uberon
isConsistent: true
logicalAxiomsCount: 43938

"/kbs/{kb}/subclasses":
get:
tags:
Expand Down Expand Up @@ -103,7 +97,8 @@ paths:
summary: an anonymous expression, using prefix definitions
- name: prefixes
in: query
description: JSON format prefix map, used to expand prefixes in the 'object'
description: >-
JSON format prefix map, used to expand prefixes in the 'object'
expression
required: false
schema:
Expand Down Expand Up @@ -141,6 +136,27 @@ paths:
description: subclasses
content:
application/json:
schema:
type: object
additionalProperties:
type: object
properties:
value:
type: object
properties:
"@id":
type: string
format: uri
superClassOf:
type: array
items:
type: string
format: uri
value:
type: string
required:
- "@id"
- superClassOf
examples:
named class:
value:
Expand Down Expand Up @@ -230,6 +246,22 @@ paths:
description: superclasses
content:
application/json:
schema:
type: object
properties:
'@id':
type: string
format: uri
value:
type: string
subClassOf:
type: array
items:
type: string
format: uri
required:
- "@id"
- subClassOf
examples:
named class:
value:
Expand Down Expand Up @@ -304,6 +336,27 @@ paths:
description: equivalent classes
content:
application/json:
schema:
type: object
additionalProperties:
type: object
properties:
value:
type: object
properties:
"@id":
type: string
format: uri
equivalentClass:
type: array
items:
type: string
format: uri
value:
type: string
required:
- "@id"
- equivalentClass
examples:
named class:
value:
Expand Down Expand Up @@ -365,6 +418,19 @@ paths:
description: satisfiability
content:
application/json:
schema:
type: object
properties:
"@id":
type: string
format: uri
isSatisfiable:
type: boolean
value:
type: string
required:
- "@id"
- isSatisfiable
examples:
named class:
value:
Expand Down Expand Up @@ -420,6 +486,17 @@ paths:
description: instances
content:
application/json:
schema:
type: object
properties:
"@id":
type: string
format: uri
hasInstance:
type: array
items:
type: string
format: uri
examples:
named class:
value:
Expand Down Expand Up @@ -509,7 +586,9 @@ paths:
'200':
description: SPARQL results
content:
application/sparql-results+xml: {}
application/sparql-results+xml:
schema:
type: string
post:
tags:
- SPARQL
Expand All @@ -530,20 +609,24 @@ paths:
application/sparql-query:
schema:
type: string
format: SPARQL query
# format: SPARQL query
example: SELECT ?x WHERE { ?x a "blah"}
application/x-www-form-urlencoded:
schema:
type: object
properties:
query:
type: string
format: SPARQL query
# format: SPARQL query
required:
- query
responses:
'200':
description: SPARQL results
description: SPARQL results
content:
application/json:
schema:
type: string
"/kbs/{kb}/expand":
get:
tags:
Expand All @@ -568,7 +651,9 @@ paths:
'200':
description: Expanded SPARQL query
content:
application/sparql-query: {}
application/sparql-query:
schema:
type: string
post:
tags:
- SPARQL
Expand Down Expand Up @@ -602,6 +687,10 @@ paths:
responses:
'200':
description: SPARQL results
content:
application/json:
schema:
type: string
components:
schemas:
prefixMap:
Expand All @@ -616,4 +705,15 @@ components:
type: string
format: JSON
example: '{"obo": "http://purl.obolibrary.org/obo/", "part_of": "http://purl.obolibrary.org/obo/BFO_0000050"}'
kbInfo:
description: >-
Information provided about a specific KB.
type: object
properties:
isConsistent:
type: boolean
label:
type: string
logicalAxiomsCount:
type: integer

0 comments on commit a2d0fff

Please sign in to comment.