-
Notifications
You must be signed in to change notification settings - Fork 421
Support JSON Schema referencing in validation utils (by using fastjsonschema's handlers param) #4499
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
Comments
Thanks for opening your first issue here! We'll come back to you as soon as we can. |
hey @danieljnchen, thanks for taking the time to cut a feature request and the investigation -- it makes total sense we support it. Would you be interested in creating a PR? we can guide it. We're currently focused on fixing a release pipeline issue and V3, which means we have no ETA when this would be looked at right now. Edit: it'd be great to have an escape hatch where customers could provide additional keyword arguments so they're not blocked in the futur |
@heitorlessa Thanks for the quick response! I'd be happy to make a PR -- I'll look through the contributing docs and hopefully have something up shortly |
@heitorlessa I've posted a draft PR: #4508 I had some difficulty getting the dev environment setup -- I used gitpod as directed in the Contributing guidelines, but |
Hi @danieljnchen, I'm seeing this comment now. Did you manage to resolve the problem with the environment? |
Thanks for checking in! Unfortunately not; here's the error I'm getting when I run |
Hello @danieljnchen! Yes, I was able to reproduce this error and opened an issue to fix this. I'm working on it now and hope to finish it early next week. |
|
Use case
fastjsonschema
, which is used internally by aws-lambda-powertools' validation utilities, supports JSON Schema's schema referencing, but it by default launches an http request to the url provided. However, in the case that users don't want to launch an http request to fetch the referenced schemas (for example, because the references are stored locally),fastjsonschema
also provides thehandlers
parameter to its validation methods (docs)Solution/User Experience
Update aws-lambda-powertools' validation functions to support passing the
handlers
param to fastjsonschema'svalidate
call. As far as I can tell, this would require adding the param to validate_data_against_schema and to the user-facing methods/decorators validate and validatorAlternative solutions
No response
Acknowledgment
The text was updated successfully, but these errors were encountered: