RepreZen / KaiZen-OpenApi-Parser

High-performance Parser, Validator, and Java Object Model for OpenAPI 3.x
130 stars 31 forks source link

SecurityParameter validation fails incorrectly #200

Closed andylowry closed 6 years ago

andylowry commented 6 years ago

All PropertiesOverlay objects were incorrectly assumed to be based on JSON object values, and so the base validator was failing when checking the parsed JSON type for a SecurityParameter. This properties object actually has no manifestation in the model itself; it's merely a bridge type, appearing as the map value type in the SecurityRequirement object. The underlying JSON values for these map values are JSON arrays. Those arrays are associated with SecurityParameter's sole property, parameters, whicih is a list, and whose pathInParent is empty.

The SecurityParameterValidator class, as a result of all this, creates a validation error on a correct model, claiming that the underlying JSON value should be an object, when it fact it should be an array.

andylowry commented 6 years ago

Fixed in #201