[ci skip] functionbuilder again
This commit is contained in:
@@ -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
|
||||
|
@@ -67,9 +67,6 @@ func init() {
|
||||
"in": "body",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"out-filename"
|
||||
],
|
||||
"properties": {
|
||||
"out-filename": {
|
||||
"description": "the filename of the output spreadsheet",
|
||||
@@ -397,9 +394,6 @@ func init() {
|
||||
},
|
||||
"postParamsBody": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"out-filename"
|
||||
],
|
||||
"properties": {
|
||||
"out-filename": {
|
||||
"description": "the filename of the output spreadsheet",
|
||||
|
@@ -117,7 +117,7 @@ functions:
|
||||
|
||||
| Name | Type | Go type | Required | Default | Description | Example |
|
||||
|------|------|---------|:--------:| ------- |-------------|---------|
|
||||
| out-filename | string| `string` | ✓ | `"output.xlsx"`| the filename of the output spreadsheet | |
|
||||
| out-filename | string| `string` | | `"output.xlsx"`| the filename of the output spreadsheet | |
|
||||
| sheets | [][PostParamsBodySheetsItems](#post-params-body-sheets-items)| `[]*PostParamsBodySheetsItems` | | | Array of worksheets to create in spreadsheet | |
|
||||
|
||||
|
||||
|
@@ -55,8 +55,8 @@ paths:
|
||||
in: body
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- out-filename
|
||||
#required:
|
||||
# - out-filename
|
||||
properties:
|
||||
out-filename:
|
||||
type: string
|
||||
|
Reference in New Issue
Block a user