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

Validation refactor pass 2 #862

Merged
merged 32 commits into from Dec 2, 2019
Merged

Validation refactor pass 2 #862

merged 32 commits into from Dec 2, 2019

Conversation

XVincentX
Copy link
Contributor

@XVincentX XVincentX commented Nov 29, 2019

This PR comes out because of an attempt of using These in Prism, resulting in some inconsistencies that were not making the thing possible:

  • validateBody is not doing the fromEither and fromOption conversion anymore
  • Correctly use NonEmptyArray where appropriate
  • validateAgainstSchema function now returns None when no validation errors instead of an empty array — making the things a little bit weird.

@XVincentX XVincentX marked this pull request as ready for review November 29, 2019 16:43
@XVincentX XVincentX force-pushed the ref/validation/parsed branch 8 times, most recently from 8cefd83 to 9c1a0ff Compare December 2, 2019 09:16
Copy link
Contributor

@karol-maciaszek karol-maciaszek left a comment

Choose a reason for hiding this comment

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

It good to see another chunk of code to be on the functional side of the river. Added few minor comments and questions.

packages/http/src/mocker/callback/callbacks.ts Outdated Show resolved Hide resolved
packages/http/src/validator/validators/utils.ts Outdated Show resolved Hide resolved
packages/http/src/validator/validators/body.ts Outdated Show resolved Hide resolved
packages/http/src/validator/validators/body.ts Outdated Show resolved Hide resolved
packages/http/src/validator/validators/body.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@karol-maciaszek karol-maciaszek left a comment

Choose a reason for hiding this comment

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

Good job!

@XVincentX XVincentX merged commit 824c6c5 into master Dec 2, 2019
@XVincentX XVincentX deleted the ref/validation/parsed branch December 2, 2019 16:10
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.

None yet

2 participants