From 59aa7e5e8c509bae036353c299293b6a4c81ba6d Mon Sep 17 00:00:00 2001 From: Wei Huang Date: Mon, 15 Jan 2018 23:34:18 -0500 Subject: [PATCH] Adding custom header --- operation.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/operation.go b/operation.go index 5c2940c36..275ed7bae 100644 --- a/operation.go +++ b/operation.go @@ -106,7 +106,7 @@ func (operation *Operation) ParseParamComment(commentLine string) error { //five possible parameter types. switch paramType { - case "query", "path": + case "query", "path", "header": param = createParameter(paramType, description, name, schemaType, required) case "body": param = createParameter(paramType, description, name, "object", required) // TODO: if Parameter types can be objects, but also primitives and arrays @@ -132,9 +132,9 @@ func (operation *Operation) ParseParamComment(commentLine string) error { // panic("not supported Header paramType yet.") //case "Form": // panic("not supported Form paramType yet.") - // enable multipart/form-data upload file - case "formData" : - param = createParameter(paramType, description, name, "file", required) + // enable multipart/form-data upload file + case "formData": + param = createParameter(paramType, description, name, "file", required) } operation.Operation.Parameters = append(operation.Operation.Parameters, param) }