diff --git a/docs/docs.go b/docs/docs.go index 2de1690..c6b7ce1 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -111,7 +111,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/handlers.ConfirmAccountDeletionRequest" + "$ref": "#/definitions/dto.ConfirmAccountDeletionRequest" } } ], @@ -212,7 +212,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/handlers.UpdateEmailRequest" + "$ref": "#/definitions/dto.UpdateEmailRequest" } } ], @@ -276,7 +276,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/handlers.ForgotPasswordRequest" + "$ref": "#/definitions/dto.ForgotPasswordRequest" } } ], @@ -316,7 +316,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/handlers.LoginRequest" + "$ref": "#/definitions/dto.LoginRequest" } } ], @@ -453,7 +453,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/handlers.UpdatePasswordRequest" + "$ref": "#/definitions/dto.UpdatePasswordRequest" } } ], @@ -505,7 +505,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/handlers.RefreshTokenRequest" + "$ref": "#/definitions/dto.RefreshTokenRequest" } } ], @@ -563,7 +563,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/handlers.RegisterRequest" + "$ref": "#/definitions/dto.RegisterRequest" } } ], @@ -615,7 +615,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/handlers.ResendVerificationRequest" + "$ref": "#/definitions/dto.ResendVerificationRequest" } } ], @@ -685,7 +685,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/handlers.ResetPasswordRequest" + "$ref": "#/definitions/dto.ResetPasswordRequest" } } ], @@ -736,7 +736,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/handlers.RevokeTokenRequest" + "$ref": "#/definitions/dto.RevokeTokenRequest" } } ], @@ -833,7 +833,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/handlers.UpdateUsernameRequest" + "$ref": "#/definitions/dto.UpdateUsernameRequest" } } ], @@ -945,7 +945,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/handlers.CreatePostRequest" + "$ref": "#/definitions/dto.CreatePostRequest" } } ], @@ -1176,7 +1176,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/handlers.UpdatePostRequest" + "$ref": "#/definitions/dto.UpdatePostRequest" } } ], @@ -1601,7 +1601,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/handlers.RegisterRequest" + "$ref": "#/definitions/dto.RegisterRequest" } } ], @@ -1817,6 +1817,145 @@ const docTemplate = `{ } }, "definitions": { + "dto.ConfirmAccountDeletionRequest": { + "type": "object", + "properties": { + "delete_posts": { + "type": "boolean" + }, + "token": { + "type": "string" + } + } + }, + "dto.CreatePostRequest": { + "type": "object", + "properties": { + "content": { + "type": "string" + }, + "title": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "dto.ForgotPasswordRequest": { + "type": "object", + "properties": { + "username_or_email": { + "type": "string" + } + } + }, + "dto.LoginRequest": { + "type": "object", + "properties": { + "password": { + "type": "string" + }, + "username": { + "type": "string" + } + } + }, + "dto.RefreshTokenRequest": { + "type": "object", + "required": [ + "refresh_token" + ], + "properties": { + "refresh_token": { + "type": "string", + "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." + } + } + }, + "dto.RegisterRequest": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "password": { + "type": "string" + }, + "username": { + "type": "string" + } + } + }, + "dto.ResendVerificationRequest": { + "type": "object", + "properties": { + "email": { + "type": "string" + } + } + }, + "dto.ResetPasswordRequest": { + "type": "object", + "properties": { + "new_password": { + "type": "string" + }, + "token": { + "type": "string" + } + } + }, + "dto.RevokeTokenRequest": { + "type": "object", + "required": [ + "refresh_token" + ], + "properties": { + "refresh_token": { + "type": "string", + "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." + } + } + }, + "dto.UpdateEmailRequest": { + "type": "object", + "properties": { + "email": { + "type": "string" + } + } + }, + "dto.UpdatePasswordRequest": { + "type": "object", + "properties": { + "current_password": { + "type": "string" + }, + "new_password": { + "type": "string" + } + } + }, + "dto.UpdatePostRequest": { + "type": "object", + "properties": { + "content": { + "type": "string" + }, + "title": { + "type": "string" + } + } + }, + "dto.UpdateUsernameRequest": { + "type": "object", + "properties": { + "username": { + "type": "string" + } + } + }, "handlers.APIInfo": { "type": "object", "properties": { @@ -1919,50 +2058,6 @@ const docTemplate = `{ } } }, - "handlers.ConfirmAccountDeletionRequest": { - "type": "object", - "properties": { - "delete_posts": { - "type": "boolean" - }, - "token": { - "type": "string" - } - } - }, - "handlers.CreatePostRequest": { - "type": "object", - "properties": { - "content": { - "type": "string" - }, - "title": { - "type": "string" - }, - "url": { - "type": "string" - } - } - }, - "handlers.ForgotPasswordRequest": { - "type": "object", - "properties": { - "username_or_email": { - "type": "string" - } - } - }, - "handlers.LoginRequest": { - "type": "object", - "properties": { - "password": { - "type": "string" - }, - "username": { - "type": "string" - } - } - }, "handlers.PostResponse": { "type": "object", "properties": { @@ -1978,101 +2073,6 @@ const docTemplate = `{ } } }, - "handlers.RefreshTokenRequest": { - "type": "object", - "required": [ - "refresh_token" - ], - "properties": { - "refresh_token": { - "type": "string", - "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." - } - } - }, - "handlers.RegisterRequest": { - "type": "object", - "properties": { - "email": { - "type": "string" - }, - "password": { - "type": "string" - }, - "username": { - "type": "string" - } - } - }, - "handlers.ResendVerificationRequest": { - "type": "object", - "properties": { - "email": { - "type": "string" - } - } - }, - "handlers.ResetPasswordRequest": { - "type": "object", - "properties": { - "new_password": { - "type": "string" - }, - "token": { - "type": "string" - } - } - }, - "handlers.RevokeTokenRequest": { - "type": "object", - "required": [ - "refresh_token" - ], - "properties": { - "refresh_token": { - "type": "string", - "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." - } - } - }, - "handlers.UpdateEmailRequest": { - "type": "object", - "properties": { - "email": { - "type": "string" - } - } - }, - "handlers.UpdatePasswordRequest": { - "type": "object", - "properties": { - "current_password": { - "type": "string" - }, - "new_password": { - "type": "string" - } - } - }, - "handlers.UpdatePostRequest": { - "type": "object", - "properties": { - "content": { - "type": "string" - }, - "title": { - "type": "string" - } - } - }, - "handlers.UpdateUsernameRequest": { - "type": "object", - "properties": { - "username": { - "type": "string" - } - } - }, "handlers.UserResponse": { "type": "object", "properties": { diff --git a/docs/swagger.json b/docs/swagger.json index 96ca370..2a65f18 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -108,7 +108,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/handlers.ConfirmAccountDeletionRequest" + "$ref": "#/definitions/dto.ConfirmAccountDeletionRequest" } } ], @@ -209,7 +209,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/handlers.UpdateEmailRequest" + "$ref": "#/definitions/dto.UpdateEmailRequest" } } ], @@ -273,7 +273,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/handlers.ForgotPasswordRequest" + "$ref": "#/definitions/dto.ForgotPasswordRequest" } } ], @@ -313,7 +313,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/handlers.LoginRequest" + "$ref": "#/definitions/dto.LoginRequest" } } ], @@ -450,7 +450,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/handlers.UpdatePasswordRequest" + "$ref": "#/definitions/dto.UpdatePasswordRequest" } } ], @@ -502,7 +502,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/handlers.RefreshTokenRequest" + "$ref": "#/definitions/dto.RefreshTokenRequest" } } ], @@ -560,7 +560,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/handlers.RegisterRequest" + "$ref": "#/definitions/dto.RegisterRequest" } } ], @@ -612,7 +612,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/handlers.ResendVerificationRequest" + "$ref": "#/definitions/dto.ResendVerificationRequest" } } ], @@ -682,7 +682,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/handlers.ResetPasswordRequest" + "$ref": "#/definitions/dto.ResetPasswordRequest" } } ], @@ -733,7 +733,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/handlers.RevokeTokenRequest" + "$ref": "#/definitions/dto.RevokeTokenRequest" } } ], @@ -830,7 +830,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/handlers.UpdateUsernameRequest" + "$ref": "#/definitions/dto.UpdateUsernameRequest" } } ], @@ -942,7 +942,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/handlers.CreatePostRequest" + "$ref": "#/definitions/dto.CreatePostRequest" } } ], @@ -1173,7 +1173,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/handlers.UpdatePostRequest" + "$ref": "#/definitions/dto.UpdatePostRequest" } } ], @@ -1598,7 +1598,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/handlers.RegisterRequest" + "$ref": "#/definitions/dto.RegisterRequest" } } ], @@ -1814,6 +1814,145 @@ } }, "definitions": { + "dto.ConfirmAccountDeletionRequest": { + "type": "object", + "properties": { + "delete_posts": { + "type": "boolean" + }, + "token": { + "type": "string" + } + } + }, + "dto.CreatePostRequest": { + "type": "object", + "properties": { + "content": { + "type": "string" + }, + "title": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "dto.ForgotPasswordRequest": { + "type": "object", + "properties": { + "username_or_email": { + "type": "string" + } + } + }, + "dto.LoginRequest": { + "type": "object", + "properties": { + "password": { + "type": "string" + }, + "username": { + "type": "string" + } + } + }, + "dto.RefreshTokenRequest": { + "type": "object", + "required": [ + "refresh_token" + ], + "properties": { + "refresh_token": { + "type": "string", + "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." + } + } + }, + "dto.RegisterRequest": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "password": { + "type": "string" + }, + "username": { + "type": "string" + } + } + }, + "dto.ResendVerificationRequest": { + "type": "object", + "properties": { + "email": { + "type": "string" + } + } + }, + "dto.ResetPasswordRequest": { + "type": "object", + "properties": { + "new_password": { + "type": "string" + }, + "token": { + "type": "string" + } + } + }, + "dto.RevokeTokenRequest": { + "type": "object", + "required": [ + "refresh_token" + ], + "properties": { + "refresh_token": { + "type": "string", + "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." + } + } + }, + "dto.UpdateEmailRequest": { + "type": "object", + "properties": { + "email": { + "type": "string" + } + } + }, + "dto.UpdatePasswordRequest": { + "type": "object", + "properties": { + "current_password": { + "type": "string" + }, + "new_password": { + "type": "string" + } + } + }, + "dto.UpdatePostRequest": { + "type": "object", + "properties": { + "content": { + "type": "string" + }, + "title": { + "type": "string" + } + } + }, + "dto.UpdateUsernameRequest": { + "type": "object", + "properties": { + "username": { + "type": "string" + } + } + }, "handlers.APIInfo": { "type": "object", "properties": { @@ -1916,50 +2055,6 @@ } } }, - "handlers.ConfirmAccountDeletionRequest": { - "type": "object", - "properties": { - "delete_posts": { - "type": "boolean" - }, - "token": { - "type": "string" - } - } - }, - "handlers.CreatePostRequest": { - "type": "object", - "properties": { - "content": { - "type": "string" - }, - "title": { - "type": "string" - }, - "url": { - "type": "string" - } - } - }, - "handlers.ForgotPasswordRequest": { - "type": "object", - "properties": { - "username_or_email": { - "type": "string" - } - } - }, - "handlers.LoginRequest": { - "type": "object", - "properties": { - "password": { - "type": "string" - }, - "username": { - "type": "string" - } - } - }, "handlers.PostResponse": { "type": "object", "properties": { @@ -1975,101 +2070,6 @@ } } }, - "handlers.RefreshTokenRequest": { - "type": "object", - "required": [ - "refresh_token" - ], - "properties": { - "refresh_token": { - "type": "string", - "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." - } - } - }, - "handlers.RegisterRequest": { - "type": "object", - "properties": { - "email": { - "type": "string" - }, - "password": { - "type": "string" - }, - "username": { - "type": "string" - } - } - }, - "handlers.ResendVerificationRequest": { - "type": "object", - "properties": { - "email": { - "type": "string" - } - } - }, - "handlers.ResetPasswordRequest": { - "type": "object", - "properties": { - "new_password": { - "type": "string" - }, - "token": { - "type": "string" - } - } - }, - "handlers.RevokeTokenRequest": { - "type": "object", - "required": [ - "refresh_token" - ], - "properties": { - "refresh_token": { - "type": "string", - "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." - } - } - }, - "handlers.UpdateEmailRequest": { - "type": "object", - "properties": { - "email": { - "type": "string" - } - } - }, - "handlers.UpdatePasswordRequest": { - "type": "object", - "properties": { - "current_password": { - "type": "string" - }, - "new_password": { - "type": "string" - } - } - }, - "handlers.UpdatePostRequest": { - "type": "object", - "properties": { - "content": { - "type": "string" - }, - "title": { - "type": "string" - } - } - }, - "handlers.UpdateUsernameRequest": { - "type": "object", - "properties": { - "username": { - "type": "string" - } - } - }, "handlers.UserResponse": { "type": "object", "properties": { diff --git a/docs/swagger.yaml b/docs/swagger.yaml index de4d607..4db1a64 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -1,5 +1,94 @@ basePath: /api definitions: + dto.ConfirmAccountDeletionRequest: + properties: + delete_posts: + type: boolean + token: + type: string + type: object + dto.CreatePostRequest: + properties: + content: + type: string + title: + type: string + url: + type: string + type: object + dto.ForgotPasswordRequest: + properties: + username_or_email: + type: string + type: object + dto.LoginRequest: + properties: + password: + type: string + username: + type: string + type: object + dto.RefreshTokenRequest: + properties: + refresh_token: + example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9... + type: string + required: + - refresh_token + type: object + dto.RegisterRequest: + properties: + email: + type: string + password: + type: string + username: + type: string + type: object + dto.ResendVerificationRequest: + properties: + email: + type: string + type: object + dto.ResetPasswordRequest: + properties: + new_password: + type: string + token: + type: string + type: object + dto.RevokeTokenRequest: + properties: + refresh_token: + example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9... + type: string + required: + - refresh_token + type: object + dto.UpdateEmailRequest: + properties: + email: + type: string + type: object + dto.UpdatePasswordRequest: + properties: + current_password: + type: string + new_password: + type: string + type: object + dto.UpdatePostRequest: + properties: + content: + type: string + title: + type: string + type: object + dto.UpdateUsernameRequest: + properties: + username: + type: string + type: object handlers.APIInfo: properties: data: {} @@ -70,34 +159,6 @@ definitions: success: type: boolean type: object - handlers.ConfirmAccountDeletionRequest: - properties: - delete_posts: - type: boolean - token: - type: string - type: object - handlers.CreatePostRequest: - properties: - content: - type: string - title: - type: string - url: - type: string - type: object - handlers.ForgotPasswordRequest: - properties: - username_or_email: - type: string - type: object - handlers.LoginRequest: - properties: - password: - type: string - username: - type: string - type: object handlers.PostResponse: properties: data: {} @@ -108,67 +169,6 @@ definitions: success: type: boolean type: object - handlers.RefreshTokenRequest: - properties: - refresh_token: - example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9... - type: string - required: - - refresh_token - type: object - handlers.RegisterRequest: - properties: - email: - type: string - password: - type: string - username: - type: string - type: object - handlers.ResendVerificationRequest: - properties: - email: - type: string - type: object - handlers.ResetPasswordRequest: - properties: - new_password: - type: string - token: - type: string - type: object - handlers.RevokeTokenRequest: - properties: - refresh_token: - example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9... - type: string - required: - - refresh_token - type: object - handlers.UpdateEmailRequest: - properties: - email: - type: string - type: object - handlers.UpdatePasswordRequest: - properties: - current_password: - type: string - new_password: - type: string - type: object - handlers.UpdatePostRequest: - properties: - content: - type: string - title: - type: string - type: object - handlers.UpdateUsernameRequest: - properties: - username: - type: string - type: object handlers.UserResponse: properties: data: {} @@ -268,7 +268,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/handlers.ConfirmAccountDeletionRequest' + $ref: '#/definitions/dto.ConfirmAccountDeletionRequest' produces: - application/json responses: @@ -331,7 +331,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/handlers.UpdateEmailRequest' + $ref: '#/definitions/dto.UpdateEmailRequest' produces: - application/json responses: @@ -375,7 +375,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/handlers.ForgotPasswordRequest' + $ref: '#/definitions/dto.ForgotPasswordRequest' produces: - application/json responses: @@ -401,7 +401,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/handlers.LoginRequest' + $ref: '#/definitions/dto.LoginRequest' produces: - application/json responses: @@ -485,7 +485,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/handlers.UpdatePasswordRequest' + $ref: '#/definitions/dto.UpdatePasswordRequest' produces: - application/json responses: @@ -523,7 +523,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/handlers.RefreshTokenRequest' + $ref: '#/definitions/dto.RefreshTokenRequest' produces: - application/json responses: @@ -561,7 +561,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/handlers.RegisterRequest' + $ref: '#/definitions/dto.RegisterRequest' produces: - application/json responses: @@ -595,7 +595,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/handlers.ResendVerificationRequest' + $ref: '#/definitions/dto.ResendVerificationRequest' produces: - application/json responses: @@ -641,7 +641,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/handlers.ResetPasswordRequest' + $ref: '#/definitions/dto.ResetPasswordRequest' produces: - application/json responses: @@ -672,7 +672,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/handlers.RevokeTokenRequest' + $ref: '#/definitions/dto.RevokeTokenRequest' produces: - application/json responses: @@ -735,7 +735,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/handlers.UpdateUsernameRequest' + $ref: '#/definitions/dto.UpdateUsernameRequest' produces: - application/json responses: @@ -809,7 +809,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/handlers.CreatePostRequest' + $ref: '#/definitions/dto.CreatePostRequest' produces: - application/json responses: @@ -933,7 +933,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/handlers.UpdatePostRequest' + $ref: '#/definitions/dto.UpdatePostRequest' produces: - application/json responses: @@ -1260,7 +1260,7 @@ paths: name: request required: true schema: - $ref: '#/definitions/handlers.RegisterRequest' + $ref: '#/definitions/dto.RegisterRequest' produces: - application/json responses: