{ "swagger": "2.0", "info": { "description": "Api Documentation", "version": "1.0", "title": "Api Documentation", "termsOfService": "urn:tos", "contact": {}, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0" } }, "schemes": [ "http" ], "host": "localhost:50115", "basePath": "/", "tags": [ { "name": "basic-error-controller", "description": "Basic Error Controller" }, { "name": "login-rest-controller", "description": "Login Rest Controller" }, { "name": "rbac-rest-controller", "description": "RBAC Rest Controller" }, { "name": "register-rest-controller", "description": "Register Rest Controller" }, { "name": "user-rest-controller", "description": "User Rest Controller" } ], "paths": { "/error": { "get": { "tags": [ "basic-error-controller" ], "summary": "error", "operationId": "errorUsingGET", "produces": [ "*/*" ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": { "type": "object" } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } }, "deprecated": false }, "head": { "tags": [ "basic-error-controller" ], "summary": "error", "operationId": "errorUsingHEAD", "consumes": [ "application/json" ], "produces": [ "*/*" ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": { "type": "object" } } }, "204": { "description": "No Content" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" } }, "deprecated": false }, "post": { "tags": [ "basic-error-controller" ], "summary": "error", "operationId": "errorUsingPOST", "consumes": [ "application/json" ], "produces": [ "*/*" ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": { "type": "object" } } }, "201": { "description": "Created" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } }, "deprecated": false }, "put": { "tags": [ "basic-error-controller" ], "summary": "error", "operationId": "errorUsingPUT", "consumes": [ "application/json" ], "produces": [ "*/*" ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": { "type": "object" } } }, "201": { "description": "Created" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } }, "deprecated": false }, "delete": { "tags": [ "basic-error-controller" ], "summary": "error", "operationId": "errorUsingDELETE", "produces": [ "*/*" ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": { "type": "object" } } }, "204": { "description": "No Content" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" } }, "deprecated": false }, "options": { "tags": [ "basic-error-controller" ], "summary": "error", "operationId": "errorUsingOPTIONS", "consumes": [ "application/json" ], "produces": [ "*/*" ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": { "type": "object" } } }, "204": { "description": "No Content" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" } }, "deprecated": false }, "patch": { "tags": [ "basic-error-controller" ], "summary": "error", "operationId": "errorUsingPATCH", "consumes": [ "application/json" ], "produces": [ "*/*" ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": { "type": "object" } } }, "204": { "description": "No Content" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" } }, "deprecated": false } }, "/login": { "post": { "tags": [ "login-rest-controller" ], "summary": "login", "operationId": "loginUsingPOST", "consumes": [ "application/json" ], "produces": [ "*/*" ], "parameters": [ { "in": "body", "name": "loginRequestDTO", "description": "loginRequestDTO", "required": true, "schema": { "$ref": "#/definitions/LoginRequestDTO" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/UserDTO" } }, "201": { "description": "Created" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } }, "deprecated": false } }, "/users": { "get": { "tags": [ "user-rest-controller" ], "summary": "getUserPresentationList", "operationId": "getUserPresentationListUsingGET", "produces": [ "*/*" ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/UserListDTO" } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } }, "deprecated": false }, "post": { "tags": [ "user-rest-controller" ], "summary": "createUser", "operationId": "createUserUsingPOST", "consumes": [ "application/json" ], "produces": [ "*/*" ], "parameters": [ { "in": "body", "name": "createOrUpdateUserDTO", "description": "createOrUpdateUserDTO", "required": true, "schema": { "$ref": "#/definitions/CreateOrUpdateUserDTO" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/UserDTO" } }, "201": { "description": "Created" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } }, "deprecated": false } }, "/users/rbac/permissions": { "get": { "tags": [ "rbac-rest-controller" ], "summary": "getPermissionPresentationList", "operationId": "getPermissionPresentationListUsingGET", "produces": [ "*/*" ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/PermissionDTO" } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } }, "deprecated": false } }, "/users/rbac/roles": { "get": { "tags": [ "rbac-rest-controller" ], "summary": "getRolePresentationList", "operationId": "getRolePresentationListUsingGET", "produces": [ "*/*" ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/RoleDTO" } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } }, "deprecated": false }, "post": { "tags": [ "rbac-rest-controller" ], "summary": "createRole", "operationId": "createRoleUsingPOST", "consumes": [ "application/json" ], "produces": [ "*/*" ], "parameters": [ { "in": "body", "name": "role", "description": "role", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/RoleDTO" } }, "201": { "description": "Created" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } }, "deprecated": false } }, "/users/rbac/roles/{roleId}": { "get": { "tags": [ "rbac-rest-controller" ], "summary": "getRoleById", "operationId": "getRoleByIdUsingGET", "produces": [ "*/*" ], "parameters": [ { "name": "roleId", "in": "path", "description": "roleId", "required": true, "type": "integer", "format": "int64", "x-example": 123 } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/RoleDTO" } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } }, "deprecated": false }, "delete": { "tags": [ "rbac-rest-controller" ], "summary": "deleteRoleById", "operationId": "deleteRoleByIdUsingDELETE", "produces": [ "*/*" ], "parameters": [ { "name": "roleId", "in": "path", "description": "roleId", "required": true, "type": "integer", "format": "int64", "x-example": 123 } ], "responses": { "200": { "description": "OK", "schema": { "type": "object" } }, "204": { "description": "No Content" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" } }, "deprecated": false } }, "/users/rbac/roles/{roleId}/permissions/{permissionKey}": { "post": { "tags": [ "rbac-rest-controller" ], "summary": "addPermissionOnRole", "operationId": "addPermissionOnRoleUsingPOST", "consumes": [ "application/json" ], "produces": [ "*/*" ], "parameters": [ { "name": "permissionKey", "in": "path", "description": "permissionKey", "required": true, "type": "string", "x-example": "abc" }, { "name": "roleId", "in": "path", "description": "roleId", "required": true, "type": "integer", "format": "int64", "x-example": 123 } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/RoleDTO" } }, "201": { "description": "Created" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } }, "deprecated": false }, "delete": { "tags": [ "rbac-rest-controller" ], "summary": "removePermissionOnRole", "operationId": "removePermissionOnRoleUsingDELETE", "produces": [ "*/*" ], "parameters": [ { "name": "permissionKey", "in": "path", "description": "permissionKey", "required": true, "type": "string", "x-example": "abc" }, { "name": "roleId", "in": "path", "description": "roleId", "required": true, "type": "integer", "format": "int64", "x-example": 123 } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/RoleDTO" } }, "204": { "description": "No Content" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" } }, "deprecated": false } }, "/users/register": { "post": { "tags": [ "register-rest-controller" ], "summary": "registerNewUserAccount", "operationId": "registerNewUserAccountUsingPOST", "consumes": [ "application/json" ], "produces": [ "*/*" ], "parameters": [ { "in": "body", "name": "registerUserAccountDTO", "description": "registerUserAccountDTO", "required": true, "schema": { "$ref": "#/definitions/RegisterUserAccountDTO" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/UserDTO" } }, "201": { "description": "Created" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } }, "deprecated": false } }, "/users/{id}": { "get": { "tags": [ "user-rest-controller" ], "summary": "getUserById", "operationId": "getUserByIdUsingGET", "produces": [ "*/*" ], "parameters": [ { "name": "id", "in": "path", "description": "id", "required": true, "type": "integer", "format": "int64", "x-example": 123 } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/UserDTO" } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } }, "deprecated": false }, "put": { "tags": [ "user-rest-controller" ], "summary": "updateUser", "operationId": "updateUserUsingPUT", "consumes": [ "application/json" ], "produces": [ "*/*" ], "parameters": [ { "name": "id", "in": "path", "description": "id", "required": true, "type": "integer", "format": "int64", "x-example": 123 }, { "in": "body", "name": "updateUserDTO", "description": "updateUserDTO", "required": true, "schema": { "$ref": "#/definitions/CreateOrUpdateUserDTO" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/UserDTO" } }, "201": { "description": "Created" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } }, "deprecated": false }, "delete": { "tags": [ "user-rest-controller" ], "summary": "deleteById", "operationId": "deleteByIdUsingDELETE", "produces": [ "*/*" ], "parameters": [ { "name": "id", "in": "path", "description": "id", "required": true, "type": "integer", "format": "int64", "x-example": 123 } ], "responses": { "200": { "description": "OK", "schema": { "type": "object" } }, "204": { "description": "No Content" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" } }, "deprecated": false } }, "/users/{id}/roles/{roleId}": { "post": { "tags": [ "user-rest-controller" ], "summary": "addRole", "operationId": "addRoleUsingPOST", "consumes": [ "application/json" ], "produces": [ "*/*" ], "parameters": [ { "name": "id", "in": "path", "description": "id", "required": true, "type": "integer", "format": "int64", "x-example": 123 }, { "name": "roleId", "in": "path", "description": "roleId", "required": true, "type": "integer", "format": "int64", "x-example": 123 } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/UserDTO" } }, "201": { "description": "Created" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } }, "deprecated": false }, "delete": { "tags": [ "user-rest-controller" ], "summary": "removeRole", "operationId": "removeRoleUsingDELETE", "produces": [ "*/*" ], "parameters": [ { "name": "id", "in": "path", "description": "id", "required": true, "type": "integer", "format": "int64", "x-example": 123 }, { "name": "roleId", "in": "path", "description": "roleId", "required": true, "type": "integer", "format": "int64", "x-example": 123 } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/UserDTO" } }, "204": { "description": "No Content" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" } }, "deprecated": false } } }, "definitions": { "AddressDTO": { "type": "object", "properties": { "address": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "country": { "type": "string" }, "zipCode": { "type": "string" } }, "title": "AddressDTO" }, "ContactDTO": { "type": "object", "properties": { "contactNote": { "type": "string" }, "email": { "type": "string" }, "facebook": { "type": "string" }, "linkedin": { "type": "string" }, "phone": { "type": "string" }, "skype": { "type": "string" }, "website": { "type": "string" } }, "title": "ContactDTO" }, "CreateOrUpdateUserDTO": { "type": "object", "properties": { "address": { "type": "string" }, "address2": { "type": "string" }, "birthDate": { "type": "string", "format": "date" }, "city": { "type": "string" }, "contactNote": { "type": "string" }, "country": { "type": "string" }, "email": { "type": "string" }, "enabled": { "type": "boolean" }, "facebook": { "type": "string" }, "gender": { "type": "string" }, "linkedin": { "type": "string" }, "mobile": { "type": "string" }, "name": { "type": "string" }, "note": { "type": "string" }, "password": { "type": "string" }, "secured": { "type": "boolean" }, "skype": { "type": "string" }, "surname": { "type": "string" }, "username": { "type": "string" }, "website": { "type": "string" }, "zipCode": { "type": "string" } }, "title": "CreateOrUpdateUserDTO" }, "LoginRequestDTO": { "type": "object", "properties": { "password": { "type": "string" }, "username": { "type": "string" } }, "title": "LoginRequestDTO" }, "ModelAndView": { "type": "object", "properties": { "empty": { "type": "boolean" }, "model": { "type": "object" }, "modelMap": { "type": "object", "additionalProperties": { "type": "object" } }, "reference": { "type": "boolean" }, "status": { "type": "string", "enum": [ "100 CONTINUE", "101 SWITCHING_PROTOCOLS", "102 PROCESSING", "103 CHECKPOINT", "200 OK", "201 CREATED", "202 ACCEPTED", "203 NON_AUTHORITATIVE_INFORMATION", "204 NO_CONTENT", "205 RESET_CONTENT", "206 PARTIAL_CONTENT", "207 MULTI_STATUS", "208 ALREADY_REPORTED", "226 IM_USED", "300 MULTIPLE_CHOICES", "301 MOVED_PERMANENTLY", "302 FOUND", "302 MOVED_TEMPORARILY", "303 SEE_OTHER", "304 NOT_MODIFIED", "305 USE_PROXY", "307 TEMPORARY_REDIRECT", "308 PERMANENT_REDIRECT", "400 BAD_REQUEST", "401 UNAUTHORIZED", "402 PAYMENT_REQUIRED", "403 FORBIDDEN", "404 NOT_FOUND", "405 METHOD_NOT_ALLOWED", "406 NOT_ACCEPTABLE", "407 PROXY_AUTHENTICATION_REQUIRED", "408 REQUEST_TIMEOUT", "409 CONFLICT", "410 GONE", "411 LENGTH_REQUIRED", "412 PRECONDITION_FAILED", "413 PAYLOAD_TOO_LARGE", "413 REQUEST_ENTITY_TOO_LARGE", "414 URI_TOO_LONG", "414 REQUEST_URI_TOO_LONG", "415 UNSUPPORTED_MEDIA_TYPE", "416 REQUESTED_RANGE_NOT_SATISFIABLE", "417 EXPECTATION_FAILED", "418 I_AM_A_TEAPOT", "419 INSUFFICIENT_SPACE_ON_RESOURCE", "420 METHOD_FAILURE", "421 DESTINATION_LOCKED", "422 UNPROCESSABLE_ENTITY", "423 LOCKED", "424 FAILED_DEPENDENCY", "425 TOO_EARLY", "426 UPGRADE_REQUIRED", "428 PRECONDITION_REQUIRED", "429 TOO_MANY_REQUESTS", "431 REQUEST_HEADER_FIELDS_TOO_LARGE", "451 UNAVAILABLE_FOR_LEGAL_REASONS", "500 INTERNAL_SERVER_ERROR", "501 NOT_IMPLEMENTED", "502 BAD_GATEWAY", "503 SERVICE_UNAVAILABLE", "504 GATEWAY_TIMEOUT", "505 HTTP_VERSION_NOT_SUPPORTED", "506 VARIANT_ALSO_NEGOTIATES", "507 INSUFFICIENT_STORAGE", "508 LOOP_DETECTED", "509 BANDWIDTH_LIMIT_EXCEEDED", "510 NOT_EXTENDED", "511 NETWORK_AUTHENTICATION_REQUIRED" ] }, "view": { "$ref": "#/definitions/View" }, "viewName": { "type": "string" } }, "title": "ModelAndView" }, "PermissionDTO": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64" }, "permission": { "type": "string" } }, "title": "PermissionDTO" }, "RegisterUserAccountDTO": { "type": "object", "properties": { "email": { "type": "string" }, "gender": { "type": "string" }, "name": { "type": "string" }, "password": { "type": "string" }, "surname": { "type": "string" }, "username": { "type": "string" } }, "title": "RegisterUserAccountDTO" }, "RoleDTO": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64" }, "permissions": { "type": "array", "items": { "$ref": "#/definitions/PermissionDTO" } }, "role": { "type": "string" } }, "title": "RoleDTO" }, "UserDTO": { "type": "object", "properties": { "addressDTO": { "$ref": "#/definitions/AddressDTO" }, "birthDate": { "type": "string", "format": "date" }, "contactDTO": { "$ref": "#/definitions/ContactDTO" }, "creationDt": { "type": "string", "format": "date-time" }, "enabled": { "type": "boolean" }, "gender": { "type": "string" }, "id": { "type": "integer", "format": "int64" }, "loginDt": { "type": "string", "format": "date-time" }, "name": { "type": "string" }, "note": { "type": "string" }, "permissions": { "type": "array", "items": { "type": "string" } }, "roles": { "type": "array", "items": { "type": "string" } }, "secured": { "type": "boolean" }, "surname": { "type": "string" }, "updatedDt": { "type": "string", "format": "date-time" }, "username": { "type": "string" } }, "title": "UserDTO" }, "UserListDTO": { "type": "object", "properties": { "userList": { "type": "array", "items": { "$ref": "#/definitions/UserDTO" } } }, "title": "UserListDTO" }, "View": { "type": "object", "properties": { "contentType": { "type": "string" } }, "title": "View" } } }