From 17a0f6005255243dbfa92bb4e5781763332035e6 Mon Sep 17 00:00:00 2001 From: Zodial Date: Wed, 15 Nov 2023 14:21:19 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=83=A8=E4=BB=BD?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E7=94=9F=E6=88=90js=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E4=B8=8D=E6=AD=A3=E7=A1=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- console/commands/js_request.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/console/commands/js_request.go b/console/commands/js_request.go index 965055c..a85a594 100644 --- a/console/commands/js_request.go +++ b/console/commands/js_request.go @@ -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