Skip to content

Commit

Permalink
Merge branch 'openapi'
Browse files Browse the repository at this point in the history
  • Loading branch information
pdowler committed Nov 13, 2024
2 parents fd4336e + 2999b28 commit 81ea9d7
Show file tree
Hide file tree
Showing 10 changed files with 146 additions and 0 deletions.
35 changes: 35 additions & 0 deletions openapi/openapi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
openapi: 3.1.0
info:
title: TAP service endpoints
version: "1.1"
description: This is more or less the current TAP-1.1 standard.
servers:
- url: /example
paths:
# notes: the tap openapi components are included here;
# the uws- and vosi- components are not included here and would have to
# use the $ref: {URL} style or be pulled in when building the complete
# stand-alone spec/document structure (TBD)
/sync:
$ref: ./tap-sync.yaml

/async:
$ref: ./tap-async.yaml
/async/{jobID}:
$ref: ./include/UWS/uws-job.yaml
#$ref: https://ivoa.net/std/UWS/uws-job.yaml
## TODO: more resources under /async/{jobID} here...

/tables:
$ref: ./include/VOSI/vosi-tableset.yaml
#$ref: https://ivoa.net/std/VOSI/vosi-tableset.yaml
/tables/{name}:
$ref: ./include/VOSI/vosi-table.yaml
#$ref: https://ivoa.net/std/VOSI/vosi-table.yaml

/availability:
$ref: ./include/VOSI/vosi-availability.yaml
#$ref: https://ivoa.net/std/VOSI/vosi-availability.yaml
/capabilities:
$ref: ./include/VOSI/vosi-capabilities.yaml
#$ref: https://ivoa.net/std/VOSI/vosi-capabilities.yaml
6 changes: 6 additions & 0 deletions openapi/parameters/dali-maxrec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: MAXREC
in: query
description: request a specific limit on number of rows to return
schema:
type: integer
format: int64
5 changes: 5 additions & 0 deletions openapi/parameters/dali-responseformat.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name: RESPONSEFORMAT
in: query
description: select output table format
schema:
type: string
5 changes: 5 additions & 0 deletions openapi/parameters/tap-format.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name: FORMAT
in: query
description: "supported for backwards compatibility to 1.0 (see: RESPONSEFORMAT)"
schema:
type: string
6 changes: 6 additions & 0 deletions openapi/parameters/tap-lang.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: LANG
in: query
description: specify the query language used in the QUERY parameter
required: true
schema:
type: string
6 changes: 6 additions & 0 deletions openapi/parameters/tap-query.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: QUERY
in: query
description: specify the query
required: true
schema:
type: string
5 changes: 5 additions & 0 deletions openapi/parameters/tap-upload.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name: UPLOAD
in: query
description: specify name,location pair for a table to be uploaded and used in the query
schema:
type: string
28 changes: 28 additions & 0 deletions openapi/tap-async.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
get:
summary: UWS 1.1
description: async job listing
parameters:
responses:
200:
$ref: ./include/UWS/uws-responses.yaml#/job-listing
401:
$ref: ./include/VOSI/std-responses.yaml#/not-authenticated
403:
$ref: ./include/VOSI/std-responses.yaml#/permission-denied
post:
summary: TAP-async 1.1
description: TAP asynchronous query endpoint (create UWS Job)
parameters:
- $ref: ./parameters/tap-lang.yaml
- $ref: ./parameters/tap-query.yaml
- $ref: ./parameters/tap-upload.yaml
- $ref: ./parameters/tap-format.yaml
- $ref: ./parameters/dali-maxrec.yaml
- $ref: ./parameters/dali-responseformat.yaml
responses:
303:
$ref: ./include/UWS/uws-responses.yaml#/created
401:
$ref: ./include/VOSI/std-responses.yaml#/not-authenticated
403:
$ref: ./include/VOSI/std-responses.yaml#/permission-denied
7 changes: 7 additions & 0 deletions openapi/tap-responses.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# UWS create job response
invalid-query:
description: the requested TAP query job is invalid; this is usually the ADQL query
content:
text/plain:
schema:
type: string
43 changes: 43 additions & 0 deletions openapi/tap-sync.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
get:
summary: TAP-sync 1.1
description: TAP synchronous query endpoint
parameters:
- $ref: ./parameters/tap-lang.yaml
- $ref: ./parameters/tap-query.yaml
- $ref: ./parameters/tap-upload.yaml
- $ref: ./parameters/tap-format.yaml
- $ref: ./parameters/dali-maxrec.yaml
- $ref: ./parameters/dali-responseformat.yaml
responses:
200:
description: successful response
303:
description: redirect to the job result (optional)
400:
$ref: ./tap-responses.yaml#/invalid-query
401:
$ref: ./include/VOSI/std-responses.yaml#/not-authenticated
403:
$ref: ./include/VOSI/std-responses.yaml#/permission-denied
post:
summary: TAP-sync 1.1
description: TAP synchronous query endpoint
parameters:
- $ref: ./parameters/tap-lang.yaml
- $ref: ./parameters/tap-query.yaml
- $ref: ./parameters/tap-upload.yaml
- $ref: ./parameters/tap-format.yaml
- $ref: ./parameters/dali-maxrec.yaml
- $ref: ./parameters/dali-responseformat.yaml
responses:
200:
description: successful response
303:
description: redirect to the job result (optional)
400:
$ref: ./tap-responses.yaml#/invalid-query
401:
$ref: ./include/VOSI/std-responses.yaml#/not-authenticated
403:
$ref: ./include/VOSI/std-responses.yaml#/permission-denied

0 comments on commit 81ea9d7

Please sign in to comment.