openapi-codegen-ts
openapi-codegen-ts copied to clipboard
feat: 3xx as success response code
trafficstars
Description
- add response decoder generation for response with http status code 3xx, like this:
/test-redirect-response-header: post: operationId: "testRedirectResponseHeader" responses: "302": description: "redirect to location" headers: Location: type: string "500": description: "Fatal error"
Motivation and Context
The purpose of this PR is to generate response decoders also for 3xx responses. Before this PR, trying to generate a ts client for this openapi we found the lack of a response decoder for the 302 with relative error.
How Has This Been Tested?
yarn testyarn e2e
Screenshots (if appropriate):
Types of changes
- [ ] Chore (improvement with no change in the behaviour)
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
Checklist:
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
| Warnings | |
|---|---|
| :warning: |
Please include a Pivotal story at the beginning of the PR title (see below). |
Example of PR titles that include pivotal stories:
- single story:
[#123456] my PR title - multiple stories:
[#123456,#123457,#123458] my PR title
Generated by :no_entry_sign: dangerJS