删除用户
删除指定的用户账户。
DELETE https://petstore3.swagger.io/api/v3/user/{username}
示例
- API Key
- OAuth 2.0
cURL
DELETE "https://petstore3.swagger.io/api/v3/user/user1" \
-H "api_key: <YOUR_API_KEY>"
cURL
DELETE "https://petstore3.swagger.io/api/v3/user/user1" \
-H "Authorization: Bearer <YOUR_OAUTH_TOKEN>"
响应
| 状态码 | 描述 |
|---|---|
| 200 | 用户已删除 |
| 400 | 提供的用户名无效 |
| 404 | 未找到该用户 |
删除操作成功时,将返回状态码 200,且无响应正文。
参数
路径参数
| 参数名 | 类型 | 描述 |
|---|---|---|
username | 字符串 | 要删除的用户的用户名 |