Skip to content

Commit

Permalink
DSS-2696: Update with latest OpenAPI doc
Browse files Browse the repository at this point in the history
  • Loading branch information
netmackan committed Nov 20, 2023
1 parent 7fe2129 commit 390de5b
Show file tree
Hide file tree
Showing 2 changed files with 137 additions and 5 deletions.
88 changes: 83 additions & 5 deletions signserver/doc/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"$ref" : "#/components/schemas/WorkerRequest"
}
}
}
},
"required" : true
},
"responses" : {
"400" : {
Expand Down Expand Up @@ -62,6 +63,54 @@
}
}
},
"/workers/reload" : {
"post" : {
"summary" : "Reload workers",
"description" : "Submit a list of worker IDs to reload configurations from the database. The request without body reloads all the workers.",
"requestBody" : {
"description" : "The request",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ReloadRequest"
}
}
}
},
"responses" : {
"400" : {
"description" : "Bad request from the client",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorMessage"
}
}
}
},
"404" : {
"description" : "No such worker",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorMessage"
}
}
}
},
"500" : {
"description" : "The server were unable to process the request. See server-side logs for more details.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorMessage"
}
}
}
}
}
}
},
"/workers/{idOrName}/process" : {
"post" : {
"summary" : "Submit data for processing",
Expand Down Expand Up @@ -89,7 +138,8 @@
"$ref" : "#/components/schemas/ProcessRequest"
}
}
}
},
"required" : true
},
"responses" : {
"400" : {
Expand Down Expand Up @@ -166,7 +216,8 @@
"$ref" : "#/components/schemas/WorkerRequest"
}
}
}
},
"required" : true
},
"responses" : {
"400" : {
Expand All @@ -189,6 +240,16 @@
}
}
},
"404" : {
"description" : "No such worker",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorMessage"
}
}
}
},
"200" : {
"description" : "Properties replaced successfully",
"content" : {
Expand Down Expand Up @@ -217,7 +278,8 @@
"$ref" : "#/components/schemas/WorkerRequest"
}
}
}
},
"required" : true
},
"responses" : {
"400" : {
Expand Down Expand Up @@ -326,7 +388,8 @@
"$ref" : "#/components/schemas/WorkerRequest"
}
}
}
},
"required" : true
},
"responses" : {
"400" : {
Expand Down Expand Up @@ -424,6 +487,21 @@
}
}
},
"ReloadRequest" : {
"description" : "Represents a reload request.",
"required" : [ "workerIDs" ],
"type" : "object",
"properties" : {
"workerIDs" : {
"description" : "List of worker IDs to reload.",
"type" : "array",
"items" : {
"format" : "int32",
"type" : "integer"
}
}
}
},
"WorkerRequest" : {
"description" : "Represents a worker request.",
"type" : "object",
Expand Down
54 changes: 54 additions & 0 deletions signserver/doc/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/WorkerRequest'
required: true
responses:
"400":
description: Bad request from the client
Expand All @@ -41,6 +42,37 @@ paths:
description: Worker added successfully
content:
application/json: {}
/workers/reload:
post:
summary: Reload workers
description: Submit a list of worker IDs to reload configurations from the database.
The request without body reloads all the workers.
requestBody:
description: The request
content:
application/json:
schema:
$ref: '#/components/schemas/ReloadRequest'
responses:
"400":
description: Bad request from the client
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
"404":
description: No such worker
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
"500":
description: The server were unable to process the request. See server-side
logs for more details.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
/workers/{idOrName}/process:
post:
summary: Submit data for processing
Expand All @@ -63,6 +95,7 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/ProcessRequest'
required: true
responses:
"400":
description: Bad request from the client
Expand Down Expand Up @@ -113,6 +146,7 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/WorkerRequest'
required: true
responses:
"400":
description: Bad request from the client
Expand All @@ -127,6 +161,12 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
"404":
description: No such worker
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
"200":
description: Properties replaced successfully
content:
Expand All @@ -148,6 +188,7 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/WorkerRequest'
required: true
responses:
"400":
description: Bad request from the client
Expand Down Expand Up @@ -221,6 +262,7 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/WorkerRequest'
required: true
responses:
"400":
description: Bad request from the client
Expand Down Expand Up @@ -287,6 +329,18 @@ components:
type: object
additionalProperties:
type: string
ReloadRequest:
description: Represents a reload request.
required:
- workerIDs
type: object
properties:
workerIDs:
description: List of worker IDs to reload.
type: array
items:
format: int32
type: integer
WorkerRequest:
description: Represents a worker request.
type: object
Expand Down

0 comments on commit 390de5b

Please sign in to comment.