swagger-typescript-api
swagger-typescript-api copied to clipboard
fix: incorrect format detection when using `$ref #/responses/*`
Fixes https://github.com/acacode/swagger-typescript-api/issues/1547
The snapshots have been updated using vitest --update
[!NOTE] Fixes response format detection when responses use $ref, resulting in proper "json" format in generated requests; adds test coverage and updates snapshots.
- Core
- Update
src/schema-routes/schema-routes.tsto passcontentTypesintogetRequestInfoTypes, ensuring correctcontentKind/format resolution for$ref-basedresponses.- Tests
- Add
tests/spec/extractResponseRef/basic.test.tsandtests/spec/extractResponseRef/schema.jsonwith snapshottests/spec/extractResponseRef/__snapshots__/basic.test.ts.snap.- Refresh snapshots across projects to reflect explicit
format: "json"in generated requests.- Release
- Add changeset (
.changeset/stale-masks-hug.md) for a patch bump ofswagger-typescript-api.Written by Cursor Bugbot for commit 5971174250a777b8ebf20c54d1894d3ae938de92. This will update automatically on new commits. Configure here.