Back to Springboot Learning

Paths

2.x/chapter2-5/src/docs/asciidoc/html/paths.html

latest3.6 KB
Original Source

Paths

创建用户

POST /users/

Description

根据User对象创建用户

Parameters

TypeNameDescriptionSchema

Body

|

user
required

|

user

|

User

|

Responses

HTTP CodeDescriptionSchema

200

|

OK

|

string

| |

201

|

Created

|

No Content

| |

401

|

Unauthorized

|

No Content

| |

403

|

Forbidden

|

No Content

| |

404

|

Not Found

|

No Content

|

Consumes

  • application/json

Produces

  • */*

Tags

  • 用户管理

Security

TypeNameScopes

apiKey

|

Authorization

|

global

|

获取用户列表

GET /users/

Responses

HTTP CodeDescriptionSchema

200

|

OK

|

< User > array

| |

401

|

Unauthorized

|

No Content

| |

403

|

Forbidden

|

No Content

| |

404

|

Not Found

|

No Content

|

Produces

  • */*

Tags

  • 用户管理

Security

TypeNameScopes

apiKey

|

Authorization

|

global

|

获取用户详细信息

GET /users/{id}

Description

根据url的id来获取用户详细信息

Parameters

TypeNameDescriptionSchema

Path

|

id
required

|

id

|

integer (int64)

|

Responses

HTTP CodeDescriptionSchema

200

|

OK

|

User

| |

401

|

Unauthorized

|

No Content

| |

403

|

Forbidden

|

No Content

| |

404

|

Not Found

|

No Content

|

Produces

  • */*

Tags

  • 用户管理

Security

TypeNameScopes

apiKey

|

Authorization

|

global

|

更新用户详细信息

PUT /users/{id}

Description

根据url的id来指定更新对象,并根据传过来的user信息来更新用户详细信息

Parameters

TypeNameDescriptionSchema

Path

|

id
required

|

用户编号

|

integer (int64)

| |

Body

|

user
required

|

user

|

User

|

Responses

HTTP CodeDescriptionSchema

200

|

OK

|

string

| |

201

|

Created

|

No Content

| |

401

|

Unauthorized

|

No Content

| |

403

|

Forbidden

|

No Content

| |

404

|

Not Found

|

No Content

|

Consumes

  • application/json

Produces

  • */*

Tags

  • 用户管理

Security

TypeNameScopes

apiKey

|

Authorization

|

global

|

删除用户

DELETE /users/{id}

Description

根据url的id来指定删除对象

Parameters

TypeNameDescriptionSchema

Path

|

id
required

|

id

|

integer (int64)

|

Responses

HTTP CodeDescriptionSchema

200

|

OK

|

string

| |

204

|

No Content

|

No Content

| |

401

|

Unauthorized

|

No Content

| |

403

|

Forbidden

|

No Content

|

Produces

  • */*

Tags

  • 用户管理

Security

TypeNameScopes

apiKey

|

Authorization

|

global

|