Skip to content

When BaseUrl has a port, the default server url doesn't contain the port #1294

Open

Description

Describe the bug
When setting a BaseUrl with a port, and the description file doesn't contain any servers, the port is omitted from the default server.

To Reproduce
Steps to reproduce the current behavior:
Create OpenApiReaderSettings with BaseUrl set to http://demo.testfire.net:8080
Create any OpenApiReader instance with these settings
Attempt to deserialize this properties file: http://demo.testfire.net:8080/swagger/properties.json

The resulting OpenApiDocument.Servers will contain the server "http://demo.testfire.net" (without the port number).

Expected behavior
The resulting OpenApiDocument.Servers should contain the server "http://demo.testfire.net:8080"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    type:bugA broken experience

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions