Skip to content

Commit

Permalink
v10.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
RicoSuter committed Apr 8, 2021
1 parent 3a1a9b7 commit 0634bb7
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<TargetFrameworks>netstandard1.3;netstandard2.0;net451</TargetFrameworks>
<Description>JSON Schema reader, generator and validator for .NET</Description>
<Version>10.4.0</Version>
<Version>10.4.1</Version>
<PackageTags>json schema validation generator .net</PackageTags>
<Copyright>Copyright © Rico Suter, 2020</Copyright>
<PackageProjectUrl>http://NJsonSchema.org</PackageProjectUrl>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<TargetFrameworks>netstandard1.3;netstandard2.0;net451</TargetFrameworks>
<Description>JSON Schema reader, generator and validator for .NET</Description>
<Version>10.4.0</Version>
<Version>10.4.1</Version>
<PackageTags>json schema validation generator .net</PackageTags>
<Copyright>Copyright © Rico Suter, 2020</Copyright>
<PackageProjectUrl>http://NJsonSchema.org</PackageProjectUrl>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<TargetFrameworks>netstandard1.3;netstandard2.0;net451</TargetFrameworks>
<Description>JSON Schema reader, generator and validator for .NET</Description>
<Version>10.4.0</Version>
<Version>10.4.1</Version>
<PackageTags>json schema validation generator .net</PackageTags>
<Copyright>Copyright © Rico Suter, 2020</Copyright>
<PackageProjectUrl>http://NJsonSchema.org</PackageProjectUrl>
Expand Down
2 changes: 1 addition & 1 deletion src/NJsonSchema.Yaml/NJsonSchema.Yaml.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<TargetFrameworks>netstandard1.3;netstandard2.0;net45</TargetFrameworks>
<Description>JSON Schema reader, generator and validator for .NET</Description>
<Version>10.4.0</Version>
<Version>10.4.1</Version>
<PackageTags>json schema validation generator .net</PackageTags>
<Copyright>Copyright © Rico Suter, 2020</Copyright>
<PackageProjectUrl>http://NJsonSchema.org</PackageProjectUrl>
Expand Down
9 changes: 4 additions & 5 deletions src/NJsonSchema/Generation/JsonSchemaResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

using System;
using System.Collections.Generic;
using NJsonSchema.Generation;

namespace NJsonSchema.Generation
{
Expand All @@ -33,7 +32,7 @@ public JsonSchemaResolver(object rootObject, JsonSchemaGeneratorSettings setting
/// <returns><c>true</c> when the mapping exists.</returns>
public bool HasSchema(Type type, bool isIntegerEnumeration)
{
return _mappings.ContainsKey(GetKey(type, isIntegerEnumeration));
return _mappings.ContainsKey(GetTypeKey(type, isIntegerEnumeration));
}

/// <summary>Gets the schema for a given type.</summary>
Expand All @@ -42,7 +41,7 @@ public bool HasSchema(Type type, bool isIntegerEnumeration)
/// <returns>The schema.</returns>
public JsonSchema GetSchema(Type type, bool isIntegerEnumeration)
{
return _mappings[GetKey(type, isIntegerEnumeration)];
return _mappings[GetTypeKey(type, isIntegerEnumeration)];
}

/// <summary>Adds a schema to type mapping.</summary>
Expand All @@ -62,7 +61,7 @@ public virtual void AddSchema(Type type, bool isIntegerEnumeration, JsonSchema s
AppendSchema(schema, _settings.SchemaNameGenerator.Generate(type));
}

_mappings.Add(GetKey(type, isIntegerEnumeration), schema);
_mappings.Add(GetTypeKey(type, isIntegerEnumeration), schema);
}

/// <summary>Gets all the schemas.</summary>
Expand All @@ -74,7 +73,7 @@ public virtual void AddSchema(Type type, bool isIntegerEnumeration, JsonSchema s
/// <param name="type">The type.</param>
/// <param name="isIntegerEnum">Specifies whether the type is an integer enum.</param>
/// <returns>The mapping key.</returns>
protected virtual string GetKey(Type type, bool isIntegerEnum)
protected virtual string GetTypeKey(Type type, bool isIntegerEnum)
{
return type.FullName + (isIntegerEnum ? ":Integer" : string.Empty);
}
Expand Down
2 changes: 1 addition & 1 deletion src/NJsonSchema/NJsonSchema.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<TargetFrameworks>netstandard1.0;netstandard2.0;net40;net45</TargetFrameworks>
<Description>JSON Schema reader, generator and validator for .NET</Description>
<Version>10.4.0</Version>
<Version>10.4.1</Version>
<PackageTags>json schema validation generator .net</PackageTags>
<Copyright>Copyright © Rico Suter, 2020</Copyright>
<PackageProjectUrl>http://NJsonSchema.org</PackageProjectUrl>
Expand Down

0 comments on commit 0634bb7

Please sign in to comment.