Closed rabbiveesh closed 2 years ago
Looking closer at the errors, it seems like the paths are gettting messed up with various refs. first error is
[0] /components/schemas/SBCampaign/$ref: /oneOf/1 Missing property. (JSON::Validator::Error)
I have no idea what that path is. If you look at the SBCampaign, it doesn't have any $refs directly under it. I also did a scan for every oneOf in the document, and all of them have the minimum 2 properties.
I'm surprised that the numbers wasn't indeed read as numbers, but either way: I fixed it by coercing strings and numbers in the latest version.
Will be available on CPAN soon.
Steps to reproduce the behavior
I was trying to generate an API Client using OpenAPI::Client, which use JSON::Validator to read the schema supplied. I tried loading amazon's definitions for their Advertising - Sponsored Brands API (available here). Example perl code:
This gives a list of 43 different errors, most of which are because the
bidMultiplier
in many different operations have a minimum and a maximum, which are getting read as strings instead of numbers.Expected behavior
The schema should validate. Of course, I'm no expert on OpenAPIv3, but I assume amazon is.
Actual behavior
As mentioned above, it simply explodes with errors. Most seem to be b/c of the number vs string issue, though there may be more problems.