代码拉取完成,页面将自动刷新
package openapi
import (
"github.com/getkin/kin-openapi/openapi3"
)
type OperationSelection struct {
Response *ResponseSelection `goblet:"response" json:"response,omitempty"`
Security *SecuritySelection `goblet:"security" json:"security,omitempty"`
Opened bool `goblet:"opened" json:"opened,omitempty"`
Parameters ParameterSelectionArray `goblet:"parameters" json:"parameters,omitempty"`
RequestBody *RequestBodySelection `goblet:"requestBody" json:"requestBody,omitempty"`
InputMode string `goblet:"input_mode" json:"input_mode"`
}
type RequestBodySelection struct {
Default string `goblet:"default" json:"default,omitempty"`
Inputs map[string]*ParameterSelection `goblet:"inputs" json:"inputs,omitempty"`
Order []string `goblet:"order" json:"order,omitempty"` //参数的渲染顺序,可调
}
type ResponseSelection struct {
Default string `goblet:"default" json:"default"`
}
type SecuritySelection struct {
Variables map[string]string `goblet:"variables" json:"variables"`
Default int `goblet:"default" json:"default"`
}
type ParameterSelectionArray []*ParameterSelection
type ParameterSelection struct {
Fixed bool `goblet:"fixed" json:"fixed"`
Value string `goblet:"value" json:"value"`
Calculated bool `goblet:"calculated" json:"calculated"`
}
func (p *ParameterSelectionArray) ToMap(defs openapi3.Parameters) map[string]*ParameterSelection {
var m = make(map[string]*ParameterSelection)
for k, v := range *p {
var def = defs[k]
m[def.Value.Name] = v
}
return m
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。