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

Add test suite, JSON validation and minor bug fixes #40

Merged
merged 41 commits into from
Feb 26, 2024

Conversation

smt5541
Copy link
Collaborator

@smt5541 smt5541 commented Feb 12, 2024

This includes the CI changes from #39 (wanted to ensure that the addition of dict support didn't break anything, so I built out the unit tests first) as well as additional code to support JSON Schema validation in dict/list values passed in as Json() parameters and tests to validate this functionality.

Maintainer Edit -- Changes:

  • Add Test GitHub Workflow
  • Fix file input max/min size bug
  • Add JSON Schema option for embedded dicts
  • Better validator function error handling
  • Type Conversion in Route params
  • Tests for:
    • Param types: file, form, json, query, route
    • Inputs: Bool, date, datetime, dict, file, float, int, list, str, time, union

…t was provided (as int has no attribute 'lower')
…unning with the provided List object (instead ran with the children)
… fix datetime.* assignment and compress list assertion logic
@Ge0rg3
Copy link
Owner

Ge0rg3 commented Feb 15, 2024

Thank you @smt5541 for the incredible PR! I'll test all and merge shortly.

Just to confirm, should I go ahead and close out #38 as the features are within this?

@smt5541
Copy link
Collaborator Author

smt5541 commented Feb 15, 2024

Hey @Ge0rg3! #38 is already closed (was premature) - #39 can be closed, as this includes the changes from there (also, for reference, I'm @d3-steichman, this is just my personal account 😄)

@Ge0rg3 Ge0rg3 mentioned this pull request Feb 19, 2024
@Ge0rg3 Ge0rg3 changed the title Implement JSON Schema validation for dict and list values passed into Json parameters Add test suite, JSON validation and minor bug fixes Feb 26, 2024
@Ge0rg3
Copy link
Owner

Ge0rg3 commented Feb 26, 2024

@d3-steichman @smt5541 looks amazing! If possible please can you add some example to the README for using the jsonschema parsing?

Also, it would be great if I can add you as a project maintainer for this, if you'd be interested? This way in future you'd be free to make changes without approval 😄

@smt5541
Copy link
Collaborator Author

smt5541 commented Feb 26, 2024

Hey! I can definitely add to the README with a usage example of the JSON Schema, and would be interested in being a maintainer for the project. I'll probably still request review for changes though, just to get another pair of eyes on my code :)

@Ge0rg3
Copy link
Owner

Ge0rg3 commented Feb 26, 2024

Great! Should I add you at @smt5541 or at @d3-steichman ?

@smt5541
Copy link
Collaborator Author

smt5541 commented Feb 26, 2024

Probably @smt5541, as I'm guaranteed to keep access to this account

@Ge0rg3 Ge0rg3 merged commit 47c6617 into Ge0rg3:master Feb 26, 2024
1 check passed
@Ge0rg3
Copy link
Owner

Ge0rg3 commented Feb 26, 2024

Sweet, many thanks, looking forward to collaborating in future 😁

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