{"openapi":"3.0.1","info":{"title":"'@project.name@'","description":"'@project.description@'","contact":{"name":"Joe Doe","email":"dumy@dumy"},"version":"'@project.version@'"},"servers":[{"url":"http://localhost:8080","description":"'@project.description@'"}],"paths":{"/users/put/{userId}":{"put":{"tags":["user-controller"],"operationId":"updateUser","parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutUserDto"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/GetUserDto"}}}}}}},"/users/access/delete":{"put":{"tags":["user-controller"],"operationId":"putAccess","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessPut"}}},"required":true},"responses":{"200":{"description":"OK"}}}},"/dniType/{id}":{"get":{"tags":["dni-type-controller"],"operationId":"getDniTypeById","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/GetDniTypeDto"}}}}}},"put":{"tags":["dni-type-controller"],"operationId":"updateDniType","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDniTypeDto"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/GetDniTypeDto"}}}}}}},"/auth/changePassword":{"put":{"tags":["auth-controller"],"operationId":"changePassword","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePassword"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}}}}},"/users/post":{"post":{"tags":["user-controller"],"operationId":"createUser","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostUserDto"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/GetUserDto"}}}}}}},"/users/post/owner":{"post":{"tags":["user-controller"],"operationId":"createOwnerUser","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostOwnerUserDto"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/GetOwnerUserDto"}}}}}}},"/users/access":{"post":{"tags":["user-controller"],"operationId":"postAccess","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessPost"}}},"required":true},"responses":{"200":{"description":"OK"}}}},"/roles":{"get":{"tags":["role-controller"],"operationId":"getRoles","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GetRoleDto"}}}}}}},"post":{"tags":["role-controller"],"operationId":"createRole","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostRoleDto"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/GetRoleDto"}}}}}}},"/dniType":{"get":{"tags":["dni-type-controller"],"operationId":"getAllDniTypes","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GetDniTypeDto"}}}}}}},"post":{"tags":["dni-type-controller"],"operationId":"createDniType","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDniTypeDto"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/GetDniTypeDto"}}}}}}},"/auth/validateToken":{"post":{"tags":["auth-controller"],"operationId":"validateToken","requestBody":{"content":{"application/json":{"schema":{"type":"string"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}}}}},"/auth/login":{"post":{"tags":["auth-controller"],"operationId":"login","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostLoginDto"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}}}}},"/verification/username":{"get":{"tags":["verification-controller"],"operationId":"isUsernameUnique","parameters":[{"name":"username","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"boolean"}}}}}}}},"/verification/email":{"get":{"tags":["verification-controller"],"operationId":"isEmailUnique","parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"boolean"}}}}}}}},"/verification/dni":{"get":{"tags":["verification-controller"],"operationId":"isDniUnique","parameters":[{"name":"dni","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"boolean"}}}}}}}},"/users/getall":{"get":{"tags":["user-controller"],"operationId":"getUsers","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GetUserDto"}}}}}}}},"/users/getall/{plotId}":{"get":{"tags":["user-controller"],"operationId":"getAllUsersByPlotId","parameters":[{"name":"plotId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GetUserDto"}}}}}}}},"/users/getall/status/{isActive}":{"get":{"tags":["user-controller"],"operationId":"getUsersByStatus","parameters":[{"name":"isActive","in":"path","required":true,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GetUserDto"}}}}}}}},"/users/getall/role/{roleId}":{"get":{"tags":["user-controller"],"operationId":"getUsersByRole","parameters":[{"name":"roleId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GetUserDto"}}}}}}}},"/users/getById/{userId}":{"get":{"tags":["user-controller"],"operationId":"getUserById","parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/GetUserDto"}}}}}}},"/users/getByEmail/{email}":{"get":{"tags":["user-controller"],"operationId":"getUserByEmail","parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/GetUserDto"}}}}}}},"/users/get/owner/{plotId}":{"get":{"tags":["user-controller"],"operationId":"getUserByPlotIdAndOwnerRole","parameters":[{"name":"plotId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/GetUserDto"}}}}}}},"/users/byOwner/{ownerId}":{"get":{"tags":["user-controller"],"operationId":"getUsersByOwner","parameters":[{"name":"ownerId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GetUserDto"}}}}}}}},"/users/byOwner/{ownerId}/WithoutTheOwner":{"get":{"tags":["user-controller"],"operationId":"getUsersByOwnerV2","parameters":[{"name":"ownerId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GetUserDto"}}}}}}}},"/ping":{"get":{"tags":["ping-controller"],"summary":"Check healthy of the app","description":"If the app it's alive response pong","operationId":"pong","responses":{"200":{"description":"Successful operation","content":{"*/*":{"schema":{"type":"string"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorApi"}}}}}}},"/users/delete/{userId}/{userIdUpdate}":{"delete":{"tags":["user-controller"],"operationId":"deleteUser","parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"userIdUpdate","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK"}}}}},"components":{"schemas":{"PutUserDto":{"required":["datebirth","dni","dni_type_id","email","lastName","name","phoneNumber","roles","telegram_id","userUpdateId"],"type":"object","properties":{"name":{"maxLength":50,"minLength":1,"type":"string"},"lastName":{"maxLength":50,"minLength":1,"type":"string"},"dni_type_id":{"type":"integer","format":"int32"},"dni":{"maxLength":11,"minLength":1,"type":"string"},"phoneNumber":{"maxLength":20,"minLength":10,"type":"string"},"email":{"type":"string"},"avatar_url":{"type":"string"},"datebirth":{"type":"string","format":"date"},"roles":{"maxItems":2147483647,"minItems":1,"type":"array","items":{"maxLength":2147483647,"minLength":1,"type":"string"}},"userUpdateId":{"type":"integer","format":"int32"},"telegram_id":{"type":"integer","format":"int32"}}},"GetUserDto":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"name":{"type":"string"},"lastname":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"},"email":{"type":"string"},"phone_number":{"type":"string"},"dni":{"type":"string"},"dni_type":{"type":"string"},"active":{"type":"boolean"},"avatar_url":{"type":"string"},"datebirth":{"type":"string","format":"date"},"create_date":{"type":"string","format":"date"},"roles":{"type":"array","items":{"type":"string"}},"plot_id":{"type":"array","items":{"type":"integer","format":"int32"}},"telegram_id":{"type":"integer","format":"int32"}}},"AccessPut":{"type":"object","properties":{"document":{"type":"string"}}},"GetDniTypeDto":{"type":"object","properties":{"description":{"type":"string"}}},"ChangePassword":{"type":"object","properties":{"email":{"type":"string"},"currentPassword":{"type":"string"},"newPassword":{"type":"string"}}},"PostUserDto":{"required":["active","datebirth","dni","dni_type_id","email","lastname","name","password","phone_number","roles","username"],"type":"object","properties":{"name":{"maxLength":50,"minLength":1,"type":"string"},"lastname":{"maxLength":50,"minLength":1,"type":"string"},"username":{"maxLength":30,"minLength":1,"type":"string"},"password":{"maxLength":100,"minLength":6,"type":"string"},"email":{"type":"string"},"phone_number":{"maxLength":20,"minLength":10,"type":"string"},"dni_type_id":{"type":"integer","format":"int32"},"dni":{"maxLength":11,"minLength":1,"type":"string"},"active":{"type":"boolean"},"avatar_url":{"type":"string"},"datebirth":{"type":"string","format":"date"},"roles":{"type":"array","items":{"type":"string"}},"userUpdateId":{"type":"integer","format":"int32"},"telegram_id":{"type":"integer","format":"int32"},"plot_id":{"type":"integer","format":"int32"}}},"PostOwnerUserDto":{"required":["active","datebirth","dni","dni_type_id","email","lastname","name","password","phone_number","roles","username"],"type":"object","properties":{"name":{"maxLength":50,"minLength":1,"type":"string"},"lastname":{"maxLength":50,"minLength":1,"type":"string"},"username":{"maxLength":30,"minLength":1,"type":"string"},"password":{"maxLength":100,"minLength":6,"type":"string"},"email":{"type":"string"},"phone_number":{"maxLength":20,"minLength":10,"type":"string"},"dni_type_id":{"type":"integer","format":"int32"},"dni":{"maxLength":11,"minLength":1,"type":"string"},"active":{"type":"boolean"},"avatar_url":{"type":"string"},"datebirth":{"type":"string","format":"date"},"roles":{"type":"array","items":{"type":"string"}},"userUpdateId":{"type":"integer","format":"int32"},"telegram_id":{"type":"integer","format":"int32"},"plot_id":{"type":"array","items":{"type":"integer","format":"int32"}}}},"GetOwnerUserDto":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"name":{"type":"string"},"lastname":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"},"email":{"type":"string"},"phone_number":{"type":"string"},"dni":{"type":"string"},"dni_type":{"type":"string"},"active":{"type":"boolean"},"avatar_url":{"type":"string"},"datebirth":{"type":"string","format":"date"},"create_date":{"type":"string","format":"date"},"roles":{"type":"array","items":{"type":"string"}},"plot_id":{"type":"array","items":{"type":"integer","format":"int32"}},"telegram_id":{"type":"integer","format":"int32"}}},"AccessDocumentType":{"type":"object","properties":{"description":{"type":"string"}}},"AccessPost":{"type":"object","properties":{"document":{"type":"string"},"name":{"type":"string"},"last_name":{"type":"string"},"documentType":{"$ref":"#/components/schemas/AccessDocumentType"},"user_allowed_Type":{"$ref":"#/components/schemas/AccessUserAllowedType"},"email":{"type":"string"},"userId":{"type":"integer","format":"int32"}}},"AccessUserAllowedType":{"type":"object","properties":{"description":{"type":"string"}}},"PostRoleDto":{"required":["description"],"type":"object","properties":{"description":{"type":"string"},"userUpdateId":{"type":"integer","format":"int32"}}},"GetRoleDto":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"description":{"type":"string"}}},"PostLoginDto":{"type":"object","properties":{"email":{"type":"string"},"password":{"type":"string"}}},"ErrorApi":{"type":"object","properties":{"timestamp":{"type":"string"},"status":{"type":"integer","format":"int32"},"error":{"type":"string"},"message":{"type":"string"}}}}}}