From 85c7c6e0dbf2c5b110b2adee6070a2ad278ba112 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=90=AF=E8=88=AA?= <101104760+ZhangSetSail@users.noreply.github.com> Date: Tue, 19 Nov 2024 16:46:35 +0800 Subject: [PATCH] fix: create dep volume failure (#2039) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 张启航 <101104760+ZhangSetSail@users.noreply.github.com> --- api/model/volume.go | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/api/model/volume.go b/api/model/volume.go index 47d1e0ad81..9f316a429f 100644 --- a/api/model/volume.go +++ b/api/model/volume.go @@ -18,7 +18,8 @@ package model -//AddVolumeStruct AddVolumeStruct +// AddVolumeStruct AddVolumeStruct +// //swagger:parameters addVolumes type AddVolumeStruct struct { // in: path @@ -65,7 +66,8 @@ type AddVolumeStruct struct { } } -//DeleteVolumeStruct DeleteVolumeStruct +// DeleteVolumeStruct DeleteVolumeStruct +// //swagger:parameters deleteVolumes type DeleteVolumeStruct struct { // in: path @@ -80,7 +82,8 @@ type DeleteVolumeStruct struct { VolumeName string `json:"volume_name"` } -//AddVolumeDependencyStruct AddVolumeDependencyStruct +// AddVolumeDependencyStruct AddVolumeDependencyStruct +// //swagger:parameters addDepVolume type AddVolumeDependencyStruct struct { // in: path @@ -104,11 +107,12 @@ type AddVolumeDependencyStruct struct { // required: true VolumeName string `json:"volume_name" validate:"volume_name|required|max:50"` - VolumeType string `json:"volume_type" validate:"volume_type|required|in:share-file,config-file"` + VolumeType string `json:"volume_type" validate:"volume_type|required"` } } -//DeleteVolumeDependencyStruct DeleteVolumeDependencyStruct +// DeleteVolumeDependencyStruct DeleteVolumeDependencyStruct +// //swagger:parameters delDepVolume type DeleteVolumeDependencyStruct struct { // in: path @@ -132,7 +136,8 @@ type DeleteVolumeDependencyStruct struct { //以下为v2旧版API参数定义 -//V2AddVolumeStruct AddVolumeStruct +// V2AddVolumeStruct AddVolumeStruct +// //swagger:parameters addVolume type V2AddVolumeStruct struct { // in: path @@ -172,7 +177,8 @@ type V2AddVolumeStruct struct { } } -//V2DelVolumeStruct AddVolumeStruct +// V2DelVolumeStruct AddVolumeStruct +// //swagger:parameters deleteVolume type V2DelVolumeStruct struct { // in: path @@ -194,7 +200,8 @@ type V2DelVolumeStruct struct { } } -//V2AddVolumeDependencyStruct AddVolumeDependencyStruct +// V2AddVolumeDependencyStruct AddVolumeDependencyStruct +// //swagger:parameters addVolumeDependency type V2AddVolumeDependencyStruct struct { // in: path @@ -220,7 +227,8 @@ type V2AddVolumeDependencyStruct struct { } } -//V2DelVolumeDependencyStruct V2DelVolumeDependencyStruct +// V2DelVolumeDependencyStruct V2DelVolumeDependencyStruct +// //swagger:parameters deleteVolumeDependency type V2DelVolumeDependencyStruct struct { // in: path