orval
orval copied to clipboard
feat: sort schema barrel file
Fix #483 sort schema barrel file
Note
When testing this change I found the output of many example folders to be out of date. I didn't want to pollute this PR so I left those files out of this PR. I did leave the samples/react-query/basic/src/api/model/index.ts
file in this PR as an example of what this change accomplishes.
Status
READY
Description
The contents of the schema barrel files (model/index.ts) should be stable between builds - the output between re-runs should be identical. This has several benefits, including less noisy git diffs.
This change also reduces IO trashing because it removes 2 IO operations that were previously within a loop (read file, append file)
Related PRs
Non
Todos
- [x] Tests
- [ ] Documentation - N/A
- [ ] Changelog Entry (unreleased)
Steps to Test or Reproduce
- Clone [email protected]
- Open
samples/react-query/basic
- run
npm install
- run
orval --config ./orval.config.ts
- Look at the output of
samples/react-query/basic/src/api/model/index.ts
- Delete the file (or a single line)
- re-run
orval --config ./orval.config.ts
- Note how the file contents is not stable, the contents can be in any order
Someone is attempting to deploy a commit to a Personal Account owned by @anymaniax on Vercel.
@anymaniax first needs to authorize it.
Changes made, requesting re-review
@SamKirkland Thanks