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

replace decimal.Parse with double.Parse to include support for parsing values exceeding range of decimal #1107

Closed
wants to merge 83 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
3046861
Bump docker/login-action from 2.0.0 to 2.1.0
dependabot[bot] Oct 17, 2022
c54add2
Bump docker/build-push-action from 3.1.1 to 3.2.0
dependabot[bot] Oct 17, 2022
319462e
Bump Microsoft.OData.Edm from 7.12.3 to 7.12.4 (#1043)
dependabot[bot] Oct 19, 2022
cb80a1e
fix: invariant culture for version field
Ne4to Sep 19, 2022
5837b31
- renames hidi in accordance to naming policy of MCR
baywet Oct 7, 2022
8774653
Upgrade conversion lib. ver.; update Hidi version
irvinesunday Oct 24, 2022
cf34fa3
Bump Verify.Xunit from 17.10.2 to 18.0.0
dependabot[bot] Oct 24, 2022
cf7faec
Bump FluentAssertions from 6.7.0 to 6.8.0
dependabot[bot] Oct 24, 2022
d14fc9f
Bump Microsoft.OData.Edm from 7.12.4 to 7.12.5
dependabot[bot] Oct 25, 2022
5b871cf
Bump Microsoft.Windows.Compatibility from 6.0.0 to 6.0.1
dependabot[bot] Oct 28, 2022
69e7b85
Bump Verify.Xunit from 18.0.0 to 18.1.1
dependabot[bot] Oct 28, 2022
3fc51be
Bump coverlet.collector from 3.1.2 to 3.2.0
dependabot[bot] Oct 31, 2022
ba9a51f
Bump Verify.Xunit from 18.1.1 to 18.2.0
dependabot[bot] Oct 31, 2022
200e735
Bump mathieudutour/github-tag-action from 6.0 to 6.1
dependabot[bot] Oct 31, 2022
753f565
Bump Verify.Xunit from 18.2.0 to 18.3.0
dependabot[bot] Nov 2, 2022
b908561
Bump Microsoft.OpenApi.OData from 1.2.0-preview5 to 1.2.0-preview6
dependabot[bot] Nov 2, 2022
f44ef7d
Remove return statement to eliminate NullReference exception
MaggieKimani1 Nov 3, 2022
81030e8
Bump Microsoft.NET.Test.Sdk from 17.3.2 to 17.4.0
dependabot[bot] Nov 7, 2022
b36dcae
Bump Microsoft.Extensions.Logging.Abstractions from 6.0.2 to 7.0.0
dependabot[bot] Nov 7, 2022
d9de1ec
Bump Microsoft.Windows.Compatibility from 6.0.1 to 7.0.0
dependabot[bot] Nov 7, 2022
978fa4d
Bump Verify.Xunit from 18.3.0 to 18.4.0
dependabot[bot] Nov 7, 2022
c724f11
Bump Microsoft.Extensions.Logging from 6.0.0 to 7.0.0
dependabot[bot] Nov 7, 2022
0270306
Bump Microsoft.Extensions.Logging.Console from 6.0.0 to 7.0.0
dependabot[bot] Nov 7, 2022
2adce89
Bump Microsoft.Extensions.Logging.Debug from 6.0.0 to 7.0.0
dependabot[bot] Nov 7, 2022
926a606
Configure CSDL via settings
darrelmiller May 11, 2022
7613a72
Add a settingsFile parameter that allows one to input a path to the s…
MaggieKimani1 Nov 7, 2022
d572722
Add test
MaggieKimani1 Nov 7, 2022
fbd8f16
Use backslash in filePath
MaggieKimani1 Nov 7, 2022
3dff273
Clean up tests
MaggieKimani1 Nov 7, 2022
2f4459b
Address PR feedback
MaggieKimani1 Nov 8, 2022
ed843e6
Add conversion setting
MaggieKimani1 Nov 21, 2022
9e67b91
Bump Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers
dependabot[bot] Nov 9, 2022
3348018
Bump Verify.Xunit from 18.4.0 to 19.0.0
dependabot[bot] Nov 9, 2022
0029813
- upgrades to dotnet 7
baywet Nov 8, 2022
e3caf21
- adds dotnet 6 since ESRP requires it
baywet Nov 10, 2022
7b2c65e
- switches to dotnet 2 to fix ESRP
baywet Nov 10, 2022
2b2f46d
Bump Verify.Xunit from 19.0.0 to 19.1.0
dependabot[bot] Nov 14, 2022
a63499b
merge conflicts
Afsalmc Dec 14, 2022
f495f84
merge conflicts
Afsalmc Dec 14, 2022
afcca13
merge conflicts
Afsalmc Dec 14, 2022
bd827ac
Update public API
MaggieKimani1 Nov 18, 2022
efd904a
Move variable declaration closer to assignment
MaggieKimani1 Nov 18, 2022
9a43419
Bump up lib versions from preview to stable releases
MaggieKimani1 Nov 21, 2022
e9b88c7
Add condition to ensure collectionFormat is only written out if schem…
MaggieKimani1 Nov 22, 2022
e3e730b
Update verify snapshots
MaggieKimani1 Nov 22, 2022
b40384c
Address PR feedback
MaggieKimani1 Nov 22, 2022
2114c90
Bump Newtonsoft.Json from 13.0.1 to 13.0.2 (#1091)
dependabot[bot] Nov 25, 2022
c3894a4
Use backing property to check whether user has explicitly set style, …
MaggieKimani1 Nov 23, 2022
49318b1
merge conflicts
Afsalmc Dec 14, 2022
63687b1
Clean up tests
MaggieKimani1 Nov 23, 2022
e7822a2
Update verifier snapshot
MaggieKimani1 Nov 23, 2022
590830e
Delete verifier
MaggieKimani1 Nov 23, 2022
794386a
Revert change
MaggieKimani1 Nov 23, 2022
cf43c64
Remove test
MaggieKimani1 Nov 25, 2022
7965b01
Remove verified text
MaggieKimani1 Nov 25, 2022
e5dd6ba
Add verified text
MaggieKimani1 Nov 25, 2022
943b7b8
Return test
MaggieKimani1 Nov 25, 2022
a4f0579
Delete verified text
MaggieKimani1 Nov 25, 2022
2c27d78
Add verified text
MaggieKimani1 Nov 25, 2022
e7e4e93
Revert change
MaggieKimani1 Nov 25, 2022
a6b5d20
Remove static modifier as it creates static dependency of the documen…
MaggieKimani1 Nov 28, 2022
6858f4c
Update verified snapshots
MaggieKimani1 Nov 28, 2022
628ee2c
Bump Verify.Xunit from 19.1.0 to 19.3.0
dependabot[bot] Nov 29, 2022
8ceed9e
Bump Moq from 4.18.2 to 4.18.3
dependabot[bot] Dec 5, 2022
cf58a23
- adds missing validation methods
baywet Dec 5, 2022
9e1a91c
- reorders public api definition
baywet Dec 5, 2022
992a8e7
- adds coverage dependencies
baywet Nov 29, 2022
1dbcb00
- adds sonarcloud workflow definition
baywet Nov 29, 2022
e7e3200
- switches to windows agent because of workbench projectg
baywet Nov 29, 2022
f53a031
Fixes bug where the schema copy constructor would run into a stack ov…
MaggieKimani1 Dec 6, 2022
f06e10c
Add test to validate
MaggieKimani1 Dec 6, 2022
96f1bdc
Add test assertions
MaggieKimani1 Dec 6, 2022
93a4c1c
Add OpenApiTypeMapper that maps .NET primitive types to the OpenAPI s…
MaggieKimani1 Dec 1, 2022
f7ea11b
Add test and update public API interface
MaggieKimani1 Dec 1, 2022
1d8e3ca
Map OpenApiSchema types to simple type and add test to validate
MaggieKimani1 Dec 6, 2022
ffa4cf8
Update Uri format
MaggieKimani1 Dec 6, 2022
c9d790f
Update type and format to lowercase
MaggieKimani1 Dec 6, 2022
ad3d267
Fix failing tests
MaggieKimani1 Dec 6, 2022
32d621e
Serialize `OpenApiDate` values properly to short date (#1102)
irvinesunday Dec 8, 2022
d624cd5
check Extensions object for null
quanterion Dec 9, 2022
698f7e8
replace decimal.Parse with double.Parse to include support for parsin…
Afsalmc Dec 13, 2022
f2c3f93
remove unnecessary changes
Afsalmc Dec 14, 2022
9ca8d23
code cleanup
Afsalmc Dec 15, 2022
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
9 changes: 7 additions & 2 deletions .azure-pipelines/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,14 @@ stages:
- job: build
steps:
- task: UseDotNet@2
displayName: 'Use .NET 6'
displayName: 'Use .NET 2' # needed for ESRP signing
inputs:
version: 6.x
version: 2.x

- task: UseDotNet@2
displayName: 'Use .NET 7'
inputs:
version: 7.x

- task: PoliCheck@1
displayName: 'Run PoliCheck "/src"'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
dotnet-version: 7.0.x

- name: Data gatherer
id: data_gatherer
Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:
- if: steps.conditionals_handler.outputs.is_default_branch == 'true'
name: Bump GH tag
id: tag_generator
uses: mathieudutour/github-tag-action@v6.0
uses: mathieudutour/github-tag-action@v6.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
default_bump: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
dotnet-version: 7.0.x

- name: Initialize CodeQL
id: init_codeql
Expand Down
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 }}
78 changes: 78 additions & 0 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Sonarcloud
on:
workflow_dispatch:
push:
branches:
- main
paths-ignore: ['.vscode/**']
pull_request:
types: [opened, synchronize, reopened]
paths-ignore: ['.vscode/**']

env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

jobs:
checksecret:
name: check if SONAR_TOKEN is set in github secrets
runs-on: ubuntu-latest
outputs:
is_SONAR_TOKEN_set: ${{ steps.checksecret_job.outputs.is_SONAR_TOKEN_set }}
steps:
- name: Check whether unity activation requests should be done
id: checksecret_job
run: |
echo "is_SONAR_TOKEN_set=${{ env.SONAR_TOKEN != '' }}" >> $GITHUB_OUTPUT
build:
needs: [checksecret]
if: needs.checksecret.outputs.is_SONAR_TOKEN_set == 'true'
name: Build
runs-on: windows-latest
steps:
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: 11
- name: Setup .NET 5 # At the moment the scanner requires dotnet 5 https://www.nuget.org/packages/dotnet-sonarscanner
uses: actions/setup-dotnet@v3
with:
dotnet-version: 5.0.x
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Cache SonarCloud packages
uses: actions/cache@v3
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache SonarCloud scanner
id: cache-sonar-scanner
uses: actions/cache@v3
with:
path: ./.sonar/scanner
key: ${{ runner.os }}-sonar-scanner
restore-keys: ${{ runner.os }}-sonar-scanner
- name: Install SonarCloud scanner
if: steps.cache-sonar-scanner.outputs.cache-hit != 'true'
shell: pwsh
run: |
New-Item -Path ./.sonar/scanner -ItemType Directory
dotnet tool update dotnet-sonarscanner --tool-path ./.sonar/scanner
- name: Build and analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
CollectCoverage: true
CoverletOutputFormat: 'opencover' # https://github.com/microsoft/vstest/issues/4014#issuecomment-1307913682
shell: pwsh
run: |
./.sonar/scanner/dotnet-sonarscanner begin /k:"microsoft_OpenAPI.NET" /o:"microsoft" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.opencover.reportsPaths="test/**/coverage.opencover.xml"
dotnet workload restore
dotnet build
dotnet test Microsoft.OpenApi.sln --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
./.sonar/scanner/dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/src/Microsoft.OpenApi.Hidi/bin/Debug/net6.0/Microsoft.OpenApi.Hidi.dll",
"program": "${workspaceFolder}/src/Microsoft.OpenApi.Hidi/bin/Debug/net7.0/Microsoft.OpenApi.Hidi.dll",
"args": [],
"cwd": "${workspaceFolder}/src/Microsoft.OpenApi.Hidi",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build-env
WORKDIR /app

COPY ./src ./hidi/src
WORKDIR /app/hidi
RUN dotnet publish ./src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj -c Release

FROM mcr.microsoft.com/dotnet/runtime:6.0 as runtime
FROM mcr.microsoft.com/dotnet/runtime:7.0 as runtime
WORKDIR /app

COPY --from=build-env /app/hidi/src/Microsoft.OpenApi.Hidi/bin/Release/net6.0 ./
COPY --from=build-env /app/hidi/src/Microsoft.OpenApi.Hidi/bin/Release/net7.0 ./

VOLUME /app/output
VOLUME /app/openapi.yml
Expand Down
25 changes: 17 additions & 8 deletions src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<LangVersion>9.0</LangVersion>
<PackAsTool>true</PackAsTool>
<PackageIconUrl>http://go.microsoft.com/fwlink/?LinkID=288890</PackageIconUrl>
Expand All @@ -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</Version>
<Description>OpenAPI.NET CLI tool for slicing OpenAPI documents</Description>
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
<PackageTags>OpenAPI .NET</PackageTags>
Expand All @@ -37,18 +37,27 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.2" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="7.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.5" />
<PackageReference Include="Microsoft.OpenApi.OData" Version="1.2.0-preview7" />
<PackageReference Include="System.CommandLine.Hosting" Version="0.4.0-alpha.22272.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Microsoft.OpenApi.Readers\Microsoft.OpenApi.Readers.csproj" />
<ProjectReference Include="..\Microsoft.OpenApi\Microsoft.OpenApi.csproj" />
</ItemGroup>

<!-- Make internals available for Unit Testing -->
<ItemGroup>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>Microsoft.OpenApi.Hidi.Tests</_Parameter1>
</AssemblyAttribute>
</ItemGroup>
<!-- End Unit test Internals -->

</Project>
30 changes: 15 additions & 15 deletions src/Microsoft.OpenApi.Hidi/OpenApiService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ CancellationToken cancellationToken
{
stream = await GetStream(openapi, logger, cancellationToken);

using (logger.BeginScope($"Parse OpenAPI: {openapi}",openapi))
using (logger.BeginScope($"Parse OpenAPI: {openapi}", openapi))
{
stopwatch.Restart();
var result = await new OpenApiStreamReader(new OpenApiReaderSettings
Expand Down Expand Up @@ -245,8 +245,8 @@ private static Stream ApplyFilter(string csdl, string entitySetOrSingleton, XslC
/// Implementation of the validate command
/// </summary>
public static async Task ValidateOpenApiDocument(
string openapi,
LogLevel logLevel,
string openapi,
LogLevel logLevel,
CancellationToken cancellationToken)
{
using var loggerFactory = Logger.ConfigureLogger(logLevel);
Expand All @@ -270,7 +270,7 @@ public static async Task ValidateOpenApiDocument(
RuleSet = ValidationRuleSet.GetDefaultRuleSet()
}
).ReadAsync(stream);

logger.LogTrace("{timestamp}ms: Completed parsing.", stopwatch.ElapsedMilliseconds);

document = result.OpenApiDocument;
Expand All @@ -284,7 +284,7 @@ public static async Task ValidateOpenApiDocument(
logger.LogError(error.ToString());
}
}
}
}
stopwatch.Stop();
}

Expand Down Expand Up @@ -322,7 +322,7 @@ public static async Task<OpenApiDocument> ConvertCsdlToOpenApi(Stream csdl)
DeclarePathParametersOnPathItem = true,
EnableKeyAsSegment = true,
EnableOperationId = true,
ErrorResponsesAsDefault = false,
ErrorResponsesAsDefault = false,
PrefixEntityTypeNameBeforeKey = true,
TagDepth = 2,
EnablePagination = true,
Expand Down Expand Up @@ -358,7 +358,7 @@ public static OpenApiDocument FixReferences(OpenApiDocument document)

return doc;
}

/// <summary>
/// Takes in a file stream, parses the stream into a JsonDocument and gets a list of paths and Http methods
/// </summary>
Expand All @@ -381,13 +381,13 @@ public static Dictionary<string, List<string>> ParseJsonCollectionFile(Stream st
private static Dictionary<string, List<string>> EnumerateJsonDocument(JsonElement itemElement, Dictionary<string, List<string>> paths)
{
var itemsArray = itemElement.GetProperty("item");

foreach (var item in itemsArray.EnumerateArray())
{
if(item.ValueKind == JsonValueKind.Object)
if (item.ValueKind == JsonValueKind.Object)
{
if(item.TryGetProperty("request", out var request))
{
if (item.TryGetProperty("request", out var request))
{
// Fetch list of methods and urls from collection, store them in a dictionary
var path = request.GetProperty("url").GetProperty("raw").ToString();
var method = request.GetProperty("method").ToString();
Expand All @@ -399,11 +399,11 @@ private static Dictionary<string, List<string>> EnumerateJsonDocument(JsonElemen
{
paths[path].Add(method);
}
}
else
{
}
else
{
EnumerateJsonDocument(item, paths);
}
}
}
else
{
Expand Down
7 changes: 4 additions & 3 deletions src/Microsoft.OpenApi.Hidi/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ static class Program
{
static async Task Main(string[] args)
{
var rootCommand = new RootCommand() {
var rootCommand = new RootCommand()
{
};

// command option parameters and aliases
Expand Down Expand Up @@ -65,7 +66,7 @@ static async Task Main(string[] args)
logLevelOption
};

validateCommand.Handler = new ValidateCommandHandler
validateCommand.Handler = new ValidateCommandHandler
{
DescriptionOption = descriptionOption,
LogLevelOption = logLevelOption
Expand All @@ -81,7 +82,7 @@ static async Task Main(string[] args)
versionOption,
formatOption,
terseOutputOption,
logLevelOption,
logLevelOption,
filterByOperationIdsOption,
filterByTagsOption,
filterByCollectionOption,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<Company>Microsoft</Company>
<Title>Microsoft.OpenApi.Readers</Title>
<PackageId>Microsoft.OpenApi.Readers</PackageId>
<Version>1.4.4-preview1</Version>
<Version>1.4.5</Version>
<Description>OpenAPI.NET Readers for JSON and YAML documents</Description>
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
<PackageTags>OpenAPI .NET</PackageTags>
Expand Down
8 changes: 4 additions & 4 deletions src/Microsoft.OpenApi.Readers/V2/OpenApiHeaderDeserializer.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.

using System;
Expand Down Expand Up @@ -57,7 +57,7 @@ internal static partial class OpenApiV2Deserializer
{
"maximum", (o, n) =>
{
GetOrCreateSchema(o).Maximum = decimal.Parse(n.GetScalarValue(), CultureInfo.InvariantCulture);
GetOrCreateSchema(o).Maximum = double.Parse(n.GetScalarValue(), CultureInfo.InvariantCulture);
}
},
{
Expand All @@ -69,7 +69,7 @@ internal static partial class OpenApiV2Deserializer
{
"minimum", (o, n) =>
{
GetOrCreateSchema(o).Minimum = decimal.Parse(n.GetScalarValue(), CultureInfo.InvariantCulture);
GetOrCreateSchema(o).Minimum = double.Parse(n.GetScalarValue(), CultureInfo.InvariantCulture);
}
},
{
Expand Down Expand Up @@ -117,7 +117,7 @@ internal static partial class OpenApiV2Deserializer
{
"multipleOf", (o, n) =>
{
GetOrCreateSchema(o).MultipleOf = decimal.Parse(n.GetScalarValue(), CultureInfo.InvariantCulture);
GetOrCreateSchema(o).MultipleOf = double.Parse(n.GetScalarValue(), CultureInfo.InvariantCulture);
}
},
{
Expand Down
Loading