[ci skip] functionbuilder again

This commit is contained in:
2023-11-21 14:37:06 +11:00
parent b50c6993ad
commit cf43f67f68
4 changed files with 4 additions and 25 deletions

View File

@@ -12,7 +12,6 @@ import (
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// PostParamsBody post params body
@@ -21,8 +20,7 @@ import (
type PostParamsBody struct {
// the filename of the output spreadsheet
// Required: true
OutFilename *string `json:"out-filename"`
OutFilename *string `json:"out-filename,omitempty"`
// Array of worksheets to create in spreadsheet
Sheets []*PostParamsBodySheetsItems `json:"sheets"`
@@ -32,10 +30,6 @@ type PostParamsBody struct {
func (m *PostParamsBody) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateOutFilename(formats); err != nil {
res = append(res, err)
}
if err := m.validateSheets(formats); err != nil {
res = append(res, err)
}
@@ -46,15 +40,6 @@ func (m *PostParamsBody) Validate(formats strfmt.Registry) error {
return nil
}
func (m *PostParamsBody) validateOutFilename(formats strfmt.Registry) error {
if err := validate.Required("out-filename", "body", m.OutFilename); err != nil {
return err
}
return nil
}
func (m *PostParamsBody) validateSheets(formats strfmt.Registry) error {
if swag.IsZero(m.Sheets) { // not required
return nil