mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-01-11 03:11:50 +00:00
fix optional params
This commit is contained in:
@@ -117,13 +117,13 @@ func apiSnapshotsCreateFromMirror(c *gin.Context) {
|
||||
|
||||
type snapshotsCreateParams struct {
|
||||
// Name of snapshot to create
|
||||
Name string `binding:"required" json:"Name" example:"snap2"`
|
||||
Name string `binding:"required" json:"Name" example:"snap2"`
|
||||
// Description of snapshot
|
||||
Description string ` json:"Description"`
|
||||
Description string ` json:"Description"`
|
||||
// List of source snapshots
|
||||
SourceSnapshots []string `binding:"required" json:"SourceSnapshots" example:"snap1"`
|
||||
SourceSnapshots []string ` json:"SourceSnapshots" example:"snap1"`
|
||||
// List of package refs
|
||||
PackageRefs []string `binding:"required" json:"PackageRefs" example:""`
|
||||
PackageRefs []string ` json:"PackageRefs" example:""`
|
||||
}
|
||||
|
||||
// @Summary Snapshot Packages
|
||||
@@ -279,9 +279,9 @@ func apiSnapshotsCreateFromRepository(c *gin.Context) {
|
||||
|
||||
type snapshotsUpdateParams struct {
|
||||
// Change Name of snapshot
|
||||
Name string `binding:"required" json:"Name" example:"snap2"`
|
||||
Name string ` json:"Name" example:"snap2"`
|
||||
// Change Description of snapshot
|
||||
Description string ` json:"Description"`
|
||||
Description string `json:"Description"`
|
||||
}
|
||||
|
||||
// @Summary Update Snapshot
|
||||
|
||||
@@ -84,7 +84,7 @@ class APITest(BaseTest):
|
||||
self._ensure_async(kwargs)
|
||||
resp = self.post(uri, *args, **kwargs)
|
||||
if resp.status_code != 202:
|
||||
return resp
|
||||
raise Exception("async api error: " + resp.text)
|
||||
|
||||
_id = resp.json()['ID']
|
||||
resp = self.get("/api/tasks/" + str(_id) + "/wait")
|
||||
|
||||
Reference in New Issue
Block a user