Merged in feature/openapifixes (pull request #106)
OpenAPI Middleware & Fixes * updates
This commit is contained in:
+121
-5
@@ -4,6 +4,13 @@ info:
|
||||
title: Query Orchestration API
|
||||
description: API documentation for the Query Orchestration services.
|
||||
version: 0.0.1
|
||||
contact:
|
||||
email: mmcguinness@aarete.com
|
||||
name: Michael McGuinness
|
||||
url: doczy.com
|
||||
license:
|
||||
name: unlicensed
|
||||
url: "www.example.com"
|
||||
servers:
|
||||
- url: https://doczy.com/v1
|
||||
description: Production server
|
||||
@@ -48,6 +55,10 @@ paths:
|
||||
$ref: "#/components/schemas/ClientIDBody"
|
||||
"400":
|
||||
$ref: "#/components/responses/InvalidRequest"
|
||||
"401":
|
||||
$ref: "#/components/responses/Unauthorized"
|
||||
"429":
|
||||
$ref: "#/components/responses/TooManyRequests"
|
||||
"500":
|
||||
$ref: "#/components/responses/InternalError"
|
||||
|
||||
@@ -74,6 +85,10 @@ paths:
|
||||
$ref: "#/components/schemas/DocClient"
|
||||
"400":
|
||||
$ref: "#/components/responses/InvalidRequest"
|
||||
"401":
|
||||
$ref: "#/components/responses/Unauthorized"
|
||||
"429":
|
||||
$ref: "#/components/responses/TooManyRequests"
|
||||
"500":
|
||||
$ref: "#/components/responses/InternalError"
|
||||
patch:
|
||||
@@ -99,6 +114,10 @@ paths:
|
||||
$ref: "#/components/headers/RateLimit"
|
||||
"400":
|
||||
$ref: "#/components/responses/InvalidRequest"
|
||||
"401":
|
||||
$ref: "#/components/responses/Unauthorized"
|
||||
"429":
|
||||
$ref: "#/components/responses/TooManyRequests"
|
||||
"500":
|
||||
$ref: "#/components/responses/InternalError"
|
||||
|
||||
@@ -123,6 +142,10 @@ paths:
|
||||
$ref: "#/components/schemas/ListQueries"
|
||||
"400":
|
||||
$ref: "#/components/responses/InvalidRequest"
|
||||
"401":
|
||||
$ref: "#/components/responses/Unauthorized"
|
||||
"429":
|
||||
$ref: "#/components/responses/TooManyRequests"
|
||||
"500":
|
||||
$ref: "#/components/responses/InternalError"
|
||||
post:
|
||||
@@ -152,6 +175,10 @@ paths:
|
||||
$ref: "#/components/schemas/IdMessage"
|
||||
"400":
|
||||
$ref: "#/components/responses/InvalidRequest"
|
||||
"401":
|
||||
$ref: "#/components/responses/Unauthorized"
|
||||
"429":
|
||||
$ref: "#/components/responses/TooManyRequests"
|
||||
"500":
|
||||
$ref: "#/components/responses/InternalError"
|
||||
|
||||
@@ -178,6 +205,10 @@ paths:
|
||||
$ref: "#/components/schemas/Query"
|
||||
"400":
|
||||
$ref: "#/components/responses/InvalidRequest"
|
||||
"401":
|
||||
$ref: "#/components/responses/Unauthorized"
|
||||
"429":
|
||||
$ref: "#/components/responses/TooManyRequests"
|
||||
"500":
|
||||
$ref: "#/components/responses/InternalError"
|
||||
patch:
|
||||
@@ -203,6 +234,10 @@ paths:
|
||||
$ref: "#/components/headers/RateLimit"
|
||||
"400":
|
||||
$ref: "#/components/responses/InvalidRequest"
|
||||
"401":
|
||||
$ref: "#/components/responses/Unauthorized"
|
||||
"429":
|
||||
$ref: "#/components/responses/TooManyRequests"
|
||||
"500":
|
||||
$ref: "#/components/responses/InternalError"
|
||||
|
||||
@@ -236,6 +271,10 @@ paths:
|
||||
$ref: "#/components/schemas/QueryTestResponse"
|
||||
"400":
|
||||
$ref: "#/components/responses/InvalidRequest"
|
||||
"401":
|
||||
$ref: "#/components/responses/Unauthorized"
|
||||
"429":
|
||||
$ref: "#/components/responses/TooManyRequests"
|
||||
"500":
|
||||
$ref: "#/components/responses/InternalError"
|
||||
|
||||
@@ -262,6 +301,10 @@ paths:
|
||||
$ref: "#/components/schemas/ClientStatusBody"
|
||||
"400":
|
||||
$ref: "#/components/responses/InvalidRequest"
|
||||
"401":
|
||||
$ref: "#/components/responses/Unauthorized"
|
||||
"429":
|
||||
$ref: "#/components/responses/TooManyRequests"
|
||||
"500":
|
||||
$ref: "#/components/responses/InternalError"
|
||||
|
||||
@@ -288,6 +331,10 @@ paths:
|
||||
$ref: "#/components/schemas/Collector"
|
||||
"400":
|
||||
$ref: "#/components/responses/InvalidRequest"
|
||||
"401":
|
||||
$ref: "#/components/responses/Unauthorized"
|
||||
"429":
|
||||
$ref: "#/components/responses/TooManyRequests"
|
||||
"500":
|
||||
$ref: "#/components/responses/InternalError"
|
||||
patch:
|
||||
@@ -313,6 +360,10 @@ paths:
|
||||
$ref: "#/components/headers/RateLimit"
|
||||
"400":
|
||||
$ref: "#/components/responses/InvalidRequest"
|
||||
"401":
|
||||
$ref: "#/components/responses/Unauthorized"
|
||||
"429":
|
||||
$ref: "#/components/responses/TooManyRequests"
|
||||
"500":
|
||||
$ref: "#/components/responses/InternalError"
|
||||
|
||||
@@ -339,6 +390,10 @@ paths:
|
||||
$ref: "#/components/schemas/ListDocuments"
|
||||
"400":
|
||||
$ref: "#/components/responses/InvalidRequest"
|
||||
"401":
|
||||
$ref: "#/components/responses/Unauthorized"
|
||||
"429":
|
||||
$ref: "#/components/responses/TooManyRequests"
|
||||
"500":
|
||||
$ref: "#/components/responses/InternalError"
|
||||
|
||||
@@ -365,6 +420,10 @@ paths:
|
||||
$ref: "#/components/schemas/Document"
|
||||
"400":
|
||||
$ref: "#/components/responses/InvalidRequest"
|
||||
"401":
|
||||
$ref: "#/components/responses/Unauthorized"
|
||||
"429":
|
||||
$ref: "#/components/responses/TooManyRequests"
|
||||
"500":
|
||||
$ref: "#/components/responses/InternalError"
|
||||
|
||||
@@ -398,6 +457,10 @@ paths:
|
||||
$ref: "#/components/schemas/IdMessage"
|
||||
"400":
|
||||
$ref: "#/components/responses/InvalidRequest"
|
||||
"401":
|
||||
$ref: "#/components/responses/Unauthorized"
|
||||
"429":
|
||||
$ref: "#/components/responses/TooManyRequests"
|
||||
"500":
|
||||
$ref: "#/components/responses/InternalError"
|
||||
|
||||
@@ -424,6 +487,10 @@ paths:
|
||||
$ref: "#/components/schemas/ExportDetails"
|
||||
"400":
|
||||
$ref: "#/components/responses/InvalidRequest"
|
||||
"401":
|
||||
$ref: "#/components/responses/Unauthorized"
|
||||
"429":
|
||||
$ref: "#/components/responses/TooManyRequests"
|
||||
"500":
|
||||
$ref: "#/components/responses/InternalError"
|
||||
|
||||
@@ -467,8 +534,9 @@ components:
|
||||
type: string
|
||||
pattern: "^[0-9]+;window=[0-9]+$"
|
||||
maxLength: 32
|
||||
example: 100;window=60
|
||||
description: Rate limit information in format "limit;window=time-window"
|
||||
example: "100;window=60"
|
||||
example: "100;window=10"
|
||||
|
||||
securitySchemes:
|
||||
placeholderAuth:
|
||||
@@ -483,12 +551,48 @@ components:
|
||||
headers:
|
||||
RateLimit:
|
||||
$ref: "#/components/headers/RateLimit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorMessage"
|
||||
|
||||
InternalError:
|
||||
description: Internal server error.
|
||||
headers:
|
||||
RateLimit:
|
||||
$ref: "#/components/headers/RateLimit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorMessage"
|
||||
|
||||
TooManyRequests:
|
||||
description: Response upon too many requests.
|
||||
headers:
|
||||
RateLimit:
|
||||
$ref: "#/components/headers/RateLimit"
|
||||
Retry-After:
|
||||
schema:
|
||||
type: integer
|
||||
format: int32
|
||||
minimum: 0
|
||||
maximum: 86400
|
||||
description: Number of seconds before trying again.
|
||||
example: 120
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorMessage"
|
||||
|
||||
Unauthorized:
|
||||
description: Response when unauthorized.
|
||||
headers:
|
||||
RateLimit:
|
||||
$ref: "#/components/headers/RateLimit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorMessage"
|
||||
|
||||
schemas:
|
||||
ClientID:
|
||||
@@ -698,7 +802,7 @@ components:
|
||||
pattern: "^.+$"
|
||||
|
||||
DocumentSummary:
|
||||
description: The document properties.
|
||||
description: The document summary properties.
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
@@ -722,13 +826,10 @@ components:
|
||||
fields:
|
||||
type: object
|
||||
description: "The fields and the value for the document"
|
||||
additionalProperties: true
|
||||
example:
|
||||
property1: "string value"
|
||||
property2: 42
|
||||
property3: true
|
||||
property4:
|
||||
nestedProperty: "nested value"
|
||||
property5: [1, 2, 3]
|
||||
required:
|
||||
- id
|
||||
@@ -929,3 +1030,18 @@ components:
|
||||
required:
|
||||
- client_id
|
||||
- status
|
||||
|
||||
ErrorMessage:
|
||||
description: Description of error
|
||||
type: object
|
||||
properties:
|
||||
message:
|
||||
type: string
|
||||
pattern: "^.+$"
|
||||
description: Message describing the cause.
|
||||
maxLength: 256
|
||||
example: "you must give me good information"
|
||||
required:
|
||||
- message
|
||||
example:
|
||||
message: you must include a message
|
||||
|
||||
Reference in New Issue
Block a user