Skip to content

Commit 4829252

Browse files
committed
refs #4912 fixed handling form data parameters, added support for query arguments as objects if lax parsing options are enabled
1 parent a458581 commit 4829252

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

qlib/Swagger.qm

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3809,8 +3809,8 @@ public class FormDataParameter inherits TypedParameter {
38093809
if (!exists type) {
38103810
type = "any";
38113811
} else if (!ParameterTypes{type}) {
3812-
throw "INVALID-FIELD-VALUE", sprintf("Parameter Object %y: invalid parameter type value passed: %y, "
3813-
"expecting one of: %y", name, type, keys ParameterTypes);
3812+
throw "INVALID-FIELD-VALUE", sprintf("Form Data Parameter Object %y: invalid parameter type value "
3813+
"passed: %y, expecting one of: %y", name, type, keys ParameterTypes);
38143814
}
38153815
}
38163816
}
@@ -3841,8 +3841,8 @@ public class OtherParameter inherits TypedParameter {
38413841
if (!exists type) {
38423842
type = "any";
38433843
} else if (!ParameterTypes{type} && (type != "object" || !(swagger.getParseFlags() & LM_ACCEPT_QUERY_OBJECTS))) {
3844-
throw "INVALID-FIELD-VALUE", sprintf("Parameter Object %y: invalid parameter type value passed: %y, "
3845-
"expecting one of: %y", name, type, keys ParameterTypes);
3844+
throw "INVALID-FIELD-VALUE", sprintf("Parameter Object (%s) %y: invalid parameter type value passed: %y, "
3845+
"expecting one of: %y", inLoc, name, type, keys ParameterTypes);
38463846
}
38473847
}
38483848
}
@@ -4254,6 +4254,7 @@ public class SchemaObject inherits ObjectBase, SchemaBase {
42544254
#! valid reference types
42554255
const ReferenceTypes = ScalarTypes + (
42564256
"object": True,
4257+
"file": True,
42574258
);
42584259
}
42594260

0 commit comments

Comments
 (0)