openapi-ts icon indicating copy to clipboard operation
openapi-ts copied to clipboard

Request support multiple schemas

Open semdy opened this issue 1 year ago • 2 comments

Description

Like this:

export default [
{
  input: 'https://get.heyapi.dev/hey-api/backend',
  output: 'src/client',
  plugins: ['@hey-api/client-fetch'],
},
{
  input: 'https://get.heyapi.dev/hey-api/backend2',
  output:'src/client2',
  plugins: ['@hey-api/client-fetch'],
}
];

semdy avatar Apr 30 '25 13:04 semdy

Hi @semdy, would you say this is a duplicate of https://github.com/hey-api/openapi-ts/issues/1056?

mrlubos avatar Apr 30 '25 13:04 mrlubos

Hi @semdy, would you say this is a duplicate of #1056?

Yeah, that really resolved the problem, but more simple called by cli like above.

semdy avatar Apr 30 '25 14:04 semdy

@carson2222 will take care of this

mrlubos avatar Sep 10 '25 16:09 mrlubos

@semdy That's one of features I implemented in this PR https://github.com/hey-api/openapi-ts/pull/2602. It will be soon published so you can use it in the newest version!

Btw I recommend you to use the defineConfig function while defining your config. Your way will work too, but the function has a built in types so creating a config is much easier.

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

export default defineConfig([
  {
    input: "https://get.heyapi.dev/hey-api/backend",
    output: "src/client",
    plugins: ["@hey-api/client-fetch"],
  },
  {
    input: "https://get.heyapi.dev/hey-api/backend2",
    output: "src/client2",
    plugins: ["@hey-api/client-fetch"],
  },
]);

carson2222 avatar Sep 11 '25 07:09 carson2222

This will be available in the next release. Looking forward to your feedback!

mrlubos avatar Oct 06 '25 03:10 mrlubos