-
Notifications
You must be signed in to change notification settings - Fork 350
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
Allow providing a seed when using dynamic content generation #2590
Comments
We are also interested in providing a seed to control the RNG, our use case is using Prism to mock APIs and run tests for SDKs we generate from an OpenAPI spec. For our use case, running Prism in CLI mode, we really want a |
PR #2594 is up! One thing to note, when you use --ignoreExamples, the results are already deterministic. This is because --ignoreExamples uses json-schema-sampler to statically generate examples, not json-schema-faker, and json-schema-sampler is deterministic (https://github.com/stoplightio/json-schema-sampler). |
Awesome @ilanashapiro, thanks for this 🙇. I will do a full review shortly. @jack-bliss Does that address your use case? Ilana PR adds support for both Just to transparent, Stainless did support this effort, but our aim is to ensure the solution benefits the broader community, not just our specific needs. |
yes looks great, much appreciated <3 |
Ilana's PR has been merged 🎉. It will be part of the next release: #2606. |
Would be really helpful for tests to be able to get a stable response value
Context
Current Behavior
Expected Behavior
Possible Solution(s)
x-dynamic-seed
, that i can set to a constant during testingThe text was updated successfully, but these errors were encountered: