[ci skip] functionbuilder again
This commit is contained in:
@@ -12,7 +12,6 @@ import (
|
|||||||
"github.com/go-openapi/errors"
|
"github.com/go-openapi/errors"
|
||||||
"github.com/go-openapi/strfmt"
|
"github.com/go-openapi/strfmt"
|
||||||
"github.com/go-openapi/swag"
|
"github.com/go-openapi/swag"
|
||||||
"github.com/go-openapi/validate"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// PostParamsBody post params body
|
// PostParamsBody post params body
|
||||||
@@ -21,8 +20,7 @@ import (
|
|||||||
type PostParamsBody struct {
|
type PostParamsBody struct {
|
||||||
|
|
||||||
// the filename of the output spreadsheet
|
// the filename of the output spreadsheet
|
||||||
// Required: true
|
OutFilename *string `json:"out-filename,omitempty"`
|
||||||
OutFilename *string `json:"out-filename"`
|
|
||||||
|
|
||||||
// Array of worksheets to create in spreadsheet
|
// Array of worksheets to create in spreadsheet
|
||||||
Sheets []*PostParamsBodySheetsItems `json:"sheets"`
|
Sheets []*PostParamsBodySheetsItems `json:"sheets"`
|
||||||
@@ -32,10 +30,6 @@ type PostParamsBody struct {
|
|||||||
func (m *PostParamsBody) Validate(formats strfmt.Registry) error {
|
func (m *PostParamsBody) Validate(formats strfmt.Registry) error {
|
||||||
var res []error
|
var res []error
|
||||||
|
|
||||||
if err := m.validateOutFilename(formats); err != nil {
|
|
||||||
res = append(res, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := m.validateSheets(formats); err != nil {
|
if err := m.validateSheets(formats); err != nil {
|
||||||
res = append(res, err)
|
res = append(res, err)
|
||||||
}
|
}
|
||||||
@@ -46,15 +40,6 @@ func (m *PostParamsBody) Validate(formats strfmt.Registry) error {
|
|||||||
return nil
|
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 {
|
func (m *PostParamsBody) validateSheets(formats strfmt.Registry) error {
|
||||||
if swag.IsZero(m.Sheets) { // not required
|
if swag.IsZero(m.Sheets) { // not required
|
||||||
return nil
|
return nil
|
||||||
|
@@ -67,9 +67,6 @@ func init() {
|
|||||||
"in": "body",
|
"in": "body",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": [
|
|
||||||
"out-filename"
|
|
||||||
],
|
|
||||||
"properties": {
|
"properties": {
|
||||||
"out-filename": {
|
"out-filename": {
|
||||||
"description": "the filename of the output spreadsheet",
|
"description": "the filename of the output spreadsheet",
|
||||||
@@ -397,9 +394,6 @@ func init() {
|
|||||||
},
|
},
|
||||||
"postParamsBody": {
|
"postParamsBody": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": [
|
|
||||||
"out-filename"
|
|
||||||
],
|
|
||||||
"properties": {
|
"properties": {
|
||||||
"out-filename": {
|
"out-filename": {
|
||||||
"description": "the filename of the output spreadsheet",
|
"description": "the filename of the output spreadsheet",
|
||||||
|
@@ -117,7 +117,7 @@ functions:
|
|||||||
|
|
||||||
| Name | Type | Go type | Required | Default | Description | Example |
|
| 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 | |
|
| sheets | [][PostParamsBodySheetsItems](#post-params-body-sheets-items)| `[]*PostParamsBodySheetsItems` | | | Array of worksheets to create in spreadsheet | |
|
||||||
|
|
||||||
|
|
||||||
|
@@ -55,8 +55,8 @@ paths:
|
|||||||
in: body
|
in: body
|
||||||
schema:
|
schema:
|
||||||
type: object
|
type: object
|
||||||
required:
|
#required:
|
||||||
- out-filename
|
# - out-filename
|
||||||
properties:
|
properties:
|
||||||
out-filename:
|
out-filename:
|
||||||
type: string
|
type: string
|
||||||
|
Reference in New Issue
Block a user