orval
orval copied to clipboard
feat(msw): split polymorphic mocks into its own functions
Status
READY
Description
Fixes #1318
This splits response mocks where the response contains objects that have a base object.
The specification in the linked issue is an example of a response mock that will get split.
Todos
- [ ] Tests
- [ ] Documentation
- [ ] Changelog Entry (unreleased)
Steps to Test or Reproduce
- Generate using a specification that contains a
allOf
prop, e.g. the one in the linked issue. - Notice that the response mock contains calls to functions that has been generated above.
- Notice that no errors exists
@AffeJonsson
A conflict occurred when I merged the following PR. Could you please check again and correct it?
https://github.com/anymaniax/orval/pulls?q=is%3Apr+is%3Aclosed
@AffeJonsson
A conflict occurred when I merged the following PR. Could you please check again and correct it?
https://github.com/anymaniax/orval/pulls?q=is%3Apr+is%3Aclosed
Merged master and did a small update to make overrideResponse param Partial<name>, just like the new overrideResponse code
Maybe wait with this until #1199 is complete? I assume we might need to change this when it is completed anyway
@AffeJonsson
No, they says it will take time, so we unnecessary wait. And. I'll share it to they. I would like to check this PR, but please forgive me if it takes a little more time.
it would make sense to regenerate samples
example in screenshot has overrideResponse
twice 🤔
...overrideResponse
// some faker
...overrideResponse
it would make sense to regenerate samples
example in screenshot has
overrideResponse
twice 🤔...overrideResponse // some faker ...overrideResponse
This is no longer the case after your PR was merged, only one overrideResponse is now present
Seems I broke tests with this, fixing...
@AffeJonsson Please let me know when this is ready for me to review 👍
@AffeJonsson Please let me know when this is ready for me to review 👍
It's ready!