Commit 68a0ea2
authored
feat(mock): emit msw handlers and faker factories as separate files in split modes (#3730)
* feat(mock): emit msw handlers and faker factories as separate files in split modes
In split and tags-split modes the get<Op>ResponseMock factories were
duplicated in <name>.msw.ts and <name>.faker.ts. Now the faker file is
the single home of the factories and the msw file imports and re-exports
them. MSW-only output is unchanged unless the new operationResponses:
false flag is set on the msw generator entry (handlers only, undefined
fallbacks).
* fix(mock): address review feedback on import extension, uniqueBy delimiter and docs1 parent 3112104 commit 68a0ea2
132 files changed
Lines changed: 2859 additions & 12777 deletions
File tree
- docs/content/docs/reference/configuration
- packages/core/src
- writers
- samples
- hono/hono-with-fetch-client
- __snapshots__/next-app/pets
- next-app/app/gen/pets
- next-app-with-fetch
- __snapshots__/pets
- app/gen/pets
- react-app-with-swr
- basic
- __snapshots__/endpoints
- src/api/endpoints
- fetch-client
- __snapshots__/endpoints
- src/api/endpoints
- react-app
- __snapshots__/endpoints
- src/api/endpoints
- react-query
- basic
- __snapshots__/endpoints
- src/api/endpoints
- custom-fetch
- __snapshots__/pets
- src/gen/pets
- solid-start/basic/src/api/endpoints
- svelte-query
- basic
- __snapshots__/endpoints
- src/api/endpoints
- custom-fetch
- __snapshots__/pets
- src/gen/pets
- v6-custom-fetch
- __snapshots__/pets
- src/gen/pets
- swr-with-effect
- __snapshots__/endpoints/pets
- src/gen/endpoints/pets
- swr-with-zod
- __snapshots__/endpoints/pets
- src/gen/endpoints/pets
- vue-query
- custom-fetch
- __snapshots__/pets
- src/gen/pets
- vue-query-basic
- __snapshots__/endpoints
- src/api/endpoints
- tests
- __snapshots__
- angular
- split
- tags-split
- health
- pets
- axios
- petstore-tags-split-mutator
- health
- pets
- petstore-tags-split
- health
- pets
- split
- default
- index-mock-file-split
- issue-2206-msw-info-typing
- issue-2998
- documents
- requests
- override-mock
- fetch
- petstore-tags-split
- health
- pets
- split
- mock
- issue-3574-strict-mock-tags-split-fetch/pets/pets
- issue-3574-strict-mock-tags-split-multi-fetch/store/store
- issue-3574-strict-mock-tags-split/pets/pets
- petstore-tags-split
- health
- pets
- split-mock-path/mocks
- split-msw-handlers-only
- model
- split
- tags-split-mock-path/mocks
- health
- pets
- tags-split-msw-handlers-only
- health
- model
- pets
- tags-split-per-generator-path/msw
- health
- pets
- react-query
- importFromSubdirectory
- petstore-tags-split
- health
- pets
- split
- svelte-query
- petstore-tags-split
- health
- pets
- split
- swr
- petstore-tags-split
- health
- pets
- split
- vue-query
- petstore-tags-split
- health
- pets
- split
- zod
- petstore-tags-split
- health
- pets
- split
- configs
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
619 | 619 | | |
620 | 620 | | |
621 | 621 | | |
| 622 | + | |
622 | 623 | | |
623 | 624 | | |
624 | 625 | | |
| |||
631 | 632 | | |
632 | 633 | | |
633 | 634 | | |
| 635 | + | |
| 636 | + | |
634 | 637 | | |
635 | 638 | | |
636 | 639 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
514 | 514 | | |
515 | 515 | | |
516 | 516 | | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
517 | 521 | | |
518 | 522 | | |
519 | 523 | | |
| |||
Lines changed: 110 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
202 | 312 | | |
203 | 313 | | |
204 | 314 | | |
| |||
Lines changed: 17 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
| 137 | + | |
| 138 | + | |
138 | 139 | | |
139 | 140 | | |
140 | 141 | | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
148 | 157 | | |
149 | 158 | | |
150 | 159 | | |
| |||
0 commit comments