apigee / wsdl2apigee

Generates Apigee Proxy bundles from WSDL
Apache License 2.0
22 stars 26 forks source link

OAS required type should be in Boolean format #13

Closed johncanthony closed 6 years ago

johncanthony commented 6 years ago

https://github.com/apigee/wsdl2apigee/blob/master/src/main/java/com/apigee/oas/OASUtils.java#L93

In getBodyParameter(String name) the required field is set using a quoted true which will cause openapi interpreters to fail this field as it is expected to be in an unquoted boolean representation.

https://swagger.io/docs/specification/2-0/basic-structure/

Currently the 'required' field is correctly set to false in getQueryParameters(ArrayList queryParams). https://github.com/apigee/wsdl2apigee/blob/master/src/main/java/com/apigee/oas/OASUtils.java#L76

The erroneous line (#93) currently shows as:

parameter.addProperty("required", "true");

It should instead look like

parameter.addProperty("required", true);