forked from loafle/openapi-generator-original
[Apex] better handling of different content-type in the response (#7515)
* PR7500 * update samples Co-authored-by: William Cheng <wing328hk@gmail.com>
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user