mirror of
https://github.com/floci-io/floci.git
synced 2026-11-27 07:39:24 -05:00
fix(apigateway): select request models by content type and default (#5530)
Signed-off-by: Andre Kurait <akurait@amazon.com>
This commit is contained in:
1 parent
06f0e06fc1
commit
e77710d32d
3 files changed
+183
-1
No files matched your search
+3
-1
@@ -1157,7 +1157,9 @@ public class ApiGatewayExecuteController {
|
||||
? headers.getMediaType().getType() + "/" + headers.getMediaType().getSubtype()
|
||||
: "application/json";
|
||||
String modelName = requestModels.get(contentType);
|
||||
if (modelName == null) modelName = requestModels.get("application/json");
|
||||
if (modelName == null) {
|
||||
modelName = requestModels.get("$default");
|
||||
}
|
||||
|
||||
if (modelName != null) {
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user