-
Notifications
You must be signed in to change notification settings - Fork 0
/
swagger-spec.json
1 lines (1 loc) · 3.04 KB
/
swagger-spec.json
1
{"openapi":"3.0.0","paths":{"/health":{"get":{"operationId":"HealthController_healthCheck","parameters":[],"responses":{"200":{"description":"Get health check","content":{"application/json":{"schema":{"$ref":"#/components/schemas/"}}}}},"tags":["health"]}},"/users":{"get":{"operationId":"UsersController_findAll","parameters":[{"name":"x-api-key","in":"header","description":"API Key","schema":{"type":"string"}}],"responses":{"200":{"description":"List all users.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDto"}}}}},"tags":["users"]},"post":{"operationId":"UsersController_create","parameters":[{"name":"x-api-key","in":"header","description":"API Key","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserCreateDto"}}}}},"responses":{"201":{"description":"Create a new user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDto"}}}}},"tags":["users"]},"put":{"operationId":"UsersController_update","parameters":[{"name":"x-api-key","in":"header","description":"API Key","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserUpdateDto"}}}}},"responses":{"200":{"description":"Update user data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDto"}}}},"404":{"description":"User not found"}},"tags":["users"]}},"/users/{id}":{"get":{"operationId":"UsersController_findOne","parameters":[{"name":"x-api-key","in":"header","description":"API Key","schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"List a user by id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDto"}}}},"404":{"description":"User not found"}},"tags":["users"]},"delete":{"operationId":"UsersController_delete","parameters":[{"name":"x-api-key","in":"header","description":"API Key","schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":"Delete a user by id."},"404":{"description":"User not found"}},"tags":["users"]}}},"info":{"title":"electron-react-nest-boilerplate","description":"","version":"1.0.0","contact":{}},"tags":[],"servers":[{"url":"http://127.0.0.1:546"}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}},"schemas":{"UserDto":{"type":"object","properties":{"id":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"gender":{"type":"string"}},"required":["id","first_name","last_name","gender"]},"UserCreateDto":{"type":"object","properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"gender":{"type":"string"}},"required":["first_name","last_name","gender"]},"UserUpdateDto":{"type":"object","properties":{"id":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"gender":{"type":"string"}},"required":["id","first_name","last_name","gender"]}}}}