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

feat: support custom formats in JSON Schema validation #247

Merged
merged 7 commits into from
Jan 11, 2021

Conversation

n2N8Z
Copy link
Contributor

@n2N8Z n2N8Z commented Dec 17, 2020

Issue #, if available:
Issue #246

Description of changes:

Pass formats dict through to fastjsonschema

Checklist

Breaking change checklist

RFC issue #:

  • Migration process documented
  • Implement warnings (if it can live side by side)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link
Contributor

@heitorlessa heitorlessa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Firstly, thank you for creating the PR. As per #246, if fastjsonschema supports it I'd be happy in supporting it.

Could you please add a test to validate the likes of #246 will work upon merge?

@n2N8Z
Copy link
Contributor Author

n2N8Z commented Dec 22, 2020

Test added.

@heitorlessa heitorlessa changed the title Issue: 246 feat: support JSON Schema custom formats validation Jan 11, 2021
@heitorlessa heitorlessa changed the title feat: support JSON Schema custom formats validation feat: support custom formats in JSON Schema validation Jan 11, 2021
Copy link
Contributor

@heitorlessa heitorlessa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution @n2N8Z ! I've made the following changes to your fork in order to merge it safely:

  • Make function args non-mutable
  • Additional test covering invalid custom formats
  • Exception capturing ordering and invalid schema defintion exception to cover invalid formats
  • Docs

@heitorlessa heitorlessa merged commit 4c5ea71 into aws-powertools:develop Jan 11, 2021
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.

2 participants