2.x/chapter2-5/src/docs/asciidoc/html/paths.html
POST /users/
根据User对象创建用户
| Type | Name | Description | Schema |
|---|---|---|---|
Body
|
user
required
|
user
|
|
| HTTP Code | Description | Schema |
|---|---|---|
200
|
OK
|
string
| |
201
|
Created
|
No Content
| |
401
|
Unauthorized
|
No Content
| |
403
|
Forbidden
|
No Content
| |
404
|
Not Found
|
No Content
|
application/json*/*| Type | Name | Scopes |
|---|---|---|
apiKey
|
|
global
|
GET /users/
| HTTP Code | Description | Schema |
|---|---|---|
200
|
OK
|
< User > array
| |
401
|
Unauthorized
|
No Content
| |
403
|
Forbidden
|
No Content
| |
404
|
Not Found
|
No Content
|
*/*| Type | Name | Scopes |
|---|---|---|
apiKey
|
|
global
|
GET /users/{id}
根据url的id来获取用户详细信息
| Type | Name | Description | Schema |
|---|---|---|---|
Path
|
id
required
|
id
|
integer (int64)
|
| HTTP Code | Description | Schema |
|---|---|---|
200
|
OK
|
| |
401
|
Unauthorized
|
No Content
| |
403
|
Forbidden
|
No Content
| |
404
|
Not Found
|
No Content
|
*/*| Type | Name | Scopes |
|---|---|---|
apiKey
|
|
global
|
PUT /users/{id}
根据url的id来指定更新对象,并根据传过来的user信息来更新用户详细信息
| Type | Name | Description | Schema |
|---|---|---|---|
Path
|
id
required
|
用户编号
|
integer (int64)
| |
Body
|
user
required
|
user
|
|
| HTTP Code | Description | Schema |
|---|---|---|
200
|
OK
|
string
| |
201
|
Created
|
No Content
| |
401
|
Unauthorized
|
No Content
| |
403
|
Forbidden
|
No Content
| |
404
|
Not Found
|
No Content
|
application/json*/*| Type | Name | Scopes |
|---|---|---|
apiKey
|
|
global
|
DELETE /users/{id}
根据url的id来指定删除对象
| Type | Name | Description | Schema |
|---|---|---|---|
Path
|
id
required
|
id
|
integer (int64)
|
| HTTP Code | Description | Schema |
|---|---|---|
200
|
OK
|
string
| |
204
|
No Content
|
No Content
| |
401
|
Unauthorized
|
No Content
| |
403
|
Forbidden
|
No Content
|
*/*| Type | Name | Scopes |
|---|---|---|
apiKey
|
|
global
|