diff --git a/modules/openapi-generator/src/main/resources/apex/OAS.cls b/modules/openapi-generator/src/main/resources/apex/OAS.cls index d7f4c6053ce8..f3a630a385e9 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 propertyMappings = ((MappedProperties) o).getPropertyMappings(); 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 d7f4c6053ce8..f3a630a385e9 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 propertyMappings = ((MappedProperties) o).getPropertyMappings();