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

Releases Hidi #1050

Merged
merged 15 commits into from
Oct 25, 2022
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
8 changes: 4 additions & 4 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
paths: ['src/Microsoft.OpenApi.Hidi/**', '.github/workflows/**']
env:
REGISTRY: msgraphprod.azurecr.io
IMAGE_NAME: public/hidi
IMAGE_NAME: public/openapi/hidi
jobs:
push_to_registry:
environment:
Expand All @@ -17,7 +17,7 @@ jobs:
- name: Check out the repo
uses: actions/checkout@v3
- name: Login to GitHub package feed
uses: docker/login-action@v2.0.0
uses: docker/login-action@v2.1.0
with:
username: ${{ secrets.ACR_USERNAME }}
password: ${{ secrets.ACR_PASSWORD }}
Expand All @@ -30,13 +30,13 @@ jobs:
id: getversion
- name: Push to GitHub Packages - Nightly
if: ${{ github.ref == 'refs/heads/vnext' }}
uses: docker/build-push-action@v3.1.1
uses: docker/build-push-action@v3.2.0
with:
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:nightly
- name: Push to GitHub Packages - Release
if: ${{ github.ref == 'refs/heads/master' }}
uses: docker/build-push-action@v3.1.1
uses: docker/build-push-action@v3.2.0
with:
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest,${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.getversion.outputs.version }}
6 changes: 3 additions & 3 deletions src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<PackageId>Microsoft.OpenApi.Hidi</PackageId>
<ToolCommandName>hidi</ToolCommandName>
<PackageOutputPath>./../../artifacts</PackageOutputPath>
<Version>1.1.0-preview2</Version>
<Version>1.1.0-preview3</Version>
<Description>OpenAPI.NET CLI tool for slicing OpenAPI documents</Description>
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
<PackageTags>OpenAPI .NET</PackageTags>
Expand All @@ -42,8 +42,8 @@
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="6.0.0" />
<PackageReference Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
<PackageReference Include="Microsoft.OData.Edm" Version="7.12.3" />
<PackageReference Include="Microsoft.OpenApi.OData" Version="1.2.0-preview4" />
<PackageReference Include="Microsoft.OData.Edm" Version="7.12.4" />
<PackageReference Include="Microsoft.OpenApi.OData" Version="1.2.0-preview5" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ internal static string GetYamlCompatibleString(this string input)
if (decimal.TryParse(input, NumberStyles.Float, CultureInfo.InvariantCulture, out var _) ||
IsHexadecimalNotation(input) ||
bool.TryParse(input, out var _) ||
DateTime.TryParse(input, out var _))
DateTime.TryParse(input, CultureInfo.InvariantCulture, DateTimeStyles.None, out var _))
{
return $"'{input}'";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
<PackageReference Include="FluentAssertions" Version="6.7.0">
<PackageReference Include="FluentAssertions" Version="6.8.0">
</PackageReference>
<PackageReference Include="Newtonsoft.Json" Version="13.0.2-beta1">
</PackageReference>
Expand Down
4 changes: 2 additions & 2 deletions test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.7.0" />
<PackageReference Include="FluentAssertions" Version="6.8.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
<PackageReference Include="Moq" Version="4.18.2" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="SharpYaml" Version="2.1.0" />
<PackageReference Include="Verify.Xunit" Version="17.10.2" />
<PackageReference Include="Verify.Xunit" Version="18.0.0" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PrivateAssets>all</PrivateAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,5 +148,26 @@ public void WriteStringWithNewlineCharactersInArrayAsYamlWorks(string input, str
// Assert
actual.Should().Be(expected);
}

[Theory]
[InlineData("1.8.0", " '1.8.0'", "en-US")]
[InlineData("1.8.0", " '1.8.0'", "en-GB")]
[InlineData("1.13.0", " '1.13.0'", "en-US")]
[InlineData("1.13.0", " '1.13.0'", "en-GB")]
public void WriteStringAsYamlDoesNotDependOnSystemCulture(string input, string expected, string culture)
{
CultureInfo.CurrentCulture = CultureInfo.GetCultureInfo(culture);

// Arrange
var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
var writer = new OpenApiYamlWriter(outputStringWriter);

// Act
writer.WriteValue(input);
var actual = outputStringWriter.GetStringBuilder().ToString();

// Assert
actual.Should().Be(expected);
}
}
}