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

Adding the mandatory field checks in PactDslJsonBody #1794

Open
DurgaManasaMaruboyina opened this issue Apr 30, 2024 · 1 comment
Open

Adding the mandatory field checks in PactDslJsonBody #1794

DurgaManasaMaruboyina opened this issue Apr 30, 2024 · 1 comment
Labels
enhancement Indicates new feature requests

Comments

@DurgaManasaMaruboyina
Copy link

Hello team,

Is there any way where we can add specific properties are mandatory like notEmpty matching rules in PactDslJsonBody. In consumer side tests we should be able to tell the specific properties are mandatory and they shouldn't be null or empty. We are writing contract tests for async message and using PactDslJsonBody to construct the pact message body.

@rholshausen rholshausen added the enhancement Indicates new feature requests label May 3, 2024
@rholshausen
Copy link
Contributor

You could use a regex like .+ that will match at least one character. But there is no mechanism to specify notEmpty at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Indicates new feature requests
Projects
None yet
Development

No branches or pull requests

2 participants