mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-01-11 03:11:50 +00:00
swagger: cleanup
This commit is contained in:
@@ -30,7 +30,12 @@ type aptlyVersion struct {
|
||||
|
||||
// @Summary Aptly version
|
||||
// @Description **Get aptly version**
|
||||
// @Description Returns the aptly version
|
||||
// @Description
|
||||
// @Description **Example:**
|
||||
// @Description ```
|
||||
// @Description $ curl http://localhost:8080/api/version
|
||||
// @Description {"Version":"0.9~dev"}
|
||||
// @Description ```
|
||||
// @Tags Status
|
||||
// @Produce json
|
||||
// @Success 200 {object} aptlyVersion
|
||||
|
||||
@@ -179,6 +179,12 @@ type publishedRepoCreateParams struct {
|
||||
// @Description
|
||||
// @Description The prefix may contain a storage specifier, e.g. `s3:packages/`, or it may also be empty to publish to the root directory.
|
||||
// @Description
|
||||
// @Description **Example:**
|
||||
// @Description ```
|
||||
// @Description $ curl -X POST -H 'Content-Type: application/json' --data '{"Distribution": "wheezy", "Sources": [{"Name": "aptly-repo"}]}' http://localhost:8080/api/publish//repos
|
||||
// @Description {"Architectures":["i386"],"Distribution":"wheezy","Label":"","Origin":"","Prefix":".","SourceKind":"local","Sources":[{"Component":"main","Name":"aptly-repo"}],"Storage":""}
|
||||
// @Description ```
|
||||
// @Description
|
||||
// @Description See also: `aptly publish create`
|
||||
// @Tags Publish
|
||||
// @Param prefix path string true "publishing prefix"
|
||||
|
||||
15
api/repos.go
15
api/repos.go
@@ -98,8 +98,14 @@ type repoCreateParams struct {
|
||||
}
|
||||
|
||||
// @Summary Create repository
|
||||
// @Description Create a local repository with specified parameters.
|
||||
// @Description **Create a local repository**
|
||||
// @Description
|
||||
// @Description Distribution and component are used as defaults when publishing repo either directly or via snapshot.
|
||||
// @Description
|
||||
// @Description ```
|
||||
// @Description $ curl -X POST -H 'Content-Type: application/json' --data '{"Name": "aptly-repo"}' http://localhost:8080/api/repos
|
||||
// @Description {"Name":"aptly-repo","Comment":"","DefaultDistribution":"","DefaultComponent":""}
|
||||
// @Description ```
|
||||
// @Tags Repos
|
||||
// @Produce json
|
||||
// @Consume json
|
||||
@@ -287,7 +293,14 @@ func apiReposDrop(c *gin.Context) {
|
||||
|
||||
// @Summary List Repo Packages
|
||||
// @Description **Return a list of packages present in the repo**
|
||||
// @Description
|
||||
// @Description If `q` query parameter is missing, return all packages, otherwise return packages that match q
|
||||
// @Description
|
||||
// @Description **Example:**
|
||||
// @Description ```
|
||||
// @Description $ curl http://localhost:8080/api/repos/aptly-repo/packages
|
||||
// @Description ["Pi386 aptly 0.8 966561016b44ed80"]
|
||||
// @Description ```
|
||||
// @Tags Repos
|
||||
// @Produce json
|
||||
// @Param name path string true "Snapshot to search"
|
||||
|
||||
Reference in New Issue
Block a user