Skip to content

api.client ignores path component of configuration.baseUrl #127

@AI0867

Description

@AI0867

In the generated client code, the final URL is generated like: const url = new URL(path, configuration.baseUrl);.
This means that if path has a leading slash, any path component of configuration.baseUrl is ignored.
According to the OpenAPI spec, such a leading slash is mandatory, meaning that any path component of the baseUrl is never used.

Stripping off the leading slash of paths before combining would fix this problem. Ensuring that path components of baseUrl end with a trailing slash would also be useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions