swagger-typescript-api icon indicating copy to clipboard operation
swagger-typescript-api copied to clipboard

fix: put requests with application/x-www-form-urlencoded is incorrect…

Open iandyh opened this issue 6 months ago • 6 comments

…ly handled

I was facing this issue with [email protected].

For a PUT request expecting application/x-www-form-urlencoded, The generated swagger.json has the correct config:

"consumes": ["application/x-www-form-urlencoded"]

However, the generated code incorrectly set the request to be sent with multipart/form-data.

type: ContentType.FormData

fyi: the code is entirely generated by Github Copilot.

iandyh avatar Jul 29 '25 10:07 iandyh

🦋 Changeset detected

Latest commit: 24704eaa4c19d7e601f291203e26ae387dd46491

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
swagger-typescript-api Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

changeset-bot[bot] avatar Jul 29 '25 10:07 changeset-bot[bot]

bugbot run

smorimoto avatar Aug 21 '25 14:08 smorimoto

@smorimoto thanks for checking. I need further verification of the change since I notice something suspicious with this fix. I'll update you once I finish the confirmation.

iandyh avatar Aug 21 '25 23:08 iandyh

@smorimoto I've verified the changes and they are good to go.

iandyh avatar Aug 22 '25 00:08 iandyh

@codex review

smorimoto avatar Sep 16 '25 12:09 smorimoto

Codex Review: Didn't find any major issues. Breezy!

About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".