From afb5d1d933ce3614a8124c2299fb64dfa88a45a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8C=B6=E6=B8=85=E6=AC=A2?= Date: Fri, 19 Jul 2024 15:56:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0swagger=20parameter=20style?= =?UTF-8?q?=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- swagger.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/swagger.go b/swagger.go index 95b15a2..3268746 100644 --- a/swagger.go +++ b/swagger.go @@ -50,6 +50,11 @@ const ( ) const ( - SwaggerParameterStyleForm = "form" // query 对应 form; cookie 对应 form - SwaggerParameterStyleSimple = "simple" // path 对应 simple; header 对应 simple; + SwaggerParameterStyleForm = "form" // in = query / cookie , type = primitive, array, object + SwaggerParameterStyleSimple = "simple" // in = path / header , type = array , Simple 样式的参数,参见 RFC6570. 此选项替换定义于OpenAPI 2.0 中 collectionFormat等于csv的情况。 + SwaggerParameterStyleMatrix = "matrix" // in = path , type = primitive, array, object + SwaggerParameterStyleLabel = "label" // in = path , type = primitive, array, object + SwaggerParameterStyleSpaceDelimited = "spaceDelimited" // in = query , type = array, 空格分隔的数组值。此选项替换定义于OpenAPI 2.0 中 collectionFormat equal to ssv的情况。 + SwaggerParameterStylePipeDelimited = "pipeDelimited" // in = query , type = array, 管道符` + SwaggerParameterStyleDeepObject = "deepObject" // in = query , type = object, 提供一种简单的方法来表示参数中的嵌套对象值.` )