Skip to content

resolves SCM changes ClientUriBuilder#4519

Merged
ArcturusZhang merged 19 commits intoAzure:feature/v3from
ArcturusZhang:update-clienturibuilder
Apr 22, 2024
Merged

resolves SCM changes ClientUriBuilder#4519
ArcturusZhang merged 19 commits intoAzure:feature/v3from
ArcturusZhang:update-clienturibuilder

Conversation

@ArcturusZhang
Copy link
Copy Markdown
Member

@ArcturusZhang ArcturusZhang commented Apr 2, 2024

Fixes #4567

Description

We have this if statement in ClientUriBuilder to avoid duplicated separators:

if (value[0] == PathSeparator)
{
    value = value.Substring(1);
}

but in some cases it removes the separator incorrectly when there is no duplicate (as described in the above issue).
This PR refines the check to ensure neither of these happens

Checklist

To ensure a quick review and merge, please ensure:

  • The PR has a understandable title and description explaining the why and what.
  • The PR is opened in draft if not ready for review yet.
    • If opened in draft, please allocate sufficient time (24 hours) after moving out of draft for review
  • The branch is recent enough to not have merge conflicts upon creation.

Ready to Land?

  • Build is completely green
    • Submissions with test failures require tracking issue and approval of a CODEOWNER
  • At least one +1 review by a CODEOWNER
  • All -1 reviews are confirmed resolved by the reviewer
    • Override/Marking reviews stale must be discussed with CODEOWNERS first

@ArcturusZhang ArcturusZhang marked this pull request as ready for review April 11, 2024 00:34
Comment thread test/UnbrandedProjects/NoTest-TypeSpec/src/Generated/Internal/ClientUriBuilder.cs Outdated
Comment thread test/UnbrandedProjects.Tests/ClientUriBuilderTests.cs Outdated
Comment thread test/UnbrandedProjects.Tests/ClientUriBuilderTests.cs
Comment thread test/UnbrandedProjects.Tests/ClientUriBuilderTests.cs
Comment thread test/UnbrandedProjects.Tests/ClientUriBuilderTests.cs
@ArcturusZhang ArcturusZhang merged commit 5e7b4e8 into Azure:feature/v3 Apr 22, 2024
@ArcturusZhang ArcturusZhang deleted the update-clienturibuilder branch April 22, 2024 03:47
Sign up for free to 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.

[ClientModel-based clients] ClientUriBuilder does not build the path correctly

3 participants