Skip to content

Generation of client instances creates invalid code when using custom name #940

Closed
@ssams

Description

@ssams

When using the --name option to generate separate client instances, invalid code is generated when using a name different than the value used in the example / readme ("AppClient").

An invokation such as openapi --input ./openapi.json --output ./src-gen --name DemoClient generates in the file ./src-gen/client.ts the code

// [...]
export class DemoClient {
// [...]

as expected, but in ./src-gen/index.tx the wrong (nonexistent) class "AppClient" is referenced:

/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export { AppClient } from './client';
// [...]

=> generated index.ts should also use the value from the name parameter when exporting the client.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions