Fix OpenAPI v3.0 Schema Violation: Array value found, but an object is required #125
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 c5ca523 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.