openapi-ts
openapi-ts copied to clipboard
Generating code based on multiple OpenAPI schemas
Description
Hey everyone!
I am facing a challenge using the library. On the project I am working on, we have several microservices, each of them with its own OpenAPI schema, which means that I have to deal with different .yaml files.
I am not sure if this is possible, but is there any way to declare several inputs instead of just one? kind of:
import { defineConfig } from '@hey-api/openapi-ts'
export default defineConfig({
client: '@hey-api/client-axios',
input: {
"service1": '@generated/openapi-schemas/service1/service1.yaml',
"service2": '@generated/openapi-schemas/service2/service2.yaml',
...
},
output: {
format: 'prettier',
lint: 'eslint',
path: '@generated/api',
},
})
I was checking the ClientConfig documentation, and it looks like the input property can be an object, but I am doing something wrong because it's not working as I expected.
I would appreciate any guidance.
Thanks a lot in advance!