chore: upgrade go-swagger to v0.35.0 and enforce zero swagger warnings (#38299)
Updates `go-swagger` to v0.35.0 and makes swagger generation and validation warning-free, with the build now failing on any warning (`go-swagger` itself exits `0` on warnings). - Generation passes `--enable-allof-compounding` (keeps `$ref` fields bare, no spec change) and `--skip-enum-desc` (drops the enum description that duplicates `x-go-enum-desc` and was the only source of `allOf` noise in the OpenAPI 3.0 output). - Fixed warnings at the source: dropped `swagger:strfmt` where it conflicts with `required: true` (`required` kept, `time.Time` still maps to `date-time`), fixed a malformed `units_map` example, moved the `parameterBodies` injection hack to `swagger:parameters`, and removed unused responses. Fixes: https://github.com/go-gitea/gitea/issues/12508 --------- Co-authored-by: bircni <bircni@icloud.com>
This commit is contained in:
@@ -19,7 +19,6 @@ type CreateUserOption struct {
|
||||
// The full display name of the user
|
||||
FullName string `json:"full_name" binding:"MaxSize(100)"`
|
||||
// required: true
|
||||
// swagger:strfmt email
|
||||
Email string `json:"email" binding:"Required;Email;MaxSize(254)"`
|
||||
// The plain text password for the user
|
||||
Password string `json:"password" binding:"MaxSize(255)"`
|
||||
|
||||
@@ -133,7 +133,6 @@ type IssueAssigneesOption struct {
|
||||
// EditDeadlineOption options for creating a deadline
|
||||
type EditDeadlineOption struct {
|
||||
// required:true
|
||||
// swagger:strfmt date-time
|
||||
Deadline *time.Time `json:"due_date"`
|
||||
}
|
||||
|
||||
|
||||
@@ -54,10 +54,10 @@ type CreateTeamOption struct {
|
||||
// Whether the team has access to all repositories in the organization
|
||||
IncludesAllRepositories bool `json:"includes_all_repositories"`
|
||||
Permission RepoWritePermission `json:"permission"`
|
||||
// example: ["repo.actions","repo.code","repo.issues","repo.ext_issues","repo.wiki","repo.ext_wiki","repo.pulls","repo.releases","repo.projects","repo.ext_wiki"]
|
||||
// example: ["repo.actions","repo.packages","repo.code","repo.issues","repo.ext_issues","repo.wiki","repo.pulls","repo.releases","repo.projects","repo.ext_wiki"]
|
||||
// Deprecated: This variable should be replaced by UnitsMap and will be dropped in later versions.
|
||||
Units []string `json:"units"`
|
||||
// example: {"repo.actions","repo.packages","repo.code":"read","repo.issues":"write","repo.ext_issues":"none","repo.wiki":"admin","repo.pulls":"owner","repo.releases":"none","repo.projects":"none","repo.ext_wiki":"none"}
|
||||
// example: {"repo.actions":"read","repo.packages":"read","repo.code":"read","repo.issues":"write","repo.ext_issues":"none","repo.wiki":"admin","repo.pulls":"owner","repo.releases":"none","repo.projects":"none","repo.ext_wiki":"none"}
|
||||
UnitsMap map[string]string `json:"units_map"`
|
||||
// Whether the team can create repositories in the organization
|
||||
CanCreateOrgRepo bool `json:"can_create_org_repo"`
|
||||
|
||||
Reference in New Issue
Block a user