fix: now post usertitle dont need title body
This commit is contained in:
parent
9139c77c5f
commit
65b76d58c3
4 changed files with 64 additions and 7 deletions
|
|
@ -326,7 +326,29 @@ paths:
|
|||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/UserTitle'
|
||||
type: object
|
||||
required:
|
||||
- user_id
|
||||
- title_id
|
||||
- status
|
||||
properties:
|
||||
user_id:
|
||||
type: integer
|
||||
format: int64
|
||||
title_id:
|
||||
type: integer
|
||||
format: int64
|
||||
status:
|
||||
$ref: '#/components/schemas/UserTitleStatus'
|
||||
rate:
|
||||
type: integer
|
||||
format: int32
|
||||
review_id:
|
||||
type: integer
|
||||
format: int64
|
||||
ctime:
|
||||
type: string
|
||||
format: date-time
|
||||
responses:
|
||||
'200':
|
||||
description: Title successfully added to user
|
||||
|
|
|
|||
|
|
@ -226,11 +226,23 @@ type GetUsersUserIdTitlesParams struct {
|
|||
Fields *string `form:"fields,omitempty" json:"fields,omitempty"`
|
||||
}
|
||||
|
||||
// AddUserTitleJSONBody defines parameters for AddUserTitle.
|
||||
type AddUserTitleJSONBody struct {
|
||||
Ctime *time.Time `json:"ctime,omitempty"`
|
||||
Rate *int32 `json:"rate,omitempty"`
|
||||
ReviewId *int64 `json:"review_id,omitempty"`
|
||||
|
||||
// Status User's title status
|
||||
Status UserTitleStatus `json:"status"`
|
||||
TitleId int64 `json:"title_id"`
|
||||
UserId int64 `json:"user_id"`
|
||||
}
|
||||
|
||||
// UpdateUserJSONRequestBody defines body for UpdateUser for application/json ContentType.
|
||||
type UpdateUserJSONRequestBody UpdateUserJSONBody
|
||||
|
||||
// AddUserTitleJSONRequestBody defines body for AddUserTitle for application/json ContentType.
|
||||
type AddUserTitleJSONRequestBody = UserTitle
|
||||
type AddUserTitleJSONRequestBody AddUserTitleJSONBody
|
||||
|
||||
// Getter for additional properties for Title. Returns the specified
|
||||
// element and whether it was found
|
||||
|
|
|
|||
|
|
@ -108,7 +108,30 @@ post:
|
|||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../schemas/UserTitle.yaml'
|
||||
type: object
|
||||
required:
|
||||
- user_id
|
||||
- title_id
|
||||
- status
|
||||
properties:
|
||||
user_id:
|
||||
type: integer
|
||||
format: int64
|
||||
title_id:
|
||||
type: integer
|
||||
format: int64
|
||||
status:
|
||||
$ref: ../schemas/enums/UserTitleStatus.yaml
|
||||
rate:
|
||||
type: integer
|
||||
format: int32
|
||||
review_id:
|
||||
type: integer
|
||||
format: int64
|
||||
ctime:
|
||||
type: string
|
||||
format: date-time
|
||||
|
||||
responses:
|
||||
'200':
|
||||
description: Title successfully added to user
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue