Skip to content

Commit

Permalink
swagger: make json params uppercase and add default values
Browse files Browse the repository at this point in the history
  • Loading branch information
neolynx committed Oct 22, 2024
1 parent f8e0a8d commit 8248bc2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions api/repos.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@ func apiReposList(c *gin.Context) {

type repoCreateParams struct {
// local repository name
Name string `binding:"required"`
Name string `binding:"required" json:"Name" example:"repo1"`
// text describing local repository, for the user
Comment string
Comment string ` json:"Comment" example:"this is a repo"`
// default distribution when publishing from this local repo
DefaultDistribution string
DefaultDistribution string ` json:"DefaultDistribution" example:"stable"`
// default component when publishing from this local repo
DefaultComponent string
DefaultComponent string ` json:"DefaultComponent" example:"main"`
// snapshot name to create repo from
FromSnapshot string
FromSnapshot string ` json:"FromSnapshot" example:"snapshot1"`
}

// @Summary Create repository
Expand Down

0 comments on commit 8248bc2

Please sign in to comment.