Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#버그수정 #기능개선: User API, Logout API #37

Merged
merged 5 commits into from
Apr 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
124 changes: 123 additions & 1 deletion api/swagger/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,59 @@ const docTemplate = `{
"host": "{{.Host}}",
"basePath": "{{.BasePath}}",
"paths": {
"/admin/organizations/{organizationId}/users/{accountId}": {
"put": {
"security": [
{
"JWT": []
}
],
"description": "Update user detail",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Admin"
],
"summary": "As admin, Update user detail",
"parameters": [
{
"type": "string",
"description": "organizationId",
"name": "organizationId",
"in": "path",
"required": true
},
{
"type": "string",
"description": "accountId",
"name": "accountId",
"in": "path",
"required": true
},
{
"description": "update user request",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/domain.UpdateUserByAdminRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/domain.UpdateUserByAdminResponse"
}
}
}
}
},
"/app-groups": {
"get": {
"security": [
Expand Down Expand Up @@ -3868,7 +3921,7 @@ const docTemplate = `{
}
}
},
"domain.UpdateUserRequest": {
"domain.UpdateUserByAdminRequest": {
"type": "object",
"properties": {
"department": {
Expand Down Expand Up @@ -3898,6 +3951,75 @@ const docTemplate = `{
}
}
},
"domain.UpdateUserByAdminResponse": {
"type": "object",
"properties": {
"user": {
"type": "object",
"properties": {
"accountId": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"department": {
"type": "string"
},
"description": {
"type": "string"
},
"email": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"organization": {
"$ref": "#/definitions/domain.Organization"
},
"role": {
"$ref": "#/definitions/domain.Role"
},
"updatedAt": {
"type": "string"
}
}
}
}
},
"domain.UpdateUserRequest": {
"type": "object",
"required": [
"password"
],
"properties": {
"department": {
"type": "string",
"maxLength": 20,
"minLength": 0
},
"description": {
"type": "string",
"maxLength": 100,
"minLength": 0
},
"email": {
"type": "string"
},
"name": {
"type": "string",
"maxLength": 20,
"minLength": 0
},
"password": {
"type": "string"
}
}
},
"domain.UpdateUserResponse": {
"type": "object",
"properties": {
Expand Down
124 changes: 123 additions & 1 deletion api/swagger/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,59 @@
"host": "tks-api-dev.taco-cat.xyz",
"basePath": "/api/1.0/",
"paths": {
"/admin/organizations/{organizationId}/users/{accountId}": {
"put": {
"security": [
{
"JWT": []
}
],
"description": "Update user detail",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Admin"
],
"summary": "As admin, Update user detail",
"parameters": [
{
"type": "string",
"description": "organizationId",
"name": "organizationId",
"in": "path",
"required": true
},
{
"type": "string",
"description": "accountId",
"name": "accountId",
"in": "path",
"required": true
},
{
"description": "update user request",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/domain.UpdateUserByAdminRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/domain.UpdateUserByAdminResponse"
}
}
}
}
},
"/app-groups": {
"get": {
"security": [
Expand Down Expand Up @@ -3861,7 +3914,7 @@
}
}
},
"domain.UpdateUserRequest": {
"domain.UpdateUserByAdminRequest": {
"type": "object",
"properties": {
"department": {
Expand Down Expand Up @@ -3891,6 +3944,75 @@
}
}
},
"domain.UpdateUserByAdminResponse": {
"type": "object",
"properties": {
"user": {
"type": "object",
"properties": {
"accountId": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"department": {
"type": "string"
},
"description": {
"type": "string"
},
"email": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"organization": {
"$ref": "#/definitions/domain.Organization"
},
"role": {
"$ref": "#/definitions/domain.Role"
},
"updatedAt": {
"type": "string"
}
}
}
}
},
"domain.UpdateUserRequest": {
"type": "object",
"required": [
"password"
],
"properties": {
"department": {
"type": "string",
"maxLength": 20,
"minLength": 0
},
"description": {
"type": "string",
"maxLength": 100,
"minLength": 0
},
"email": {
"type": "string"
},
"name": {
"type": "string",
"maxLength": 20,
"minLength": 0
},
"password": {
"type": "string"
}
}
},
"domain.UpdateUserResponse": {
"type": "object",
"properties": {
Expand Down
83 changes: 82 additions & 1 deletion api/swagger/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1176,7 +1176,7 @@ definitions:
description:
type: string
type: object
domain.UpdateUserRequest:
domain.UpdateUserByAdminRequest:
properties:
department:
maxLength: 20
Expand All @@ -1198,6 +1198,53 @@ definitions:
- user
type: string
type: object
domain.UpdateUserByAdminResponse:
properties:
user:
properties:
accountId:
type: string
createdAt:
type: string
department:
type: string
description:
type: string
email:
type: string
id:
type: string
name:
type: string
organization:
$ref: '#/definitions/domain.Organization'
role:
$ref: '#/definitions/domain.Role'
updatedAt:
type: string
type: object
type: object
domain.UpdateUserRequest:
properties:
department:
maxLength: 20
minLength: 0
type: string
description:
maxLength: 100
minLength: 0
type: string
email:
type: string
name:
maxLength: 20
minLength: 0
type: string
password:
type: string
required:
- password
type: object
domain.UpdateUserResponse:
properties:
user:
Expand Down Expand Up @@ -1265,6 +1312,40 @@ info:
title: tks-api service
version: "1.0"
paths:
/admin/organizations/{organizationId}/users/{accountId}:
put:
consumes:
- application/json
description: Update user detail
parameters:
- description: organizationId
in: path
name: organizationId
required: true
type: string
- description: accountId
in: path
name: accountId
required: true
type: string
- description: update user request
in: body
name: body
required: true
schema:
$ref: '#/definitions/domain.UpdateUserByAdminRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.UpdateUserByAdminResponse'
security:
- JWT: []
summary: As admin, Update user detail
tags:
- Admin
/app-groups:
delete:
consumes:
Expand Down
Loading