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