docs: update swagger
This commit is contained in:
92
docs/docs.go
92
docs/docs.go
@@ -1819,6 +1819,9 @@ const docTemplate = `{
|
|||||||
"definitions": {
|
"definitions": {
|
||||||
"dto.ConfirmAccountDeletionRequest": {
|
"dto.ConfirmAccountDeletionRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"token"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"delete_posts": {
|
"delete_posts": {
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
@@ -1830,20 +1833,30 @@ const docTemplate = `{
|
|||||||
},
|
},
|
||||||
"dto.CreatePostRequest": {
|
"dto.CreatePostRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"url"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"content": {
|
"content": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 10000
|
||||||
},
|
},
|
||||||
"title": {
|
"title": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 200,
|
||||||
|
"minLength": 3
|
||||||
},
|
},
|
||||||
"url": {
|
"url": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 2048
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dto.ForgotPasswordRequest": {
|
"dto.ForgotPasswordRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"username_or_email"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"username_or_email": {
|
"username_or_email": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
@@ -1852,12 +1865,20 @@ const docTemplate = `{
|
|||||||
},
|
},
|
||||||
"dto.LoginRequest": {
|
"dto.LoginRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"password",
|
||||||
|
"username"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"password": {
|
"password": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 128,
|
||||||
|
"minLength": 8
|
||||||
},
|
},
|
||||||
"username": {
|
"username": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 50,
|
||||||
|
"minLength": 3
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -1875,31 +1896,51 @@ const docTemplate = `{
|
|||||||
},
|
},
|
||||||
"dto.RegisterRequest": {
|
"dto.RegisterRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"email",
|
||||||
|
"password",
|
||||||
|
"username"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"email": {
|
"email": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 254
|
||||||
},
|
},
|
||||||
"password": {
|
"password": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 128,
|
||||||
|
"minLength": 8
|
||||||
},
|
},
|
||||||
"username": {
|
"username": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 50,
|
||||||
|
"minLength": 3
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dto.ResendVerificationRequest": {
|
"dto.ResendVerificationRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"email"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"email": {
|
"email": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 254
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dto.ResetPasswordRequest": {
|
"dto.ResetPasswordRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"new_password",
|
||||||
|
"token"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"new_password": {
|
"new_password": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 128,
|
||||||
|
"minLength": 8
|
||||||
},
|
},
|
||||||
"token": {
|
"token": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
@@ -1920,39 +1961,60 @@ const docTemplate = `{
|
|||||||
},
|
},
|
||||||
"dto.UpdateEmailRequest": {
|
"dto.UpdateEmailRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"email"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"email": {
|
"email": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 254
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dto.UpdatePasswordRequest": {
|
"dto.UpdatePasswordRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"current_password",
|
||||||
|
"new_password"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"current_password": {
|
"current_password": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"new_password": {
|
"new_password": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 128,
|
||||||
|
"minLength": 8
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dto.UpdatePostRequest": {
|
"dto.UpdatePostRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"title"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"content": {
|
"content": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 10000
|
||||||
},
|
},
|
||||||
"title": {
|
"title": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 200,
|
||||||
|
"minLength": 3
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dto.UpdateUsernameRequest": {
|
"dto.UpdateUsernameRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"username"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"username": {
|
"username": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 50,
|
||||||
|
"minLength": 3
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1816,6 +1816,9 @@
|
|||||||
"definitions": {
|
"definitions": {
|
||||||
"dto.ConfirmAccountDeletionRequest": {
|
"dto.ConfirmAccountDeletionRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"token"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"delete_posts": {
|
"delete_posts": {
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
@@ -1827,20 +1830,30 @@
|
|||||||
},
|
},
|
||||||
"dto.CreatePostRequest": {
|
"dto.CreatePostRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"url"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"content": {
|
"content": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 10000
|
||||||
},
|
},
|
||||||
"title": {
|
"title": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 200,
|
||||||
|
"minLength": 3
|
||||||
},
|
},
|
||||||
"url": {
|
"url": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 2048
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dto.ForgotPasswordRequest": {
|
"dto.ForgotPasswordRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"username_or_email"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"username_or_email": {
|
"username_or_email": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
@@ -1849,12 +1862,20 @@
|
|||||||
},
|
},
|
||||||
"dto.LoginRequest": {
|
"dto.LoginRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"password",
|
||||||
|
"username"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"password": {
|
"password": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 128,
|
||||||
|
"minLength": 8
|
||||||
},
|
},
|
||||||
"username": {
|
"username": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 50,
|
||||||
|
"minLength": 3
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -1872,31 +1893,51 @@
|
|||||||
},
|
},
|
||||||
"dto.RegisterRequest": {
|
"dto.RegisterRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"email",
|
||||||
|
"password",
|
||||||
|
"username"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"email": {
|
"email": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 254
|
||||||
},
|
},
|
||||||
"password": {
|
"password": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 128,
|
||||||
|
"minLength": 8
|
||||||
},
|
},
|
||||||
"username": {
|
"username": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 50,
|
||||||
|
"minLength": 3
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dto.ResendVerificationRequest": {
|
"dto.ResendVerificationRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"email"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"email": {
|
"email": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 254
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dto.ResetPasswordRequest": {
|
"dto.ResetPasswordRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"new_password",
|
||||||
|
"token"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"new_password": {
|
"new_password": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 128,
|
||||||
|
"minLength": 8
|
||||||
},
|
},
|
||||||
"token": {
|
"token": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
@@ -1917,39 +1958,60 @@
|
|||||||
},
|
},
|
||||||
"dto.UpdateEmailRequest": {
|
"dto.UpdateEmailRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"email"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"email": {
|
"email": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 254
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dto.UpdatePasswordRequest": {
|
"dto.UpdatePasswordRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"current_password",
|
||||||
|
"new_password"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"current_password": {
|
"current_password": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"new_password": {
|
"new_password": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 128,
|
||||||
|
"minLength": 8
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dto.UpdatePostRequest": {
|
"dto.UpdatePostRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"title"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"content": {
|
"content": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 10000
|
||||||
},
|
},
|
||||||
"title": {
|
"title": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 200,
|
||||||
|
"minLength": 3
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dto.UpdateUsernameRequest": {
|
"dto.UpdateUsernameRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"username"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"username": {
|
"username": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 50,
|
||||||
|
"minLength": 3
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -6,27 +6,44 @@ definitions:
|
|||||||
type: boolean
|
type: boolean
|
||||||
token:
|
token:
|
||||||
type: string
|
type: string
|
||||||
|
required:
|
||||||
|
- token
|
||||||
type: object
|
type: object
|
||||||
dto.CreatePostRequest:
|
dto.CreatePostRequest:
|
||||||
properties:
|
properties:
|
||||||
content:
|
content:
|
||||||
|
maxLength: 10000
|
||||||
type: string
|
type: string
|
||||||
title:
|
title:
|
||||||
|
maxLength: 200
|
||||||
|
minLength: 3
|
||||||
type: string
|
type: string
|
||||||
url:
|
url:
|
||||||
|
maxLength: 2048
|
||||||
type: string
|
type: string
|
||||||
|
required:
|
||||||
|
- url
|
||||||
type: object
|
type: object
|
||||||
dto.ForgotPasswordRequest:
|
dto.ForgotPasswordRequest:
|
||||||
properties:
|
properties:
|
||||||
username_or_email:
|
username_or_email:
|
||||||
type: string
|
type: string
|
||||||
|
required:
|
||||||
|
- username_or_email
|
||||||
type: object
|
type: object
|
||||||
dto.LoginRequest:
|
dto.LoginRequest:
|
||||||
properties:
|
properties:
|
||||||
password:
|
password:
|
||||||
|
maxLength: 128
|
||||||
|
minLength: 8
|
||||||
type: string
|
type: string
|
||||||
username:
|
username:
|
||||||
|
maxLength: 50
|
||||||
|
minLength: 3
|
||||||
type: string
|
type: string
|
||||||
|
required:
|
||||||
|
- password
|
||||||
|
- username
|
||||||
type: object
|
type: object
|
||||||
dto.RefreshTokenRequest:
|
dto.RefreshTokenRequest:
|
||||||
properties:
|
properties:
|
||||||
@@ -39,23 +56,40 @@ definitions:
|
|||||||
dto.RegisterRequest:
|
dto.RegisterRequest:
|
||||||
properties:
|
properties:
|
||||||
email:
|
email:
|
||||||
|
maxLength: 254
|
||||||
type: string
|
type: string
|
||||||
password:
|
password:
|
||||||
|
maxLength: 128
|
||||||
|
minLength: 8
|
||||||
type: string
|
type: string
|
||||||
username:
|
username:
|
||||||
|
maxLength: 50
|
||||||
|
minLength: 3
|
||||||
type: string
|
type: string
|
||||||
|
required:
|
||||||
|
- email
|
||||||
|
- password
|
||||||
|
- username
|
||||||
type: object
|
type: object
|
||||||
dto.ResendVerificationRequest:
|
dto.ResendVerificationRequest:
|
||||||
properties:
|
properties:
|
||||||
email:
|
email:
|
||||||
|
maxLength: 254
|
||||||
type: string
|
type: string
|
||||||
|
required:
|
||||||
|
- email
|
||||||
type: object
|
type: object
|
||||||
dto.ResetPasswordRequest:
|
dto.ResetPasswordRequest:
|
||||||
properties:
|
properties:
|
||||||
new_password:
|
new_password:
|
||||||
|
maxLength: 128
|
||||||
|
minLength: 8
|
||||||
type: string
|
type: string
|
||||||
token:
|
token:
|
||||||
type: string
|
type: string
|
||||||
|
required:
|
||||||
|
- new_password
|
||||||
|
- token
|
||||||
type: object
|
type: object
|
||||||
dto.RevokeTokenRequest:
|
dto.RevokeTokenRequest:
|
||||||
properties:
|
properties:
|
||||||
@@ -68,26 +102,43 @@ definitions:
|
|||||||
dto.UpdateEmailRequest:
|
dto.UpdateEmailRequest:
|
||||||
properties:
|
properties:
|
||||||
email:
|
email:
|
||||||
|
maxLength: 254
|
||||||
type: string
|
type: string
|
||||||
|
required:
|
||||||
|
- email
|
||||||
type: object
|
type: object
|
||||||
dto.UpdatePasswordRequest:
|
dto.UpdatePasswordRequest:
|
||||||
properties:
|
properties:
|
||||||
current_password:
|
current_password:
|
||||||
type: string
|
type: string
|
||||||
new_password:
|
new_password:
|
||||||
|
maxLength: 128
|
||||||
|
minLength: 8
|
||||||
type: string
|
type: string
|
||||||
|
required:
|
||||||
|
- current_password
|
||||||
|
- new_password
|
||||||
type: object
|
type: object
|
||||||
dto.UpdatePostRequest:
|
dto.UpdatePostRequest:
|
||||||
properties:
|
properties:
|
||||||
content:
|
content:
|
||||||
|
maxLength: 10000
|
||||||
type: string
|
type: string
|
||||||
title:
|
title:
|
||||||
|
maxLength: 200
|
||||||
|
minLength: 3
|
||||||
type: string
|
type: string
|
||||||
|
required:
|
||||||
|
- title
|
||||||
type: object
|
type: object
|
||||||
dto.UpdateUsernameRequest:
|
dto.UpdateUsernameRequest:
|
||||||
properties:
|
properties:
|
||||||
username:
|
username:
|
||||||
|
maxLength: 50
|
||||||
|
minLength: 3
|
||||||
type: string
|
type: string
|
||||||
|
required:
|
||||||
|
- username
|
||||||
type: object
|
type: object
|
||||||
handlers.APIInfo:
|
handlers.APIInfo:
|
||||||
properties:
|
properties:
|
||||||
|
|||||||
Reference in New Issue
Block a user