Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

- fixes a bug with path items deduplication #3760

Merged
merged 2 commits into from
Nov 22, 2023

Conversation

baywet
Copy link
Member

@baywet baywet commented Nov 20, 2023

fixes #3757

andrueastman
andrueastman previously approved these changes Nov 21, 2023
Copy link
Member

@andrueastman andrueastman left a comment

Choose a reason for hiding this comment

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

👍🏼

@baywet baywet force-pushed the bugfix/param-path-deduplication branch from d1292c0 to 4c668a2 Compare November 21, 2023 14:24
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

92.3% 92.3% Coverage
0.0% 0.0% Duplication

@baywet baywet enabled auto-merge November 21, 2023 20:11
@baywet baywet merged commit 9f416e7 into main Nov 22, 2023
@baywet baywet deleted the bugfix/param-path-deduplication branch November 22, 2023 06:35
@@ -6390,12 +6409,17 @@ public void SinglePathParametersAreDeduplicated()
Assert.NotNull(managerRB);
var managerUrlTemplate = managerRB.FindChildByName<CodeProperty>("UrlTemplate", false);
Assert.NotNull(managerUrlTemplate);
Assert.Equal("{+baseurl}/users/{id}/manager", managerUrlTemplate.DefaultValue.Trim('"'));
Assert.Equal("{+baseurl}/users/{users%2Did}/manager", managerUrlTemplate.DefaultValue.Trim('"'));
Copy link

Choose a reason for hiding this comment

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

@baywet after updating to kiota 1.9.0 from preview this is causing a regression
in my swagger file i have: files/{fileid}/dependencies

  • this generates template: {+baseurl}/files/{files%2Did}/dependencies
  • when calling _api.Files[123].Dependencies.GetAsync() the url template parameters still has fileid:123

Eventually GET api/files//dependencies is called and the request fails
Any suggestion for this case?

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for pointing this. Can you join the conversation at #3901 please?

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.

Chained builder does not work when parameters change names for subrequests
3 participants