Created
March 19, 2018 05:56
-
-
Save mizucoffee/967e8105e3c6471552dfc0c483f7f4b5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
swagger: "2.0" | |
info: | |
description: "/apiを叩くとバージョンが取得できます。" | |
version: "0.0.1" | |
title: "PreKara Server API.dev" | |
contact: | |
email: "[email protected]" | |
license: | |
name: "MIT" | |
url: "https://kawakawaritsuki.mit-license.org/" | |
host: "local.prekara.net" | |
basePath: "/api/v1" | |
tags: | |
- name: "server" | |
description: "サーバー操作" | |
- name: "session" | |
description: "セッション操作" | |
- name: "image" | |
description: "画像操作" | |
- name: "control" | |
description: "コントロール系、socket.ioへの橋渡し" | |
schemes: | |
- "http" | |
paths: | |
/server: | |
post: | |
tags: | |
- "server" | |
summary: "新規サーバー" | |
description: "新規サーバー" | |
operationId: "newServer" | |
consumes: | |
- "application/json" | |
produces: | |
- "application/json" | |
parameters: | |
- in: "body" | |
name: "body" | |
required: true | |
schema: | |
type: "object" | |
required: | |
- "server_name" | |
properties: | |
server_name: | |
type: "string" | |
example: "New_Server" | |
password: | |
type: "string" | |
example: "password" | |
responses: | |
200: | |
description: "Success" | |
schema: | |
type: "object" | |
properties: | |
server_id: | |
type: "string" | |
example: "abcdefg" | |
405: | |
description: "Invalid parameter" | |
409: | |
description: "Conflict" | |
put: | |
tags: | |
- "server" | |
summary: "サーバー情報変更" | |
description: "" | |
operationId: "updateServer" | |
consumes: | |
- "application/json" | |
produces: | |
- "application/json" | |
parameters: | |
- in: "body" | |
name: "body" | |
description: "" | |
required: true | |
schema: | |
type: "object" | |
required: | |
- "server_name" | |
properties: | |
server_name: | |
type: "string" | |
example: "New_Server_Name" | |
password: | |
type: "string" | |
example: "new_password" | |
responses: | |
403: | |
description: "Forbidden" | |
404: | |
description: "Not Found" | |
405: | |
description: "Invalid parameter" | |
409: | |
description: "Conflict" | |
delete: | |
tags: | |
- "server" | |
summary: "サーバー削除" | |
description: "同時にログアウト(セッションが破棄)されます" | |
operationId: "deleteServer" | |
consumes: | |
- "application/json" | |
produces: | |
- "application/json" | |
responses: | |
403: | |
description: "Forbidden" | |
405: | |
description: "Input parameter" | |
/image: | |
get: | |
tags: | |
- "image" | |
summary: "画像の取得" | |
operationId: "getImage" | |
parameters: | |
- in: "query" | |
name: "image_id" | |
type: "string" | |
description: "取得する画像のID" | |
required: true | |
responses: | |
403: | |
description: "Forbidden" | |
404: | |
description: "Not Found" | |
post: | |
tags: | |
- "image" | |
summary: "画像の転送" | |
operationId: "postImage" | |
consumes: | |
- "multipart/form-data" | |
produces: | |
- "application/json" | |
parameters: | |
- name: "image" | |
in: "formData" | |
description: "転送する画像" | |
required: true | |
type: "file" | |
responses: | |
403: | |
description: "Forbidden" | |
405: | |
description: "Invalid file" | |
delete: | |
tags: | |
- "image" | |
summary: "画像の削除" | |
operationId: "deleteImage" | |
parameters: | |
- in: "body" | |
name: "body" | |
required: true | |
schema: | |
type: "object" | |
required: | |
- "image_id" | |
properties: | |
server_name: | |
type: "string" | |
example: "New_Server_Name" | |
responses: | |
403: | |
description: "Forbidden" | |
404: | |
description: "Not Found" | |
/image/list: | |
get: | |
tags: | |
- "image" | |
summary: "画像一覧の取得" | |
operationId: "nextImage" | |
parameters: | |
- in: "query" | |
name: "image_id" | |
type: "string" | |
description: "取得する画像のID" | |
required: true | |
responses: | |
403: | |
description: "Forbidden" | |
404: | |
description: "Not Found" | |
/session: | |
get: | |
tags: | |
- "session" | |
summary: "セッション状態の取得" | |
operationId: "getSession" | |
responses: | |
403: | |
description: "Forbidden" | |
definitions: | |
ApiResponse: | |
type: "object" | |
properties: | |
code: | |
type: "integer" | |
format: "int32" | |
type: | |
type: "string" | |
message: | |
type: "string" | |
externalDocs: | |
description: "Find out more about Swagger" | |
url: "http://swagger.io" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment