Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/openinfradev/tks-api int…
Browse files Browse the repository at this point in the history
…o stack_conf
  • Loading branch information
ktkfree committed Apr 24, 2023
2 parents 759b460 + 4a8182d commit 14d59ca
Show file tree
Hide file tree
Showing 19 changed files with 562 additions and 58 deletions.
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 @@ -3957,7 +4010,7 @@ const docTemplate = `{
}
}
},
"domain.UpdateUserRequest": {
"domain.UpdateUserByAdminRequest": {
"type": "object",
"properties": {
"department": {
Expand Down Expand Up @@ -3987,6 +4040,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 @@ -3950,7 +4003,7 @@
}
}
},
"domain.UpdateUserRequest": {
"domain.UpdateUserByAdminRequest": {
"type": "object",
"properties": {
"department": {
Expand Down Expand Up @@ -3980,6 +4033,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 @@ -1210,7 +1210,7 @@ definitions:
description:
type: string
type: object
domain.UpdateUserRequest:
domain.UpdateUserByAdminRequest:
properties:
department:
maxLength: 20
Expand All @@ -1232,6 +1232,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 @@ -1299,6 +1346,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

0 comments on commit 14d59ca

Please sign in to comment.