Skip to content

don't include the full namespace like be.company.User, but rather just User as type or interface #1907

@Ardaipek

Description

@Ardaipek

Describe the solution you'd like
let's say my schema is be.company.User in my yaml file. I would like that the codegen to generate the model as User. Unfortunately, as of the latest version (0.25.0) mentioned in your documentation, openapi-typescript-codegen does not provide a direct option to customize or shorten the names of generated models in such a specific way. I don't know if it feasible.

The reason behind this we generate the OpenAPI specification based on the code (I know where is API first design, but legacy project so yeah).
I can of course use aliases when I import the model but before renaming all the interfaces with aliases, I wanted to submit a request.

I use Angular 15 (so I generated with the flag --client angular ) and openapi-typescript-codegen version 0.25.0

For the rest everything work great, lot's of boiler plate code can be remove thanks to you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions