Skip to content

Commit

Permalink
Bump OSS/markdowndeep from fae2c82 to b5827a7 (#260)
Browse files Browse the repository at this point in the history
* Add support for processing Edm.Decimal data type (#257)

* Bump NUnit from 4.0.1 to 4.1.0 (#259)

Bumps [NUnit](https://github.com/nunit/nunit) from 4.0.1 to 4.1.0.
- [Release notes](https://github.com/nunit/nunit/releases)
- [Changelog](https://github.com/nunit/nunit/blob/master/CHANGES.md)
- [Commits](nunit/nunit@v4.0.1...4.1.0)

---
updated-dependencies:
- dependency-name: NUnit
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump OSS/markdowndeep from `fae2c82` to `b5827a7`

Bumps [OSS/markdowndeep](https://github.com/OneDrive/markdowndeep) from `fae2c82` to `b5827a7`.
- [Commits](OneDrive/markdowndeep@fae2c82...b5827a7)

---
updated-dependencies:
- dependency-name: OSS/markdowndeep
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Millicent Achieng <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
dependabot[bot] and millicentachieng authored Feb 27, 2024
1 parent d3efe01 commit eba5b65
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="NUnit" Version="4.0.1" />
<PackageReference Include="NUnit" Version="4.1.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="NUnit" Version="4.0.1" />
<PackageReference Include="NUnit" Version="4.1.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="System.ComponentModel.Composition" Version="8.0.0" />
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
Expand Down
1 change: 1 addition & 0 deletions ApiDoctor.Validation/ExtensionMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,7 @@ public static SimpleDataType ParseSimpleTypeString(string lowercaseString)
case "single":
simpleType = SimpleDataType.Single;
break;
case "decimal":
case "double":
simpleType = SimpleDataType.Double;
break;
Expand Down
1 change: 1 addition & 0 deletions ApiDoctor.Validation/OData/ExtensionMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public static class ExtensionMethods
{ "Edm.DateTimeOffset", SimpleDataType.DateTimeOffset },
{ "Edm.Duration", SimpleDataType.Duration },
{ "Edm.Double", SimpleDataType.Double },
{ "Edm.Decimal", SimpleDataType.Decimal },
{ "Edm.Float", SimpleDataType.Float },
{ "Edm.Guid", SimpleDataType.Guid },
{ "Edm.TimeOfDay", SimpleDataType.TimeOfDay},
Expand Down
15 changes: 14 additions & 1 deletion ApiDoctor.Validation/ParameterDataType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -297,10 +297,12 @@ internal bool JsonLooksDifferentFrom(ParameterDataType type)
type.Type != SimpleDataType.Int16 &&
type.Type != SimpleDataType.Int32 &&
type.Type != SimpleDataType.Int64;
case SimpleDataType.Decimal:
case SimpleDataType.Double:
case SimpleDataType.Float:
case SimpleDataType.Single:
return
type.Type != SimpleDataType.Decimal &&
type.Type != SimpleDataType.Double &&
type.Type != SimpleDataType.Float &&
type.Type != SimpleDataType.Single;
Expand Down Expand Up @@ -334,6 +336,7 @@ internal bool IsLessSpecificThan(ParameterDataType type)
float
-> double
-> decimal
object
-> complex type
Expand Down Expand Up @@ -374,7 +377,11 @@ We should never allow something from one tree to be considered less specific tha
{
return true;
}
else if (this.Type == SimpleDataType.Double && (type.Type == SimpleDataType.Float))
else if (this.Type == SimpleDataType.Decimal && (type.Type == SimpleDataType.Double || type.Type == SimpleDataType.Float))
{
return true;
}
else if (this.Type == SimpleDataType.Double && type.Type == SimpleDataType.Float)
{
return true;
}
Expand Down Expand Up @@ -418,6 +425,7 @@ static ParameterDataType()
GenericObject = new ParameterDataType(SimpleDataType.Object);
GenericCollection = new ParameterDataType(SimpleDataType.Object, true);
Boolean = new ParameterDataType(SimpleDataType.Boolean);
Decimal = new ParameterDataType(SimpleDataType.Decimal);
Double = new ParameterDataType(SimpleDataType.Double);
Float = new ParameterDataType(SimpleDataType.Float);
Guid = new ParameterDataType(SimpleDataType.Guid);
Expand All @@ -440,6 +448,10 @@ public static ParameterDataType GenericCollection
get; private set;
}
public static ParameterDataType Boolean
{
get; private set;
}
public static ParameterDataType Decimal
{
get; private set;
}
Expand Down Expand Up @@ -493,6 +505,7 @@ public enum SimpleDataType

Float,
Double,
Decimal,

Date,
DateTimeOffset,
Expand Down
1 change: 1 addition & 0 deletions ApiDoctor.Validation/ParameterDefinition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ public JToken ToExampleJToken()
return new JValue(DateTime.Now.ToString("yyyy-MM-dd"));
case SimpleDataType.DateTimeOffset:
return new JValue(DateTime.Now.ToString("yyyy-MM-ddTHH:mm:ss.fffZ"));
case SimpleDataType.Decimal:
case SimpleDataType.Double:
case SimpleDataType.Float:
case SimpleDataType.Single:
Expand Down

0 comments on commit eba5b65

Please sign in to comment.