forked from ebhomengo/niki
1
0
Fork 0

fix(niki): update swagger

This commit is contained in:
Iman Mirazimi 2024-05-21 20:27:21 +03:30
parent 6b68385ed1
commit ee64f70466
3 changed files with 91 additions and 6 deletions

View File

@ -861,6 +861,38 @@ const docTemplate = `{
} }
} }
}, },
"adminserviceparam.AdminInfo": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"email": {
"type": "string"
},
"first_name": {
"type": "string"
},
"gender": {
"$ref": "#/definitions/entity.Gender"
},
"id": {
"type": "integer"
},
"last_name": {
"type": "string"
},
"phone_number": {
"type": "string"
},
"role": {
"$ref": "#/definitions/entity.AdminRole"
},
"status": {
"$ref": "#/definitions/entity.AdminStatus"
}
}
},
"adminserviceparam.LoginWithPhoneNumberRequest": { "adminserviceparam.LoginWithPhoneNumberRequest": {
"type": "object", "type": "object",
"properties": { "properties": {
@ -877,8 +909,8 @@ const docTemplate = `{
"adminserviceparam.LoginWithPhoneNumberResponse": { "adminserviceparam.LoginWithPhoneNumberResponse": {
"type": "object", "type": "object",
"properties": { "properties": {
"admin": { "admin_info": {
"$ref": "#/definitions/entity.Admin" "$ref": "#/definitions/adminserviceparam.AdminInfo"
}, },
"tokens": { "tokens": {
"$ref": "#/definitions/adminserviceparam.Tokens" "$ref": "#/definitions/adminserviceparam.Tokens"

View File

@ -850,6 +850,38 @@
} }
} }
}, },
"adminserviceparam.AdminInfo": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"email": {
"type": "string"
},
"first_name": {
"type": "string"
},
"gender": {
"$ref": "#/definitions/entity.Gender"
},
"id": {
"type": "integer"
},
"last_name": {
"type": "string"
},
"phone_number": {
"type": "string"
},
"role": {
"$ref": "#/definitions/entity.AdminRole"
},
"status": {
"$ref": "#/definitions/entity.AdminStatus"
}
}
},
"adminserviceparam.LoginWithPhoneNumberRequest": { "adminserviceparam.LoginWithPhoneNumberRequest": {
"type": "object", "type": "object",
"properties": { "properties": {
@ -866,8 +898,8 @@
"adminserviceparam.LoginWithPhoneNumberResponse": { "adminserviceparam.LoginWithPhoneNumberResponse": {
"type": "object", "type": "object",
"properties": { "properties": {
"admin": { "admin_info": {
"$ref": "#/definitions/entity.Admin" "$ref": "#/definitions/adminserviceparam.AdminInfo"
}, },
"tokens": { "tokens": {
"$ref": "#/definitions/adminserviceparam.Tokens" "$ref": "#/definitions/adminserviceparam.Tokens"

View File

@ -115,6 +115,27 @@ definitions:
- $ref: '#/definitions/entity.KindBoxReqStatus' - $ref: '#/definitions/entity.KindBoxReqStatus'
example: 1 example: 1
type: object type: object
adminserviceparam.AdminInfo:
properties:
description:
type: string
email:
type: string
first_name:
type: string
gender:
$ref: '#/definitions/entity.Gender'
id:
type: integer
last_name:
type: string
phone_number:
type: string
role:
$ref: '#/definitions/entity.AdminRole'
status:
$ref: '#/definitions/entity.AdminStatus'
type: object
adminserviceparam.LoginWithPhoneNumberRequest: adminserviceparam.LoginWithPhoneNumberRequest:
properties: properties:
password: password:
@ -126,8 +147,8 @@ definitions:
type: object type: object
adminserviceparam.LoginWithPhoneNumberResponse: adminserviceparam.LoginWithPhoneNumberResponse:
properties: properties:
admin: admin_info:
$ref: '#/definitions/entity.Admin' $ref: '#/definitions/adminserviceparam.AdminInfo'
tokens: tokens:
$ref: '#/definitions/adminserviceparam.Tokens' $ref: '#/definitions/adminserviceparam.Tokens'
type: object type: object