diff --git a/backend/docs/docs.go b/backend/docs/docs.go index 362d3f9..6850940 100644 --- a/backend/docs/docs.go +++ b/backend/docs/docs.go @@ -141,7 +141,10 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "desc" + "description": "Account is created and awaiting verification" + }, + "409": { + "description": "Username or email is already taken" } } } @@ -362,13 +365,10 @@ const docTemplate = `{ "type": "string" }, "password": { - "description": "TODO: password checking", "type": "string" }, "username": { - "type": "string", - "maxLength": 20, - "minLength": 3 + "type": "string" } } }, @@ -380,21 +380,14 @@ const docTemplate = `{ "verification_code" ], "properties": { - "avatar_url": { - "type": "string", - "maxLength": 255 - }, "birthday": { "type": "string" }, "name": { - "type": "string", - "maxLength": 75 + "type": "string" }, "username": { - "type": "string", - "maxLength": 20, - "minLength": 3 + "type": "string" }, "verification_code": { "type": "string" diff --git a/backend/docs/swagger.json b/backend/docs/swagger.json index 7e283e8..607e8de 100644 --- a/backend/docs/swagger.json +++ b/backend/docs/swagger.json @@ -137,7 +137,10 @@ ], "responses": { "200": { - "description": "desc" + "description": "Account is created and awaiting verification" + }, + "409": { + "description": "Username or email is already taken" } } } @@ -358,13 +361,10 @@ "type": "string" }, "password": { - "description": "TODO: password checking", "type": "string" }, "username": { - "type": "string", - "maxLength": 20, - "minLength": 3 + "type": "string" } } }, @@ -376,21 +376,14 @@ "verification_code" ], "properties": { - "avatar_url": { - "type": "string", - "maxLength": 255 - }, "birthday": { "type": "string" }, "name": { - "type": "string", - "maxLength": 75 + "type": "string" }, "username": { - "type": "string", - "maxLength": 20, - "minLength": 3 + "type": "string" }, "verification_code": { "type": "string" diff --git a/backend/docs/swagger.yaml b/backend/docs/swagger.yaml index 1ca5665..808a772 100644 --- a/backend/docs/swagger.yaml +++ b/backend/docs/swagger.yaml @@ -32,11 +32,8 @@ definitions: email: type: string password: - description: 'TODO: password checking' type: string username: - maxLength: 20 - minLength: 3 type: string required: - password @@ -44,17 +41,11 @@ definitions: type: object models.RegistrationCompleteRequest: properties: - avatar_url: - maxLength: 255 - type: string birthday: type: string name: - maxLength: 75 type: string username: - maxLength: 20 - minLength: 3 type: string verification_code: type: string @@ -157,7 +148,9 @@ paths: - application/json responses: "200": - description: desc + description: Account is created and awaiting verification + "409": + description: Username or email is already taken summary: Register an account tags: - Auth