Skip to content

Commit e94dad8

Browse files
authored
Merge pull request #10 from pdowler/table-permissions
Table permissions
2 parents dcc9892 + d6e3442 commit e94dad8

8 files changed

Lines changed: 88 additions & 27 deletions

openapi/uws/uws-responses.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ job-listing:
1717
content:
1818
text/xml:
1919
schema:
20-
type: string
20+
type: object
2121
xml:
2222
name: jobs
2323
prefix: uws
2424
namespace: http://www.ivoa.net/xml/UWS/v1.0
25-
example: |
25+
example: |
2626
<uws:jobs xmlns:uws="http://www.ivoa.net/xml/UWS/v1.0" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">
2727
<uws:jobref id="loqqxg8jlah0r8wp">
2828
<uws:phase>PENDING</uws:phase>
@@ -38,12 +38,12 @@ job:
3838
content:
3939
text/xml:
4040
schema:
41-
type: string
41+
type: object
4242
xml:
4343
name: job
4444
prefix: uws
4545
namespace: http://www.ivoa.net/xml/UWS/v1.0
46-
example: |
46+
example: |
4747
<uws:job xmlns:uws="http://www.ivoa.net/xml/UWS/v1.0" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">
4848
<uws:jobId>loqqxg8jlah0r8wp</uws:jobId>
4949
<uws:ownerId>somebody</uws:ownerId>

openapi/vosi/vosi-auth-read.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# request header
2+
name: x-vosi-auth-read
3+
in: header
4+
description: flag indicating that the resource requires authentication to read
5+
required: false
6+
schema:
7+
type: string
8+
enum: ["true", "false", "null"]
9+

openapi/vosi/vosi-capabilities.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ components:
3737
content:
3838
text/xml:
3939
schema:
40-
type: string
40+
type: object
4141
xml:
4242
name: capabilities
4343
prefix: vosi
4444
namespace: http://www.ivoa.net/xml/VOSICapabilities/v1.0
45-
example: |
45+
example: |
4646
<vosi:capabilities xmlns:vosi="http://www.ivoa.net/xml/VOSICapabilities/v1.0"
4747
xmlns:vr="http://www.ivoa.net/xml/VOResource/v1.0"
4848
xmlns:vs="http://www.ivoa.net/xml/VODataService/v1.1"

openapi/vosi/vosi-group-read.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# request header
2+
name: x-vosi-group-read
3+
in: header
4+
description: a GMS group identifier indicating a group with read permission, or literal null
5+
required: false
6+
schema:
7+
oneOf:
8+
- type: string
9+
format: uri
10+
- type: "null"

openapi/vosi/vosi-group-write.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# request header
2+
name: x-vosi-group-write
3+
in: header
4+
description: a GMS group identifier indicating a group with write permission, or literal null
5+
required: false
6+
schema:
7+
oneOf:
8+
- type: string
9+
format: uri
10+
- type: "null"

openapi/vosi/vosi-owner.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# request header
2+
name: x-vosi-owner
3+
in: header
4+
description: identifier for the owner of the schema or table
5+
required: false
6+
schema:
7+
type: string

openapi/vosi/vosi-table.yaml

Lines changed: 41 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ post:
3434
required: true
3535
schema:
3636
type: string
37+
- $ref: ./vosi-auth-read.yaml
38+
- $ref: ./vosi-group-read.yaml
39+
- $ref: ./vosi-group-write.yaml
40+
- $ref: ./vosi-owner.yaml
3741
requestBody:
3842
description: a table description
3943
$ref: '#/components/schemas/tableDoc'
@@ -65,6 +69,10 @@ put:
6569
required: true
6670
schema:
6771
type: string
72+
- $ref: ./vosi-auth-read.yaml
73+
- $ref: ./vosi-group-read.yaml
74+
- $ref: ./vosi-group-write.yaml
75+
- $ref: ./vosi-owner.yaml
6876
requestBody:
6977
description: a table description
7078
$ref: '#/components/schemas/tableDoc'
@@ -112,14 +120,36 @@ components:
112120
schemas:
113121
tableDoc:
114122
description: metadata for the specified schema or table
123+
headers:
124+
x-vosi-auth-read:
125+
description: flag indicating that the resource requires authentication to read
126+
required: false
127+
schema:
128+
type: string
129+
enum: ["true", "false"]
130+
x-vosi-group-read:
131+
description: a GMS group identifier indicating a group with read permission
132+
required: false
133+
schema:
134+
type: string
135+
x-vosi-group-write:
136+
description: a GMS group identifier indicating a group with write permission
137+
required: false
138+
schema:
139+
type: string
140+
x-vosi-owner:
141+
description: identifier for the owner of the schema or table
142+
required: false
143+
schema:
144+
type: string
115145
content:
116146
text/xml:
117147
schema:
118-
type: object
119-
xml:
120-
name: table
121-
prefix: vosi
122-
namespace: http://www.ivoa.net/xml/VOSITables/v1.0
148+
type: object
149+
xml:
150+
name: table
151+
prefix: vosi
152+
namespace: http://www.ivoa.net/xml/VOSITables/v1.0
123153
example: |
124154
<vosi:table xmlns:vosi="http://www.ivoa.net/xml/VOSITables/v1.0"
125155
xmlns:vs="http://www.ivoa.net/xml/VODataService/v1.1"
@@ -148,18 +178,18 @@ components:
148178
<description>recommended sort order when listing schemas</description>
149179
<dataType xsi:type="vs:VOTableType">int</dataType>
150180
</column>
151-
</vosi:table>
181+
</vosi:table>
152182
application/x-votable+xml:
153183
schema:
154-
type: object
155-
xml:
156-
name: VOTABLE
157-
namespace: http://www.ivoa.net/xml/VOTable/v1.3
184+
type: object
185+
xml:
186+
name: VOTABLE
187+
namespace: http://www.ivoa.net/xml/VOTable/v1.3
158188
example: |
159189
<VOTABLE xmlns="http://www.ivoa.net/xml/VOTable/v1.3"
160190
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.4">
161191
<RESOURCE type="results">
162-
<TABLE>
192+
<TABLE>
163193
<FIELD name="schema_name" datatype="char" arraysize="64*">
164194
<DESCRIPTION>schema name for reference to tap_schema.schemas</DESCRIPTION>
165195
</FIELD>
@@ -172,9 +202,6 @@ components:
172202
<FIELD name="schema_index" datatype="int">
173203
<DESCRIPTION>recommended sort order when listing schemas</DESCRIPTION>
174204
</FIELD>
175-
<!--data goes here-->
176205
</TABLE>
177206
</RESOURCE>
178207
</VOTABLE>
179-
180-

openapi/vosi/vosi-tableset.yaml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ components:
2929
content:
3030
text/xml:
3131
schema:
32-
type: string
33-
xml:
34-
name: tableset
35-
prefix: vosi
36-
namespace: http://www.ivoa.net/xml/VOSITables/v1.0
32+
type: object
33+
xml:
34+
name: tableset
35+
prefix: vosi
36+
namespace: http://www.ivoa.net/xml/VOSITables/v1.0
3737
example: |
3838
<vosi:tableset xmlns:vosi="http://www.ivoa.net/xml/VOSITables/v1.0"
3939
xmlns:vs="http://www.ivoa.net/xml/VODataService/v1.1"
@@ -63,6 +63,4 @@ components:
6363
<description>description of foreign key columns in this tableset</description>
6464
</table>
6565
</schema>
66-
...
6766
</vosi:tableset>
68-

0 commit comments

Comments
 (0)