This repository has been archived by the owner on May 22, 2021. It is now read-only.
generated from E-Edu/microservice-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
swagger-spec.json
1 lines (1 loc) · 5.03 KB
/
swagger-spec.json
1
{"openapi":"3.0.0","info":{"title":"gawia UserMicroservice","description":"gawia UserMicroservice Documentation","version":"1.0","contact":{}},"tags":[{"name":"gawia","description":""}],"servers":[{"url":"http://localhost:3333"},{"url":"https://userms.gawia.com/"}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}},"schemas":{"UserCreateDto":{"type":"object","properties":{"email":{"type":"string"},"passwordHash":{"type":"string"}},"required":["email","passwordHash"]},"UserResponeDto":{"type":"object","properties":{"scope":{"type":"array","default":["USER","user.user.write.self","user.user.delete.self","task.subject.read.all","task.module.read.all","task.lecture.read.all","task.lectureGroup.read.all","task.task.read"],"items":{"type":"string","enum":["USER","ADMIN","user.user.write.self","user.user.delete.self","task.subject.read.all","task.module.read.all","task.lecture.read.all","task.lectureGroup.read.all","task.task.read","user.user.read+write+delete.all+beta","task.subject.read+write+delete.all+beta","task.module.read+write+delete.all+beta","task.lecture.read+write+delete.all+beta","task.lectureGroup.read+write+delete.all+beta","task.task.read+write+delete.all+beta"]}},"createdAt":{"format":"date-time","type":"string"},"email":{"type":"string"},"emailIsValid":{"type":"boolean"},"id":{"type":"string"},"isActive":{"type":"boolean"},"updatedAt":{"format":"date-time","type":"string"}},"required":["scope","createdAt","email","emailIsValid","id","isActive","updatedAt"]},"PasswordResetDto":{"type":"object","properties":{"passwordHash":{"type":"string"}},"required":["passwordHash"]},"BearerTokenDto":{"type":"object","properties":{"access_token":{"type":"string"},"refresh_token":{"type":"string"}},"required":["access_token"]},"RefreshtokenDto":{"type":"object","properties":{"refresh_token":{"type":"string"},"userId":{"type":"string"}},"required":["refresh_token","userId"]}}},"paths":{"/":{"get":{"operationId":"AppController_health","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/user":{"post":{"operationId":"UserController_addUser","parameters":[{"name":"X-ServiceToken","in":"header","description":"ServiceToken","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreateDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":{"0":{"0":"a","1":"u","2":"t","3":"h"}},"depth":1},"get":{"operationId":"UserController_getUser","parameters":[{"name":"X-ServiceToken","in":"header","description":"ServiceToken","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserResponeDto"}}}}}},"tags":["user"],"depth":1,"security":[{"bearer":[]}]}},"/user/{id}":{"get":{"operationId":"UserController_getUserByID","parameters":[{"name":"X-ServiceToken","in":"header","description":"ServiceToken","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponeDto"}}}}},"tags":["user"],"depth":1,"security":[{"bearer":[]}]}},"/user/resetPassword/{email}":{"get":{"operationId":"UserController_sendResetEmail","parameters":[{"name":"X-ServiceToken","in":"header","description":"ServiceToken","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["user"],"depth":1}},"/user/resetPassword/token/{token}":{"post":{"operationId":"UserController_getNewPassword","parameters":[{"name":"X-ServiceToken","in":"header","description":"ServiceToken","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordResetDto"}}}},"responses":{"201":{"description":""}},"tags":["user"],"depth":1}},"/auth/login":{"post":{"operationId":"AuthController_login","parameters":[{"name":"X-ServiceToken","in":"header","description":"ServiceToken","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserCreateDto"}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BearerTokenDto"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BearerTokenDto"}}}},"400":{"description":""}},"tags":["auth"],"depth":1}},"/auth/refresh":{"post":{"operationId":"AuthController_refresh","parameters":[{"name":"X-ServiceToken","in":"header","description":"ServiceToken","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RefreshtokenDto"}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BearerTokenDto"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BearerTokenDto"}}}},"400":{"description":""}},"tags":["auth"],"depth":1}}}}