{ "swagger": "2.0", "info": { "title": "Linux Do CDK", "contact": {}, "version": "0.1.0" }, "paths": { "/api/v1/health": { "get": { "produces": [ "application/json" ], "tags": [ "health" ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/health.HealthResponse" } } } } }, "/api/v1/oauth/callback": { "post": { "produces": [ "application/json" ], "tags": [ "oauth" ], "parameters": [ { "description": "request body", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/oauth.CallbackRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/oauth.CallbackResponse" } } } } }, "/api/v1/oauth/login": { "get": { "produces": [ "application/json" ], "tags": [ "oauth" ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/oauth.GetLoginURLResponse" } } } } }, "/api/v1/oauth/user-info": { "get": { "produces": [ "application/json" ], "tags": [ "oauth" ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/oauth.UserInfoResponse" } } } } } }, "definitions": { "health.HealthResponse": { "type": "object", "properties": { "data": {}, "error_msg": { "type": "string" } } }, "oauth.BasicUserInfo": { "type": "object", "properties": { "avatar_url": { "type": "string" }, "id": { "type": "integer" }, "nickname": { "type": "string" }, "trust_level": { "$ref": "#/definitions/oauth.TrustLevel" }, "username": { "type": "string" } } }, "oauth.CallbackRequest": { "type": "object", "properties": { "code": { "type": "string" }, "state": { "type": "string" } } }, "oauth.CallbackResponse": { "type": "object", "properties": { "data": {}, "error_msg": { "type": "string" } } }, "oauth.GetLoginURLResponse": { "type": "object", "properties": { "data": { "type": "string" }, "error_msg": { "type": "string" } } }, "oauth.TrustLevel": { "type": "integer", "enum": [ 0, 1, 2, 3, 4 ], "x-enum-varnames": [ "TrustLevelNewUser", "TrustLevelBasicUser", "TrustLevelUser", "TrustLevelActiveUser", "TrustLevelLeader" ] }, "oauth.UserInfoResponse": { "type": "object", "properties": { "data": { "$ref": "#/definitions/oauth.BasicUserInfo" }, "error_msg": { "type": "string" } } } } }