Open seperman opened 2 months ago
Start a new pull request in StackBlitz Codeflow.
Also manually setting the schema name pattern can fix the issue, but I think openapi-ts should detect these conflicts and use a proper suffix or prefix automatically.
export default defineConfig({
client: '@hey-api/client-axios',
input: 'openapi.yaml',
output: {
format: 'prettier',
path: './src/client',
},
types: {
dates: 'types+transform',
enums: 'javascript',
},
schemas: {
name: (name) => `_${name}`, // [!code ++]
},
});
@seperman How would you choose to resolve this conflict if you were asked to resolve it manually?
This will be fixed by removing the index.ts
barrel file, the complexity of maintaining a conflict-free index file is not worth it.
Description
Automatic addition of the suffix
Schema
to the object names inschemas.gen.ts
causes conflicts withtypes.gen.ts
In the openapi specs we have:
But heyapi creates:
schemas.gen.ts
:And in
types.gen.ts
:Which causes a conflict because
WarningActionSchema
has a conflict between the 2 files.OpenAPI specification (optional)
openapi: 3.0.0 info: title: Warning Actions API version: 1.0.0 description: API to handle warning actions servers:
System information (optional)
No response