mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-18 22:36:43 +09:00
refactor: move go-chi/binding into Gitea (#39528)
The `gitea.com/go-chi/binding` package only exists for Gitea, so it moves into `modules/web/binding` to fix its bugs directly. Split out of https://github.com/go-gitea/gitea/pull/39504. - GET and HEAD always bind the query - JSON `null` slice elements and nested `TrimSpace` fields bind correctly - Integer fields reject out-of-range values instead of wrapping - An empty JSON body binds nothing and an unknown binding rule is an error Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: bircni <bircni@icloud.com>
This commit is contained in:
17 files changed
+748
-72
No files matched your search
@@ -173,7 +173,7 @@ type CreateRepoOption struct {
|
||||
type EditRepoOption struct {
|
||||
// name of the repository
|
||||
// unique: true
|
||||
Name *string `json:"name,omitempty" binding:"OmitEmpty;AlphaDashDot;MaxSize(100);"`
|
||||
Name *string `json:"name,omitempty" binding:"AlphaDashDot;MaxSize(100)"`
|
||||
// a short description of the repository.
|
||||
Description *string `json:"description,omitempty" binding:"MaxSize(2048)"`
|
||||
// a URL with more information about the repository.
|
||||
|
||||
Reference in new issue
Block a user