import type { OpenAPIV3_1 } from "openapi-types";

export const prodStopSpec: OpenAPIV3_1.PathsObject = {
	"/api/system/prodSql/stop": {
		post: {
			summary: "Prod stop sql connection",
			description: "Closes the connection to the prod server.",
			tags: ["System"],
			responses: {
				"200": {
					description: "Success from server starting",
					content: {
						"application/json": {
							schema: {
								type: "object",
								properties: {
									success: {
										type: "boolean",
										format: "true",
										example: true,
									},
									message: {
										type: "string",
										format: "The sql connection has been closed.",
									},
								},
							},
						},
					},
				},
				"400": {
					description: "Errors on why the server could  not be stopped",
					content: {
						"application/json": {
							schema: {
								type: "object",
								properties: {
									success: {
										type: "boolean",
										format: "false",
										example: false,
									},
									message: {
										type: "string",
										format:
											"There is no connection to the prod server currently.",
									},
								},
							},
						},
					},
				},
			},
		},
	},
};
