Thank you for your very useful tool, it's been really useful in our projects.
bin/php-openapi validate currently fails unexpectedly when validating a schema that specifies an empty value for a Map OpenAPI field.
For example, the minimal specification I've provided in c5ca5238d952d9f380507c1bd1401ce48bae1567 currently fails:
bin/php-openapi validate tests/spec/data/empty-maps.json
OpenAPI v3.0 schema violations:
- [paths./products.get.responses[200].headers] Array value found, but an object is required
- [paths./products.get.responses[200].content] Array value found, but an object is required
- [paths./products.get.responses[200].links] Array value found, but an object is required
Hi there,
Thank you for your very useful tool, it's been really useful in our projects.
bin/php-openapi validate
currently fails unexpectedly when validating a schema that specifies an empty value for a Map OpenAPI field.For example, the minimal specification I've provided in c5ca5238d952d9f380507c1bd1401ce48bae1567 currently fails:
Whereas that specification passes in various other validation tools such as https://apitools.dev/swagger-parser/online/ or https://www.jsonschemavalidator.net/.
This PR changes to the Serialization process so that empty Map Fields are correctly validated.
The example in this PR uses the Response object, however, the fix should apply for any Map type fields.