Closed senning closed 3 days ago
Thanks for your contribution! Could you please use pnpm as package manager? or just remove package-lock.json from commits
Sure, I've removed package-lock.json
and I'll use pnpm in the future. I've also rebased against the current master
.
Hello, is this PR planned to be merged? Thank you.
Hi there! Thanks for building this library, I'm finding it really helpful for quick prototyping. I ran into a few pain points that I had to resolve by directly changing the mock file, so I tried to fix them with this PR. There are two groups of changes, one of which is much bigger, so I kept them in separate commits in case you wanted to cherry-pick the smaller one.
support min and max values for numbers and array length
minItems
andmaxItems
properties in array types to set the generated length of the array (replacing the default1 - MAX_ARRAY_LENGTH
)minimum
andmaximum
properties for number types to populate themin
andmax
propsalt handler transformer for conditional responses
responseConditions
file which allows specifying the conditions under which to use specific response handlers. If the file specifies handlers for a route + verb combo, it replaces the resultArray handlerTo provide an example of these changes in action, I set up this repo. You can run it with these params:
and test it with the tests in that repo.