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 01f16d3
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions api/repos.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,16 @@ func apiReposList(c *gin.Context) {
}

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

// @Summary Create repository
Expand Down

0 comments on commit 01f16d3

Please sign in to comment.