Skip to content

[Question][typescript-angular] use imported mapping in service #5079

@gritschf

Description

@gritschf

Is there any way to use an imported mapping in the api.service itself?

I already have an external dependcy with my typings (@entities)
And an api which uses them.

If i generate the api client with

$ openapi-generator generate -i http://xxx -g typescript-angular -c ./gen.cfg

gen.cfg:
{ "importMappings": { "Payload":"@entities" } }

the import in the default.services.ts is import { Payload } from '../@entities';
(because in the api.service.mustache the import is import { {{classname}} } from '../{{filename}}';)

but the correct path would be: import { Payload } from '@entities';

is there any way to achieve this?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions