Source:
public EncodingProperty getEncodingProperty(ObjectNode node, String location, ParseResult result) { if (node == null) { return null; } EncodingProperty encodingProperty = new EncodingProperty(); String value = getString("contentType", node, true, location, result); encodingProperty.setContentType(value); value = getString("style", node, true, location, result); if (StringUtils.isBlank(value)) { encodingProperty.setStyle(EncodingProperty.StyleEnum.FORM); } else { if (value.equals(Parameter.StyleEnum.FORM.toString())) { encodingProperty.setStyle(EncodingProperty.StyleEnum.FORM); } else if (value.equals(EncodingProperty.StyleEnum.DEEPOBJECT.toString())) { encodingProperty.setStyle(EncodingProperty.StyleEnum.DEEPOBJECT); } else if (value.equals(EncodingProperty.StyleEnum.PIPEDELIMITED.toString())) { encodingProperty.setStyle(EncodingProperty.StyleEnum.PIPEDELIMITED); } else if (value.equals(EncodingProperty.StyleEnum.SPACEDELIMITED.toString())) { encodingProperty.setStyle(EncodingProperty.StyleEnum.SPACEDELIMITED); } else { result.invalidType(location, "style", "string", node); } } Boolean explode = getBoolean("explode", node, false, location, result); encodingProperty.setExplode(explode); Boolean allowReserved = getBoolean("allowReserved", node, false, location, result); encodingProperty.setAllowReserved(allowReserved); ObjectNode headersObject = getObject("headers", node, false, location, result); if (headersObject!= null){ encodingProperty.setHeaders(getHeaders(headersObject, location, result)); } encodingProperty.setExtensions(new LinkedHashMap<>()); Set<String> keys = getKeys(node); for (String key : keys) { if (key.startsWith("x-")) { encodingProperty.getExtensions().put(key, Json.mapper().convertValue(node.get(key), Object.class)); } } return encodingProperty; }

Target:
public EncodingProperty getEncodingProperty(ObjectNode node, String location, ParseResult result) { if (node == null) { return null; } EncodingProperty encodingProperty = new EncodingProperty(); String value = getString("contentType", node, true, location, result); encodingProperty.setContentType(value); value = getString("style", node, true, location, result); if (StringUtils.isBlank(value)) { encodingProperty.setStyle(EncodingProperty.StyleEnum.FORM); } else { if (value.equals(Parameter.StyleEnum.FORM.toString())) { encodingProperty.setStyle(EncodingProperty.StyleEnum.FORM); } else if (value.equals(EncodingProperty.StyleEnum.DEEPOBJECT.toString())) { encodingProperty.setStyle(EncodingProperty.StyleEnum.DEEPOBJECT); } else if (value.equals(EncodingProperty.StyleEnum.PIPEDELIMITED.toString())) { encodingProperty.setStyle(EncodingProperty.StyleEnum.PIPEDELIMITED); } else if (value.equals(EncodingProperty.StyleEnum.SPACEDELIMITED.toString())) { encodingProperty.setStyle(EncodingProperty.StyleEnum.SPACEDELIMITED); } else { result.invalidType(location, "style", "string", node); } } Boolean explode = getBoolean("explode", node, false, location, result); if (explode != null) { encodingProperty.setExplode(explode); } Boolean allowReserved = getBoolean("allowReserved", node, false, location, result); if (allowReserved != null) { encodingProperty.setAllowReserved(allowReserved); } ObjectNode headersObject = getObject("headers", node, false, location, result); if (headersObject!= null){ encodingProperty.setHeaders(getHeaders(headersObject, location, result)); } Map <String,Object> extensions = getExtensions(node,location,result); if(extensions != null && extensions.size() > 0) { encodingProperty.setExtensions(extensions); } return encodingProperty; }