Closed elcamlost closed 2 years ago
This PR looks incomplete. Did you forget to push some changes in that unit test?
I can’t accept the PR without a new test case.
I changed t/openapiv2-collection-format.t test. Without changes in lib/JSON/Validator/Schema/OpenAPIv2.pm this test now fails. I can extract this changes into new test file, if it is what you're asking for. But the new test is here ))
I tested the changes locally now and I see what you mean 👍 Thanks for the PR!
Summary
Fixing defaults for arrays in query and path
Motivation
Current implementation has a bug:
This schema cannot be validated if parameter is omitted.
References
https://swagger.io/docs/specification/2-0/describing-parameters/#array-and-multi-value-parameters there is an example of describing default value for array parameter