diff --git a/signserver/doc/openapi.json b/signserver/doc/openapi.json index 7170432bc..11836337d 100644 --- a/signserver/doc/openapi.json +++ b/signserver/doc/openapi.json @@ -20,7 +20,8 @@ "$ref" : "#/components/schemas/WorkerRequest" } } - } + }, + "required" : true }, "responses" : { "400" : { @@ -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", @@ -89,7 +138,8 @@ "$ref" : "#/components/schemas/ProcessRequest" } } - } + }, + "required" : true }, "responses" : { "400" : { @@ -166,7 +216,8 @@ "$ref" : "#/components/schemas/WorkerRequest" } } - } + }, + "required" : true }, "responses" : { "400" : { @@ -189,6 +240,16 @@ } } }, + "404" : { + "description" : "No such worker", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorMessage" + } + } + } + }, "200" : { "description" : "Properties replaced successfully", "content" : { @@ -217,7 +278,8 @@ "$ref" : "#/components/schemas/WorkerRequest" } } - } + }, + "required" : true }, "responses" : { "400" : { @@ -326,7 +388,8 @@ "$ref" : "#/components/schemas/WorkerRequest" } } - } + }, + "required" : true }, "responses" : { "400" : { @@ -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", diff --git a/signserver/doc/openapi.yaml b/signserver/doc/openapi.yaml index df624cdb6..ea6111500 100644 --- a/signserver/doc/openapi.yaml +++ b/signserver/doc/openapi.yaml @@ -17,6 +17,7 @@ paths: application/json: schema: $ref: '#/components/schemas/WorkerRequest' + required: true responses: "400": description: Bad request from the client @@ -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 @@ -63,6 +95,7 @@ paths: application/json: schema: $ref: '#/components/schemas/ProcessRequest' + required: true responses: "400": description: Bad request from the client @@ -113,6 +146,7 @@ paths: application/json: schema: $ref: '#/components/schemas/WorkerRequest' + required: true responses: "400": description: Bad request from the client @@ -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: @@ -148,6 +188,7 @@ paths: application/json: schema: $ref: '#/components/schemas/WorkerRequest' + required: true responses: "400": description: Bad request from the client @@ -221,6 +262,7 @@ paths: application/json: schema: $ref: '#/components/schemas/WorkerRequest' + required: true responses: "400": description: Bad request from the client @@ -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