| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v3-users.yaml
- post:
- summary: 注册账号
- tags:
- - users
- operationId: post_api_v3_users
- description: |-
- 凭 invite(邀请邮件里的,或 `POST /v3/invites` 换来的)建账号,同时建一个
- 私有的 draft 译文 channel,invite 标为已用。邮箱取自 invite。
- 注册不等于登录:返回 201 与新账号,之后用用户名/邮箱 + 密码走登录。
- 实现:`V3\UserController@store`
- security:
- - { }
- -
- bearerAuth: []
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- properties:
- invite:
- type: string
- description: '注册邀请的 uuid'
- username:
- type: string
- description: '用户名,6–32 位字母、数字、下划线'
- nickname:
- type: string
- description: '昵称,不传或空白时用 username'
- password:
- type: string
- description: '密码,6–32 位'
- password_confirmation:
- type: string
- description: 再输一次密码
- lang:
- type: string
- description: '常用译文语言,用作 draft channel 的语言'
- example: zh-Hans
- required:
- - invite
- - username
- - password
- - password_confirmation
- - lang
- responses:
- 200:
- description: 成功
- content:
- application/json:
- schema:
- type: object
- properties:
- data:
- type: object
- properties:
- id:
- type: string
- username:
- type: string
- nickname:
- type: string
- email:
- type: string
- created_at:
- type: string
- nullable: true
- 201:
- description: 已创建
- content:
- application/json:
- schema:
- type: object
- properties:
- data:
- type: object
- properties:
- id:
- type: string
- username:
- type: string
- nickname:
- type: string
- email:
- type: string
- created_at:
- type: string
- nullable: true
- 422:
- $ref: '../../main.yaml#/components/responses/ProblemValidation'
- 429:
- description: 请求过于频繁
- content:
- application/problem+json:
- schema:
- $ref: '../../main.yaml#/components/schemas/ProblemDetails'
|