forked from TrueCloudLab/frostfs-rest-gw
[#25] Synchronize container get and put params
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
parent
bacf909594
commit
665bcfb52d
9 changed files with 270 additions and 164 deletions
|
@ -33,6 +33,10 @@ type ContainerInfo struct {
|
|||
// Required: true
|
||||
ContainerID *string `json:"containerId"`
|
||||
|
||||
// container name
|
||||
// Required: true
|
||||
ContainerName *string `json:"containerName"`
|
||||
|
||||
// owner Id
|
||||
// Required: true
|
||||
OwnerID *string `json:"ownerId"`
|
||||
|
@ -62,6 +66,10 @@ func (m *ContainerInfo) Validate(formats strfmt.Registry) error {
|
|||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateContainerName(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateOwnerID(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
@ -125,6 +133,15 @@ func (m *ContainerInfo) validateContainerID(formats strfmt.Registry) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (m *ContainerInfo) validateContainerName(formats strfmt.Registry) error {
|
||||
|
||||
if err := validate.Required("containerName", "body", m.ContainerName); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ContainerInfo) validateOwnerID(formats strfmt.Registry) error {
|
||||
|
||||
if err := validate.Required("ownerId", "body", m.OwnerID); err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue