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: add maxProperties object sampler support #158

Merged
merged 2 commits into from
Mar 18, 2024
Merged

Conversation

adamaltman
Copy link
Member

@adamaltman adamaltman commented Mar 16, 2024

What/Why/How?

Adds support for the maxProperties constraint when generating an object sample.

Reference

Closes #157

Testing

Added test object with four properties (two required properties), and two maxProperties. Ensure that only two properties are in the sample and that they are the required properties.

Screenshots (optional)

n/a

Check yourself

  • Code is linted
  • Tested
  • All new/updated code is covered with tests

Security

  • Security impact of change has been considered
  • Code follows company security practices and guidelines

@adamaltman adamaltman requested a review from a team as a code owner March 16, 2024 16:44
Copy link
Member

@RomanHotsiy RomanHotsiy left a comment

Choose a reason for hiding this comment

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

LGTM

src/samplers/object.js Outdated Show resolved Hide resolved
@adamaltman adamaltman merged commit a04d433 into master Mar 18, 2024
2 checks passed
@adamaltman adamaltman deleted the max-properties branch March 18, 2024 14:07
@AlexVarchuk AlexVarchuk mentioned this pull request Apr 24, 2024
5 tasks
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.

maxProperties not respected in generated sample
3 participants