Skip to content

Commit

Permalink
fix: 修复部份参数生成js类型不正确
Browse files Browse the repository at this point in the history
  • Loading branch information
zodial committed Nov 15, 2023
1 parent 6fb2f68 commit 17a0f60
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions console/commands/js_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,9 @@ func genJsRequest(p openapi.Parameters, swagger openapi.Spec) string {
case "array":
t = "[]"
if parameter.Format != "" {
if ty, ok := protoToSwagger[parameter.Format]; ok {
parameter.Format = ty
}
t = parameter.Format + t
} else if parameter.Items != nil {
t = getObjectStrFromRef(parameter.Items.Ref, swagger) + t
Expand Down

0 comments on commit 17a0f60

Please sign in to comment.