From 3ce6eb2a1494d9a5267eb23d2b5a1aaa429ef6da Mon Sep 17 00:00:00 2001 From: Gary Wang Date: Wed, 12 Aug 2020 14:34:22 +0800 Subject: [PATCH] feat: generate formData params via go struct (#770) --- operation.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/operation.go b/operation.go index e66cf480e..4b1dd0126 100644 --- a/operation.go +++ b/operation.go @@ -167,12 +167,12 @@ func (operation *Operation) ParseParamComment(commentLine string, astFile *ast.F param := createParameter(paramType, description, name, refType, required) switch paramType { - case "path", "header", "formData": + case "path", "header": switch objectType { case ARRAY, OBJECT: return fmt.Errorf("%s is not supported type for %s", refType, paramType) } - case "query": + case "query", "formData": switch objectType { case ARRAY: if !IsPrimitiveType(refType) {