identifierCase: "preserve" altering response type names #1996
-
I'm migrating from export type GetResourceData = {
headers?: {
"custom-header"?: string | null;
};
path: {
param1: string;
};
}; becomes: export type GetResource_Data = {
body?: never;
headers?: {
"custom-header"?: string | null;
};
path: {
worparam1flow_template_uuid: string;
};
query?: never;
url: "/v2/path/{param1}";
}; This is my config file: import { defineConfig } from "@hey-api/openapi-ts";
export default defineConfig({
input: "openapi.json",
output: {
format: "prettier",
path: "lib",
},
plugins: [
{
name: "@hey-api/client-fetch",
baseUrl: false,
exportFromIndex: true,
},
{
name: "@hey-api/sdk",
asClass: true,
throwOnError: false,
},
{
name: "@hey-api/typescript",
enums: "javascript",
identifierCase: "preserve",
readableNameBuilder: "Readable{{name}}",
},
],
schemas: false,
}); If I omit the identifierCase config option then the name is preserved on the response types. I am trying to avoid having to refactor a couple hundred imports with underscores. I have gone through the documentation and can't find anything relating to how to alter the generation of these types. Is there a way to preserve the names of these response types as well? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hey @henry-encord so this is about |
Beta Was this translation helpful? Give feedback.
This will be fixed in the next release