Skip to content

Commit 1c6e496

Browse files
authored
Merge pull request #13 from pdowler/main
minor updates to basic openapi descriptions
2 parents 870369b + 2cba627 commit 1c6e496

8 files changed

Lines changed: 362 additions & 177 deletions

openapi-example.yaml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
openapi: 3.1.0
22
info:
33
title: VOSI endpoints
4-
version: "1.1"
5-
description: This is more or less the current VOSAI-1.1 standard.
4+
version: "1.2"
5+
description: This is an example of using VOSI-1.2 components.
66
servers:
77
- url: /example
88
paths:
@@ -14,10 +14,6 @@ paths:
1414
/tables/{name}:
1515
$ref: ./vosi-table.yaml
1616
#$ref: https://ivoa.net/std/VOSI/vosi-table.yaml
17-
18-
/availability:
19-
$ref: ./paths/vosi-availability.yaml
20-
#$ref: https://ivoa.net/std/VOSI/vosi-availability.yaml
2117
/capabilities:
2218
$ref: ./paths/vosi-capabilities.yaml
2319
#$ref: https://ivoa.net/std/VOSI/vosi-capabilities.yaml

openapi/vosi-table.yaml

Lines changed: 0 additions & 128 deletions
This file was deleted.

openapi/vosi-tableset.yaml

Lines changed: 0 additions & 37 deletions
This file was deleted.
Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ head:
1010
applicable header information. SSO-next: clients use this operation to probe
1111
for available authentication methods.
1212
responses:
13-
200:
13+
'200':
1414
$ref: ./vosi-std-responses.yaml#/authenticated
15-
401:
15+
'401':
1616
$ref: ./vosi-std-responses.yaml#/not-authenticated
17-
403:
17+
'403':
1818
$ref: ./vosi-std-responses.yaml#/permission-denied
1919
get:
2020
operationId: read-capabilities
@@ -23,11 +23,11 @@ get:
2323
summary: VOSI Capabilities with SSO-next prototype
2424
description: Get the set of VOResource capability descriptions for this service.
2525
responses:
26-
200:
26+
'200':
2727
$ref: '#/components/schemas/capabilities'
28-
401:
28+
'401':
2929
$ref: ./vosi-std-responses.yaml#/not-authenticated
30-
403:
30+
'403':
3131
$ref: ./vosi-std-responses.yaml#/permission-denied
3232

3333
components:
@@ -42,3 +42,15 @@ components:
4242
name: capabilities
4343
prefix: vosi
4444
namespace: http://www.ivoa.net/xml/VOSICapabilities/v1.0
45+
example: |
46+
<vosi:capabilities xmlns:vosi="http://www.ivoa.net/xml/VOSICapabilities/v1.0"
47+
xmlns:vr="http://www.ivoa.net/xml/VOResource/v1.0"
48+
xmlns:vs="http://www.ivoa.net/xml/VODataService/v1.1"
49+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
50+
<capability standardID="ivo://ivoa.net/std/VOSI#capabilities">
51+
<interface xsi:type="vs:ParamHTTP" role="std">
52+
<accessURL use="full">https://example.net/tap-service/capabilities</accessURL>
53+
</interface>
54+
</capability>
55+
...
56+
</vosi:capabilities>

openapi/vosi/vosi-table-11.yaml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# this is the read-only /tables/{tableName} endpoint from VOSI-1.1
2+
get:
3+
operationId: read-table-metadata
4+
tags:
5+
- VOSI Table Metadata
6+
summary: get metadata for the specified table
7+
description: provides the table metadata for a single schema or table
8+
parameters:
9+
- in: path
10+
name: name
11+
description: a single schema name or table name as provided in tap_schema
12+
required: true
13+
schema:
14+
type: string
15+
responses:
16+
'200':
17+
$ref: '#/components/schemas/tableDoc'
18+
'401':
19+
$ref: ./vosi-std-responses.yaml#/not-authenticated
20+
'403':
21+
$ref: ./vosi-std-responses.yaml#/permission-denied
22+
'404':
23+
$ref: ./vosi-std-responses.yaml#/not-found
24+
25+
components:
26+
schemas:
27+
tableDoc:
28+
description: metadata for the specified schema or table
29+
content:
30+
text/xml:
31+
schema:
32+
type: object
33+
xml:
34+
name: table
35+
prefix: vosi
36+
namespace: http://www.ivoa.net/xml/VOSITables/v1.0
37+
example: |
38+
<vosi:table xmlns:vosi="http://www.ivoa.net/xml/VOSITables/v1.0"
39+
xmlns:vs="http://www.ivoa.net/xml/VODataService/v1.1"
40+
xmlns:vte="http://www.opencadc.org/xml/VOSITables-ext/v0.1"
41+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" type="output">
42+
<name>tap_schema.schemas</name>
43+
<description>description of schemas in this tableset</description>
44+
<column>
45+
<name>schema_name</name>
46+
<description>schema name for reference to tap_schema.schemas</description>
47+
<dataType xsi:type="vs:VOTableType" arraysize="64*">char</dataType>
48+
<flag>indexed</flag>
49+
</column>
50+
<column>
51+
<name>utype</name>
52+
<description>lists the utypes of schemas in the tableset</description>
53+
<dataType xsi:type="vs:VOTableType" arraysize="512*">char</dataType>
54+
</column>
55+
<column>
56+
<name>description</name>
57+
<description>describes schemas in the tableset</description>
58+
<dataType xsi:type="vs:VOTableType" arraysize="512*">char</dataType>
59+
</column>
60+
<column>
61+
<name>schema_index</name>
62+
<description>recommended sort order when listing schemas</description>
63+
<dataType xsi:type="vs:VOTableType">int</dataType>
64+
</column>
65+
</vosi:table>
66+
67+
application/x-votable+xml:
68+
schema:
69+
type: object
70+
xml:
71+
name: VOTABLE
72+
namespace: http://www.ivoa.net/xml/VOTable/v1.3
73+
example: |
74+
<VOTABLE xmlns="http://www.ivoa.net/xml/VOTable/v1.3"
75+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.4">
76+
<RESOURCE type="results">
77+
<TABLE>
78+
<FIELD name="schema_name" datatype="char" arraysize="64*">
79+
<DESCRIPTION>schema name for reference to tap_schema.schemas</DESCRIPTION>
80+
</FIELD>
81+
<FIELD name="utype" datatype="char" arraysize="512*">
82+
<DESCRIPTION>lists the utypes of schemas in the tableset</DESCRIPTION>
83+
</FIELD>
84+
<FIELD name="description" datatype="char" arraysize="512*">
85+
<DESCRIPTION>describes schemas in the tableset</DESCRIPTION>
86+
</FIELD>
87+
<FIELD name="schema_index" datatype="int">
88+
<DESCRIPTION>recommended sort order when listing schemas</DESCRIPTION>
89+
</FIELD>
90+
<!--data goes here-->
91+
</TABLE>
92+
</RESOURCE>
93+
</VOTABLE>
94+

0 commit comments

Comments
 (0)