You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaSttp4JsoniterClientCodegen.java
+6-2Lines changed: 6 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -430,10 +430,14 @@ public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List<Mo
Map(paramName -> value.toString) // for primitve values explode does not change anything
73
+
Seq(paramName -> value.toString) // for primitve values explode does not change anything
75
74
case FormStyleFormat.SPACEDELIMITED =>
76
75
error(
77
76
"FormStyleFormat.SpaceDelimited does not support primitive values"
@@ -87,37 +86,37 @@ object FormSerializable:
87
86
values:Seq[Primitive],
88
87
inlineformat:FormStyleFormat,
89
88
inlineexplode:Boolean
90
-
):Map[String,String] = {
89
+
):Seq[(String,String)] = {
91
90
inline format match
92
91
case FormStyleFormat.FORM =>
93
-
inline if explode then values.map(s => (paramName, s.toString)).toMap
94
-
elseMap(paramName -> values.mkString(","))
92
+
inline if explode then values.map(s => (paramName, s.toString))
93
+
elseSeq(paramName -> values.mkString(","))
95
94
case FormStyleFormat.SPACEDELIMITED =>
96
-
inline if explode then values.map(s => (paramName, s.toString)).toMap
97
-
elseMap(paramName -> values.mkString("")) // Sttp will encode space as +, from https://swagger.io/docs/specification/v3_0/serialization/#query-parameters it is not clear if it should be + or%20
95
+
inline if explode then values.map(s => (paramName, s.toString))
96
+
elseSeq(paramName -> values.mkString("")) // Sttp will encode space as +, from https://swagger.io/docs/specification/v3_0/serialization/#query-parameters it is not clear if it should be + or%20
98
97
case FormStyleFormat.PIPEDELIMITED =>
99
-
inline if explode then values.map(s => (paramName, s.toString)).toMap
100
-
elseMap(paramName -> values.mkString("|"))
98
+
inline if explode then values.map(s => (paramName, s.toString))
99
+
elseSeq(paramName -> values.mkString("|"))
101
100
case FormStyleFormat.DEEPOBJECT =>
102
101
error("FormStyleFormat.DeepObject does not support arrays")
103
102
}
104
-
inlinedefserializeModel(
103
+
privateinlinedefserializeModel(
105
104
paramName:String,
106
105
keyValPairs:Seq[(String,Primitive)],
107
106
inlineformat:FormStyleFormat,
108
107
inlineexplode:Boolean
109
-
):Map[String,String] = {
108
+
):Seq[(String,String)] = {
110
109
inline format match
111
110
case FormStyleFormat.FORM =>
112
-
inline if explode then keyValPairs.map((key, value) => (key, value.toString)).toMap
0 commit comments