Skip to content

OpenAPI v2 converter - incorrect server URL when basePath begins with a '/' #1113

@alexweav

Description

@alexweav

I have a v2 document with a basePath of /nitest, no host, and no schemes. The v2 converter prepends two forward slashes to it, returning a Server URL of ///nitest, which is incorrect - i would expect it to be unchanged.

This prepend occurs in SwaggerConverter.java, line 424.

With a bit of guidance, I can send a PR to fix it. It seems to me that there needs to be an extra case in this method for basePaths which begin with a / when no schemes are available.

If this is the correct approach, or if we should take a different route, let me know - I can post a PR either way.

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