Skip to content

Instantly share code, notes, and snippets.

@CodeAdminDe
Created December 14, 2023 10:02
Show Gist options
  • Save CodeAdminDe/63d2697a226f3d6879ba7f16351c06dd to your computer and use it in GitHub Desktop.
Save CodeAdminDe/63d2697a226f3d6879ba7f16351c06dd to your computer and use it in GitHub Desktop.
OpenAPI definition for a custom project of mine to restart Minio automatically.
swagger: "2.0"
info:
description: "This is a simple API to restart a minio server."
version: "1.0.0"
title: "Swagger Minio 1.0"
contact:
email: "frederic.roggon@codeadmin.de"
license:
name: "Apache 2.0"
url: "http://www.apache.org/licenses/LICENSE-2.0.html"
host: "de.codeadmin.minio.api"
basePath: "/v1"
tags:
- name: "minio"
description: "Everything that you could do with minio api"
schemes:
- "https"
- "http"
paths:
/minio:
get:
tags:
- "minio"
summary: "Get current status of the service"
description: ""
operationId: "getMinio"
produces:
- "application/json"
responses:
"200":
description: "Service up and running"
"405":
description: "Invalid input"
"500":
description: "Service error"
security:
- api_key: []
post:
tags:
- "minio"
summary: "Restart the service"
description: ""
operationId: "restartMinio"
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- in: "body"
name: "body"
description: "Shared secret that you need to provide"
required: true
schema:
$ref: "#/definitions/minio"
responses:
"200":
description: "Restart successfully"
"405":
description: "Invalid input"
"500":
description: "Restart failed"
security:
- api_key: []
securityDefinitions:
api_key:
type: "apiKey"
name: "api_key"
in: "header"
definitions:
minio:
type: "object"
properties:
secret:
type: "string"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment