Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass Schema class to format validator #219

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

narcoticfresh
Copy link

@narcoticfresh narcoticfresh commented Feb 22, 2024

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 with x-*. We use those fields for additional metadata.

An example would be the file format that would allow for a x-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 😢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant