From 1059488278c7453083dcbb768b92b71c06121cbc Mon Sep 17 00:00:00 2001
From: Henry Hai <henry.hai@salesforce.com>
Date: Sat, 26 Sep 2020 15:55:03 -0400
Subject: [PATCH 1/2] PR7500

---
 modules/openapi-generator/src/main/resources/apex/OAS.cls | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/openapi-generator/src/main/resources/apex/OAS.cls b/modules/openapi-generator/src/main/resources/apex/OAS.cls
index d7f4c6053ce..f3a630a385e 100644
--- a/modules/openapi-generator/src/main/resources/apex/OAS.cls
+++ b/modules/openapi-generator/src/main/resources/apex/OAS.cls
@@ -183,7 +183,7 @@ public class OAS {
 
         @TestVisible
         protected virtual Object toReturnValue(String body, Type returnType, String contentType) {
-            if (contentType == 'application/json') {
+            if (contentType.contains('application/json')) {
                 Object o = returnType.newInstance();
                 if (o instanceof MappedProperties) {
                     Map<String, String> propertyMappings = ((MappedProperties) o).getPropertyMappings();
-- 
GitLab


From 085b230f385004dce9444678b6f9792891118247 Mon Sep 17 00:00:00 2001
From: William Cheng <wing328hk@gmail.com>
Date: Sun, 27 Sep 2020 17:15:58 +0800
Subject: [PATCH 2/2] update samples

---
 .../client/petstore/apex/force-app/main/default/classes/OAS.cls | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/samples/client/petstore/apex/force-app/main/default/classes/OAS.cls b/samples/client/petstore/apex/force-app/main/default/classes/OAS.cls
index d7f4c6053ce..f3a630a385e 100644
--- a/samples/client/petstore/apex/force-app/main/default/classes/OAS.cls
+++ b/samples/client/petstore/apex/force-app/main/default/classes/OAS.cls
@@ -183,7 +183,7 @@ public class OAS {
 
         @TestVisible
         protected virtual Object toReturnValue(String body, Type returnType, String contentType) {
-            if (contentType == 'application/json') {
+            if (contentType.contains('application/json')) {
                 Object o = returnType.newInstance();
                 if (o instanceof MappedProperties) {
                     Map<String, String> propertyMappings = ((MappedProperties) o).getPropertyMappings();
-- 
GitLab