Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ universal: generate
generate:
@$(GO) get github.com/swaggo/swag/cmd/swag@v1.16.3
@$(GO) get github.com/google/wire/cmd/wire@v0.5.0
@$(GO) get go.uber.org/mock/mockgen@v0.5.0
@$(GO) get go.uber.org/mock/mockgen@v0.6.0
@$(GO) install github.com/swaggo/swag/cmd/swag@v1.16.3
@$(GO) install github.com/google/wire/cmd/wire@v0.5.0
@$(GO) install go.uber.org/mock/mockgen@v0.5.0
@$(GO) install go.uber.org/mock/mockgen@v0.6.0
@$(GO) generate ./...
@$(GO) mod tidy

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ You can also check out the [plugins here](https://answer.apache.org/plugins).
- Golang >= 1.23
- Node.js >= 20
- pnpm >= 9
- [mockgen](https://github.com/uber-go/mock?tab=readme-ov-file#installation) >= 1.6.0
- [mockgen](https://github.com/uber-go/mock?tab=readme-ov-file#installation) >= 0.6.0
- [wire](https://github.com/google/wire/) >= 0.5.0

### Build
Expand Down
8 changes: 4 additions & 4 deletions cmd/wire_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 23 additions & 9 deletions docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -9780,8 +9780,6 @@ const docTemplate = `{
"schema.QuestionAdd": {
"type": "object",
"required": [
"content",
"tags",
"title"
],
"properties": {
Expand All @@ -9796,7 +9794,7 @@ const docTemplate = `{
"description": "content",
"type": "string",
"maxLength": 65535,
"minLength": 6
"minLength": 0
},
"tags": {
"description": "tags",
Expand All @@ -9817,8 +9815,6 @@ const docTemplate = `{
"type": "object",
"required": [
"answer_content",
"content",
"tags",
"title"
],
"properties": {
Expand All @@ -9838,7 +9834,7 @@ const docTemplate = `{
"description": "content",
"type": "string",
"maxLength": 65535,
"minLength": 6
"minLength": 0
},
"mention_username_list": {
"type": "array",
Expand Down Expand Up @@ -10119,9 +10115,7 @@ const docTemplate = `{
"schema.QuestionUpdate": {
"type": "object",
"required": [
"content",
"id",
"tags",
"title"
],
"properties": {
Expand All @@ -10136,7 +10130,7 @@ const docTemplate = `{
"description": "content",
"type": "string",
"maxLength": 65535,
"minLength": 6
"minLength": 0
},
"edit_summary": {
"description": "edit summary",
Expand Down Expand Up @@ -11047,6 +11041,16 @@ const docTemplate = `{
"max_image_size": {
"type": "integer"
},
"min_content": {
"type": "integer",
"maximum": 65535,
"minimum": 0
},
"min_tags": {
"type": "integer",
"maximum": 5,
"minimum": 0
},
"recommend_tags": {
"type": "array",
"items": {
Expand Down Expand Up @@ -11091,6 +11095,16 @@ const docTemplate = `{
"max_image_size": {
"type": "integer"
},
"min_content": {
"type": "integer",
"maximum": 65535,
"minimum": 0
},
"min_tags": {
"type": "integer",
"maximum": 5,
"minimum": 0
},
"recommend_tags": {
"type": "array",
"items": {
Expand Down
32 changes: 23 additions & 9 deletions docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -9753,8 +9753,6 @@
"schema.QuestionAdd": {
"type": "object",
"required": [
"content",
"tags",
"title"
],
"properties": {
Expand All @@ -9769,7 +9767,7 @@
"description": "content",
"type": "string",
"maxLength": 65535,
"minLength": 6
"minLength": 0
},
"tags": {
"description": "tags",
Expand All @@ -9790,8 +9788,6 @@
"type": "object",
"required": [
"answer_content",
"content",
"tags",
"title"
],
"properties": {
Expand All @@ -9811,7 +9807,7 @@
"description": "content",
"type": "string",
"maxLength": 65535,
"minLength": 6
"minLength": 0
},
"mention_username_list": {
"type": "array",
Expand Down Expand Up @@ -10092,9 +10088,7 @@
"schema.QuestionUpdate": {
"type": "object",
"required": [
"content",
"id",
"tags",
"title"
],
"properties": {
Expand All @@ -10109,7 +10103,7 @@
"description": "content",
"type": "string",
"maxLength": 65535,
"minLength": 6
"minLength": 0
},
"edit_summary": {
"description": "edit summary",
Expand Down Expand Up @@ -11020,6 +11014,16 @@
"max_image_size": {
"type": "integer"
},
"min_content": {
"type": "integer",
"maximum": 65535,
"minimum": 0
},
"min_tags": {
"type": "integer",
"maximum": 5,
"minimum": 0
},
"recommend_tags": {
"type": "array",
"items": {
Expand Down Expand Up @@ -11064,6 +11068,16 @@
"max_image_size": {
"type": "integer"
},
"min_content": {
"type": "integer",
"maximum": 65535,
"minimum": 0
},
"min_tags": {
"type": "integer",
"maximum": 5,
"minimum": 0
},
"recommend_tags": {
"type": "array",
"items": {
Expand Down
28 changes: 19 additions & 9 deletions docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1589,7 +1589,7 @@ definitions:
content:
description: content
maxLength: 65535
minLength: 6
minLength: 0
type: string
tags:
description: tags
Expand All @@ -1602,8 +1602,6 @@ definitions:
minLength: 6
type: string
required:
- content
- tags
- title
type: object
schema.QuestionAddByAnswer:
Expand All @@ -1620,7 +1618,7 @@ definitions:
content:
description: content
maxLength: 65535
minLength: 6
minLength: 0
type: string
mention_username_list:
items:
Expand All @@ -1638,8 +1636,6 @@ definitions:
type: string
required:
- answer_content
- content
- tags
- title
type: object
schema.QuestionInfoResp:
Expand Down Expand Up @@ -1826,7 +1822,7 @@ definitions:
content:
description: content
maxLength: 65535
minLength: 6
minLength: 0
type: string
edit_summary:
description: edit summary
Expand All @@ -1849,9 +1845,7 @@ definitions:
minLength: 6
type: string
required:
- content
- id
- tags
- title
type: object
schema.QuestionUpdateInviteUser:
Expand Down Expand Up @@ -2453,6 +2447,14 @@ definitions:
type: integer
max_image_size:
type: integer
min_content:
maximum: 65535
minimum: 0
type: integer
min_tags:
maximum: 5
minimum: 0
type: integer
recommend_tags:
items:
$ref: '#/definitions/schema.SiteWriteTag'
Expand Down Expand Up @@ -2482,6 +2484,14 @@ definitions:
type: integer
max_image_size:
type: integer
min_content:
maximum: 65535
minimum: 0
type: integer
min_tags:
maximum: 5
minimum: 0
type: integer
recommend_tags:
items:
$ref: '#/definitions/schema.SiteWriteTag'
Expand Down
14 changes: 7 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ require (
github.com/swaggo/swag v1.16.3
github.com/tidwall/gjson v1.17.3
github.com/yuin/goldmark v1.7.4
go.uber.org/mock v0.5.0
golang.org/x/crypto v0.36.0
go.uber.org/mock v0.6.0
golang.org/x/crypto v0.41.0
golang.org/x/image v0.20.0
golang.org/x/net v0.38.0
golang.org/x/term v0.30.0
golang.org/x/text v0.23.0
golang.org/x/net v0.43.0
golang.org/x/term v0.34.0
golang.org/x/text v0.28.0
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
gopkg.in/yaml.v3 v3.0.1
modernc.org/sqlite v1.33.0
Expand Down Expand Up @@ -161,8 +161,8 @@ require (
go.uber.org/zap v1.27.0 // indirect
golang.org/x/arch v0.10.0 // indirect
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect
golang.org/x/sys v0.31.0 // indirect
golang.org/x/tools v0.25.0 // indirect
golang.org/x/sys v0.35.0 // indirect
golang.org/x/tools v0.36.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
Expand Down
Loading