feat(entities.go,parser.go): 添加了对form-data的支持

1.在swaggerOperationObject中添加Consumes参数
2.对请求的tag类型进行判断,添加对应的请求体类型。
This commit is contained in:
Lansong
2023-11-22 08:13:56 +08:00
parent 11e374395b
commit 15afacbabe
2 changed files with 20 additions and 3 deletions

View File

@ -137,9 +137,9 @@ type swaggerOperationObject struct {
RequestBody *struct {
Content swaggerContentObject `json:"content,omitempty"`
} `json:"requestBody,omitempty"`
Tags []string `json:"tags,omitempty"`
Deprecated bool `json:"deprecated,omitempty"`
Tags []string `json:"tags,omitempty"`
Deprecated bool `json:"deprecated,omitempty"`
Consumes string `json:"consumes,omitempty"`
Security *[]swaggerSecurityRequirementObject `json:"security,omitempty"`
ExternalDocs *swaggerExternalDocumentationObject `json:"externalDocs,omitempty"`
}