hey-api / openapi-ts

✨ Turn your OpenAPI specification into a beautiful TypeScript client

Home Page:https://heyapi.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

When a default response is defined, it overrides the response configured for 200.

lopan-sasjo opened this issue · comments

Description

I am using the latest version of openapi-ts.

After generating my client, I found a problem with the services that in openapi.yaml have the default response and the response 200. I could see in types.gen.ts that the responses 200 did not have the correct configuration, they had the default response configuration .
I checked your example and it has the same problem.
image
image

OpenAPI specification (optional)

No response

Configuration

import { defineConfig } from '@hey-api/openapi-ts';

export default defineConfig({
format: 'prettier',
input: '../openapi.yaml',
output: './src/client',
});

System information (optional)

No response

Yikes. Thanks for bringing this up @lopan-sasjo, we still got some work to clean up the generated output 🙏

I have the same issue, this currently makes this package unusable for me 😕 Do you have an ETA on a fix for this? This and #495 are currently making me look for alternatives for a project I'm working on.

Sorry for that @happenslol :( no pinky promises on ETAs, but would aim for within a week

Hey all, this will be fixed in the next release. Please let me know if that works for you once you try it out!