{ "swagger": "2.0", "info": { "title": "proto/users.proto", "version": "version not set" }, "tags": [ { "name": "Users" } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "paths": { "/authorize": { "post": { "operationId": "Users_Authorize", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/usersAuthorizeResponse" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/rpcStatus" } } }, "parameters": [ { "name": "secret", "in": "query", "required": false, "type": "string" }, { "name": "token.token", "in": "query", "required": false, "type": "string" }, { "name": "token.expires", "in": "query", "required": false, "type": "string", "format": "int64" } ], "tags": [ "Users" ] } }, "/login": { "post": { "operationId": "Users_Login", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/usersLoginResponse" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/rpcStatus" } } }, "parameters": [ { "name": "form.email", "in": "query", "required": false, "type": "string" }, { "name": "form.password", "in": "query", "required": false, "type": "string" }, { "name": "form.passwordAgain", "in": "query", "required": false, "type": "string" } ], "tags": [ "Users" ] } }, "/logout": { "post": { "operationId": "Users_Logout", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/usersLogoutResponse" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/rpcStatus" } } }, "parameters": [ { "name": "token.token", "in": "query", "required": false, "type": "string" }, { "name": "token.expires", "in": "query", "required": false, "type": "string", "format": "int64" } ], "tags": [ "Users" ] } }, "/password/forgot": { "post": { "operationId": "Users_ResetPassword", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/usersResetPasswordResponse" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/rpcStatus" } } }, "parameters": [ { "name": "form.email", "in": "query", "required": false, "type": "string" }, { "name": "form.password", "in": "query", "required": false, "type": "string" }, { "name": "form.passwordAgain", "in": "query", "required": false, "type": "string" } ], "tags": [ "Users" ] } }, "/password/reset": { "post": { "operationId": "Users_ChangePassword", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/usersChangePasswordResponse" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/rpcStatus" } } }, "parameters": [ { "name": "token.token", "in": "query", "required": false, "type": "string" }, { "name": "token.expires", "in": "query", "required": false, "type": "string", "format": "int64" }, { "name": "form.email", "in": "query", "required": false, "type": "string" }, { "name": "form.password", "in": "query", "required": false, "type": "string" }, { "name": "form.passwordAgain", "in": "query", "required": false, "type": "string" } ], "tags": [ "Users" ] } }, "/register": { "post": { "operationId": "Users_Register", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/usersRegisterResponse" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/rpcStatus" } } }, "parameters": [ { "name": "form.email", "in": "query", "required": false, "type": "string" }, { "name": "form.password", "in": "query", "required": false, "type": "string" }, { "name": "form.passwordAgain", "in": "query", "required": false, "type": "string" } ], "tags": [ "Users" ] } }, "/roles/list": { "post": { "operationId": "Users_ListRoles", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/usersListRolesResponse" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/rpcStatus" } } }, "parameters": [ { "name": "secret", "in": "query", "required": false, "type": "string" } ], "tags": [ "Users" ] } }, "/roles/set": { "post": { "operationId": "Users_SetRoles", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/usersSetRolesResponse" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/rpcStatus" } } }, "parameters": [ { "name": "secret", "in": "query", "required": false, "type": "string" }, { "name": "user.id", "in": "query", "required": false, "type": "string", "format": "int64" }, { "name": "user.uuid", "in": "query", "required": false, "type": "string" } ], "tags": [ "Users" ] } } }, "definitions": { "protobufAny": { "type": "object", "properties": { "@type": { "type": "string" } }, "additionalProperties": {} }, "rpcStatus": { "type": "object", "properties": { "code": { "type": "integer", "format": "int32" }, "message": { "type": "string" }, "details": { "type": "array", "items": { "type": "object", "$ref": "#/definitions/protobufAny" } } } }, "usersAuthorizeResponse": { "type": "object", "properties": { "user": { "$ref": "#/definitions/usersUserInfo" }, "roles": { "type": "array", "items": { "type": "object", "$ref": "#/definitions/usersUserRole" } } } }, "usersChangePasswordResponse": { "type": "object" }, "usersListRolesResponse": { "type": "object", "properties": { "roles": { "type": "array", "items": { "type": "object", "$ref": "#/definitions/usersUserRole" } } } }, "usersLoginResponse": { "type": "object", "properties": { "token": { "$ref": "#/definitions/usersUserToken" } } }, "usersLogoutResponse": { "type": "object" }, "usersRegisterResponse": { "type": "object" }, "usersResetPasswordResponse": { "type": "object", "properties": { "token": { "$ref": "#/definitions/usersUserToken" } } }, "usersSetRolesResponse": { "type": "object" }, "usersUserForm": { "type": "object", "properties": { "email": { "type": "string" }, "password": { "type": "string" }, "passwordAgain": { "type": "string" } } }, "usersUserInfo": { "type": "object", "properties": { "id": { "type": "string", "format": "int64" }, "uuid": { "type": "string" } } }, "usersUserRole": { "type": "object", "properties": { "id": { "type": "string", "format": "int64" }, "name": { "type": "string" } } }, "usersUserToken": { "type": "object", "properties": { "token": { "type": "string" }, "expires": { "type": "string", "format": "int64" } } } } }