From c9068a37e5dc7fc565c84aefbad4cfb23078ed45 Mon Sep 17 00:00:00 2001 From: "Noel[bot]" Date: Sat, 2 Nov 2024 05:49:40 +0000 Subject: [PATCH] [skip ci] :sparkles: Update specification files --- assets/openapi.json | 127 +++++++------------------------------------- 1 file changed, 19 insertions(+), 108 deletions(-) diff --git a/assets/openapi.json b/assets/openapi.json index 49e025f7f..4cfef6d6b 100644 --- a/assets/openapi.json +++ b/assets/openapi.json @@ -121,60 +121,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "description": "Represents a response object for all REST endpoints.", - "required": ["success"], - "properties": { - "data": { - "type": "object", - "description": "Represents the response for the `GET /info` REST handler.", - "required": [ - "distribution", - "commit_sha", - "build_date", - "product", - "version", - "vendor" - ], - "properties": { - "build_date": { - "type": "string", - "description": "Build date in RFC3339 format" - }, - "commit_sha": { - "type": "string", - "description": "The commit hash from the Git repository." - }, - "distribution": { - "$ref": "#/components/schemas/Distribution", - "description": "The distribution the server is running off from" - }, - "product": { - "type": "string", - "description": "Product name. Will always be \"charted-server\"" - }, - "vendor": { - "type": "string", - "description": "Vendor of charted-server, will always be \"Noelware, LLC.\"" - }, - "version": { - "type": "string", - "description": "Valid SemVer 2 of the current version of this instance" - } - } - }, - "errors": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Error" - }, - "description": "If the request failed, this is a list of errors as a \"stacktrace.\" `success` is always\n*false*; if not the case, blame it on Noel." - }, - "success": { - "type": "boolean", - "description": "Was the request a success or not?" - } - } + "$ref": "#/components/schemas/InfoResponse" } } } @@ -346,60 +293,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "description": "Represents a response object for all REST endpoints.", - "required": ["success"], - "properties": { - "data": { - "type": "object", - "description": "Represents the response for the `GET /info` REST handler.", - "required": [ - "distribution", - "commit_sha", - "build_date", - "product", - "version", - "vendor" - ], - "properties": { - "build_date": { - "type": "string", - "description": "Build date in RFC3339 format" - }, - "commit_sha": { - "type": "string", - "description": "The commit hash from the Git repository." - }, - "distribution": { - "$ref": "#/components/schemas/Distribution", - "description": "The distribution the server is running off from" - }, - "product": { - "type": "string", - "description": "Product name. Will always be \"charted-server\"" - }, - "vendor": { - "type": "string", - "description": "Vendor of charted-server, will always be \"Noelware, LLC.\"" - }, - "version": { - "type": "string", - "description": "Valid SemVer 2 of the current version of this instance" - } - } - }, - "errors": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Error" - }, - "description": "If the request failed, this is a list of errors as a \"stacktrace.\" `success` is always\n*false*; if not the case, blame it on Noel." - }, - "success": { - "type": "boolean", - "description": "Was the request a success or not?" - } - } + "$ref": "#/components/schemas/InfoResponse" } } } @@ -1046,6 +940,23 @@ } } }, + "InfoResponse": { + "type": "object", + "description": "Response datatype for the `Info` type", + "required": ["success"], + "properties": { + "data": { "$ref": "#/components/schemas/Info" }, + "errors": { + "type": "array", + "items": { "$ref": "#/components/schemas/Error" }, + "description": "If the request failed, this is a list of errors as a \"stacktrace.\" `success` is always\n*false*; if not the case, blame it on Noel." + }, + "success": { + "type": "boolean", + "description": "Was the request a success or not?" + } + } + }, "Main": { "type": "object", "description": "Response object for the `GET /` REST controller.",