Skip to content

Commit cf01fe0

Browse files
committed
Add schemas for remaining responses.
1 parent d2ff28d commit cf01fe0

File tree

1 file changed

+59
-6
lines changed

1 file changed

+59
-6
lines changed

src/main/resources/docs/swagger.yaml

Lines changed: 59 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,27 @@ paths:
141141
description: subclasses
142142
content:
143143
application/json:
144+
schema:
145+
type: object
146+
additionalProperties:
147+
type: object
148+
properties:
149+
value:
150+
type: object
151+
properties:
152+
"@id":
153+
type: string
154+
format: uri
155+
superClassOf:
156+
type: array
157+
items:
158+
type: string
159+
format: uri
160+
value:
161+
type: string
162+
required:
163+
- "@id"
164+
- superClassOf
144165
examples:
145166
named class:
146167
value:
@@ -230,6 +251,27 @@ paths:
230251
description: superclasses
231252
content:
232253
application/json:
254+
schema:
255+
type: object
256+
additionalProperties:
257+
type: object
258+
properties:
259+
value:
260+
type: object
261+
properties:
262+
'@id':
263+
type: string
264+
format: uri
265+
value:
266+
type: string
267+
subClassOf:
268+
type: array
269+
items:
270+
type: string
271+
format: uri
272+
required:
273+
- "@id"
274+
- subClassOf
233275
examples:
234276
named class:
235277
value:
@@ -509,7 +551,9 @@ paths:
509551
'200':
510552
description: SPARQL results
511553
content:
512-
application/sparql-results+xml: {}
554+
application/sparql-results+xml:
555+
schema:
556+
type: string
513557
post:
514558
tags:
515559
- SPARQL
@@ -530,20 +574,24 @@ paths:
530574
application/sparql-query:
531575
schema:
532576
type: string
533-
format: SPARQL query
577+
# format: SPARQL query
534578
example: SELECT ?x WHERE { ?x a "blah"}
535579
application/x-www-form-urlencoded:
536580
schema:
537581
type: object
538582
properties:
539583
query:
540584
type: string
541-
format: SPARQL query
585+
# format: SPARQL query
542586
required:
543587
- query
544588
responses:
545589
'200':
546-
description: SPARQL results
590+
description: SPARQL results
591+
content:
592+
application/json:
593+
schema:
594+
type: string
547595
"/kbs/{kb}/expand":
548596
get:
549597
tags:
@@ -568,7 +616,9 @@ paths:
568616
'200':
569617
description: Expanded SPARQL query
570618
content:
571-
application/sparql-query: {}
619+
application/sparql-query:
620+
schema:
621+
type: string
572622
post:
573623
tags:
574624
- SPARQL
@@ -602,6 +652,10 @@ paths:
602652
responses:
603653
'200':
604654
description: SPARQL results
655+
content:
656+
application/json:
657+
schema:
658+
type: string
605659
components:
606660
schemas:
607661
prefixMap:
@@ -616,4 +670,3 @@ components:
616670
type: string
617671
format: JSON
618672
example: '{"obo": "http://purl.obolibrary.org/obo/", "part_of": "http://purl.obolibrary.org/obo/BFO_0000050"}'
619-

0 commit comments

Comments
 (0)