Skip to content

Improve server creation and URL handling logic-V2 - #2530

Merged
Vincent Biret (baywet) merged 1 commit into
microsoft:mainfrom
Mahdigln:issue-1294-preserve-baseurl-port-v2
Oct 6, 2025
Merged

Improve server creation and URL handling logic-V2#2530
Vincent Biret (baywet) merged 1 commit into
microsoft:mainfrom
Mahdigln:issue-1294-preserve-baseurl-port-v2

Conversation

@Mahdigln

@MahdiglnMahdigln commented Oct 6, 2025

Copy link
Copy Markdown
Contributor

Updated the MakeServers method to include checks for defaultUrl and refined host validation. Modified the BuildUrl method to correctly extract ports and remove default ports from URLs. Added unit tests in OpenApiServerTests.cs to ensure proper handling of base URLs and ports across various scenarios.

fixes#1294

Updated the `MakeServers` method to include checks for `defaultUrl` and refined host validation. Modified the `BuildUrl` method to correctly extract ports and remove default ports from URLs. Added unit tests in `OpenApiServerTests.cs` to ensure proper handling of base URLs and ports across various scenarios.
@Mahdigln
Mahdigln requested a review from a team as a code ownerOctober 6, 2025 18:16

@baywetVincent Biret (baywet) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution!

@baywet
Vincent Biret (baywet) merged commit 3e6ee80 into microsoft:mainOct 6, 2025
9 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants

@Mahdigln@baywet