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

Upgrade the Std.UriTemplate lib to 0.54 and add a unit test. #205

Merged
merged 3 commits into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.7.12] - 2024-03-08

### Changed

- Upgrade `Std.UriTemplate` NuGet package to version 0.54.
- Add a unit test for emoji in URI template parameters.

## [1.7.11] - 2024-02-26

### Changed
Expand Down
18 changes: 18 additions & 0 deletions Microsoft.Kiota.Abstractions.Tests/RequestInformationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,24 @@ namespace Microsoft.Kiota.Abstractions.Tests
{
public class RequestInformationTests
{
[Fact]
public void SetUriCorrectlyEscapesDataString()
{
// Arrange
var testRequest = new RequestInformation()
{
HttpMethod = Method.GET,
UrlTemplate = "http://localhost/repos/{owner}/{repo}/labels/{name}"
};
// Act
testRequest.PathParameters.Add("owner", "me");
testRequest.PathParameters.Add("repo", "test");
testRequest.PathParameters.Add("name", "profane content 🤬");
// Assert
var actual = testRequest.URI.AbsoluteUri.ToString();
Assert.Equal("http://localhost/repos/me/test/labels/profane%20content%20%F0%9F%A4%AC", actual);
Assert.Empty(testRequest.QueryParameters);
}
[Fact]
public void SetUriExtractsQueryParameters()
{
Expand Down
12 changes: 9 additions & 3 deletions Microsoft.Kiota.Abstractions.sln
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31424.327
# Visual Studio Version 17
VisualStudioVersion = 17.10.34706.255
MinimumVisualStudioVersion = 15.0.26124.0
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Kiota.Abstractions", "src\Microsoft.Kiota.Abstractions.csproj", "{DEE3A7F9-7951-403C-A90C-C182A381D6B6}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{812D9C21-411D-4987-AB8E-C96185F01AD0}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
CHANGELOG.md = CHANGELOG.md
CODE_OF_CONDUCT.md = CODE_OF_CONDUCT.md
LICENSE = LICENSE
README.md = README.md
SECURITY.md = SECURITY.md
SUPPORT.md = SUPPORT.md
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Kiota.Abstractions.Tests", "Microsoft.Kiota.Abstractions.Tests\Microsoft.Kiota.Abstractions.Tests.csproj", "{95C59CD7-B996-45A7-927D-4952E85A2BB8}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Kiota.Abstractions.Tests", "Microsoft.Kiota.Abstractions.Tests\Microsoft.Kiota.Abstractions.Tests.csproj", "{95C59CD7-B996-45A7-927D-4952E85A2BB8}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
4 changes: 2 additions & 2 deletions src/Microsoft.Kiota.Abstractions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<PackageProjectUrl>https://aka.ms/kiota/docs</PackageProjectUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<Deterministic>true</Deterministic>
<VersionPrefix>1.7.11</VersionPrefix>
<VersionPrefix>1.7.12</VersionPrefix>
<VersionSuffix></VersionSuffix>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<SignAssembly>false</SignAssembly>
Expand Down Expand Up @@ -61,4 +61,4 @@
<PackagePath></PackagePath>
</None>
</ItemGroup>
</Project>
</Project>
Loading