Description
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 the handlers
parameter to its validation methods (docs)
You can pass mapping from URI to function that should be used to retrieve remote schemes used in your definition in parameter handlers.
Solution/User Experience
Update aws-lambda-powertools' validation functions to support passing the handlers
param to fastjsonschema's validate
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 validator
Alternative solutions
No response
Acknowledgment
- This feature request meets Powertools for AWS Lambda (Python) Tenets
- Should this be considered in other Powertools for AWS Lambda languages? i.e. Java, TypeScript, and .NET
Metadata
Metadata
Assignees
Labels
Type
Projects
Status