Pass Schema class to format validator #219
Open
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 guys
Great library!
I really really really hope this gets merged (or feedback given), I see many open PRs here collecting dust ;-/. Can we maybe be of assistance in maintaining this library?
Anyway, this PR fulfills a need we have: The
format
validators need more context, they need to know the full schema of the property it is applied to. The OpenAPI standard allows for additional fields in the schema that are prefixed withx-*
. We use those fields for additional metadata.An example would be the
file
format that would allow for ax-mime-type
additional attribute - then this fictional format validator could do a mime detection and refuse the binary blob if the mime type is now in the additional attribute.Thanks for feedback/merge
UPDATE Locally the phpunit suite was green, it seems there was an error setting up the tests in Scrutinizer. I seem to be unable to restart the task 😢