Skip to content

feat: support custom formats in JSON Schema validation#247

Merged
heitorlessa merged 7 commits into
aws-powertools:developfrom
n2N8Z:develop
Jan 11, 2021
Merged

feat: support custom formats in JSON Schema validation#247
heitorlessa merged 7 commits into
aws-powertools:developfrom
n2N8Z:develop

Conversation

@n2N8Z

@n2N8Z n2N8Z commented Dec 17, 2020

Copy link
Copy Markdown
Contributor

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.

@heitorlessa heitorlessa left a comment

Copy link
Copy Markdown
Contributor

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

n2N8Z commented Dec 22, 2020

Copy link
Copy Markdown
Contributor Author

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

@heitorlessa heitorlessa left a comment

Copy link
Copy Markdown
Contributor

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