parent
79b1a801b5
commit
a6c63e7968
@ -1,62 +1,124 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"description": "This is a sample server celler server.",
|
||||
"title": "Swagger Example API",
|
||||
"termsOfService": "http://swagger.io/terms/",
|
||||
"contact": {
|
||||
"name": "API Support",
|
||||
"url": "http://www.swagger.io/support",
|
||||
"email": "support@swagger.io"
|
||||
},
|
||||
"license": {
|
||||
"name": "Apache 2.0",
|
||||
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
|
||||
},
|
||||
"version": "1.0"
|
||||
},
|
||||
"host": "localhost:8080",
|
||||
"basePath": "/api/v1",
|
||||
"contact": {}
|
||||
},
|
||||
"paths": {
|
||||
"/hello": {
|
||||
"get": {
|
||||
"description": "向你说Hello",
|
||||
"/user/update_user_info": {
|
||||
"post": {
|
||||
"description": "修改用户信息 userID faceURL等",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"测试"
|
||||
"用户信息"
|
||||
],
|
||||
"summary": "测试SayHello",
|
||||
"summary": "修改用户信息",
|
||||
"operationId": "UpdateUserInfo",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "人名",
|
||||
"name": "who",
|
||||
"in": "query",
|
||||
"description": "im token",
|
||||
"name": "token",
|
||||
"in": "header",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"description": "请求",
|
||||
"name": "req",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/base_info.UpdateSelfUserInfoReq"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{\"msg\": \"hello Razeen\"}",
|
||||
"0": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
"$ref": "#/definitions/base_info.UpdateUserInfoResp"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "{\"msg\": \"who are you\"}",
|
||||
"description": "errCode为400 一般为参数输入错误, token未带上等",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
"$ref": "#/definitions/base_info.UpdateUserInfoResp"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "errCode为500 一般为服务器内部错误",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/base_info.UpdateUserInfoResp"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"securityDefinitions": {
|
||||
"BasicAuth": {
|
||||
"type": "basic"
|
||||
"definitions": {
|
||||
"base_info.UpdateSelfUserInfoReq": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"operationID",
|
||||
"userID"
|
||||
],
|
||||
"properties": {
|
||||
"birth": {
|
||||
"type": "integer"
|
||||
},
|
||||
"email": {
|
||||
"type": "string",
|
||||
"maxLength": 64
|
||||
},
|
||||
"ex": {
|
||||
"type": "string",
|
||||
"maxLength": 1024
|
||||
},
|
||||
"faceURL": {
|
||||
"type": "string",
|
||||
"maxLength": 1024
|
||||
},
|
||||
"gender": {
|
||||
"type": "integer",
|
||||
"enum": [
|
||||
0,
|
||||
1,
|
||||
2
|
||||
]
|
||||
},
|
||||
"nickname": {
|
||||
"type": "string",
|
||||
"maxLength": 64,
|
||||
"minLength": 1
|
||||
},
|
||||
"operationID": {
|
||||
"type": "string"
|
||||
},
|
||||
"phoneNumber": {
|
||||
"type": "string",
|
||||
"maxLength": 32
|
||||
},
|
||||
"userID": {
|
||||
"type": "string",
|
||||
"maxLength": 64,
|
||||
"minLength": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
"base_info.UpdateUserInfoResp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"errCode": {
|
||||
"type": "integer"
|
||||
},
|
||||
"errMsg": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,42 +1,84 @@
|
||||
basePath: /api/v1
|
||||
host: localhost:8080
|
||||
definitions:
|
||||
base_info.UpdateSelfUserInfoReq:
|
||||
properties:
|
||||
birth:
|
||||
type: integer
|
||||
email:
|
||||
maxLength: 64
|
||||
type: string
|
||||
ex:
|
||||
maxLength: 1024
|
||||
type: string
|
||||
faceURL:
|
||||
maxLength: 1024
|
||||
type: string
|
||||
gender:
|
||||
enum:
|
||||
- 0
|
||||
- 1
|
||||
- 2
|
||||
type: integer
|
||||
nickname:
|
||||
maxLength: 64
|
||||
minLength: 1
|
||||
type: string
|
||||
operationID:
|
||||
type: string
|
||||
phoneNumber:
|
||||
maxLength: 32
|
||||
type: string
|
||||
userID:
|
||||
maxLength: 64
|
||||
minLength: 1
|
||||
type: string
|
||||
required:
|
||||
- operationID
|
||||
- userID
|
||||
type: object
|
||||
base_info.UpdateUserInfoResp:
|
||||
properties:
|
||||
errCode:
|
||||
type: integer
|
||||
errMsg:
|
||||
type: string
|
||||
type: object
|
||||
info:
|
||||
contact:
|
||||
email: support@swagger.io
|
||||
name: API Support
|
||||
url: http://www.swagger.io/support
|
||||
description: This is a sample server celler server.
|
||||
license:
|
||||
name: Apache 2.0
|
||||
url: http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
termsOfService: http://swagger.io/terms/
|
||||
title: Swagger Example API
|
||||
version: "1.0"
|
||||
contact: {}
|
||||
paths:
|
||||
/hello:
|
||||
get:
|
||||
/user/update_user_info:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: 向你说Hello
|
||||
description: 修改用户信息 userID faceURL等
|
||||
operationId: UpdateUserInfo
|
||||
parameters:
|
||||
- description: 人名
|
||||
in: query
|
||||
name: who
|
||||
- description: im token
|
||||
in: header
|
||||
name: token
|
||||
required: true
|
||||
type: string
|
||||
- description: 请求
|
||||
in: body
|
||||
name: req
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/base_info.UpdateSelfUserInfoReq'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: '{"msg": "hello Razeen"}'
|
||||
"0":
|
||||
description: ""
|
||||
schema:
|
||||
type: string
|
||||
$ref: '#/definitions/base_info.UpdateUserInfoResp'
|
||||
"400":
|
||||
description: '{"msg": "who are you"}'
|
||||
description: errCode为400 一般为参数输入错误, token未带上等
|
||||
schema:
|
||||
type: string
|
||||
summary: 测试SayHello
|
||||
$ref: '#/definitions/base_info.UpdateUserInfoResp'
|
||||
"500":
|
||||
description: errCode为500 一般为服务器内部错误
|
||||
schema:
|
||||
$ref: '#/definitions/base_info.UpdateUserInfoResp'
|
||||
summary: 修改用户信息
|
||||
tags:
|
||||
- 测试
|
||||
securityDefinitions:
|
||||
BasicAuth:
|
||||
type: basic
|
||||
- 用户信息
|
||||
swagger: "2.0"
|
||||
|
Loading…
Reference in new issue