-
-
Notifications
You must be signed in to change notification settings - Fork 536
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
46 changed files
with
277 additions
and
221 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,44 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<VersionPrefix>11.0.0</VersionPrefix> | ||
|
||
<Authors>Rico Suter</Authors> | ||
<Copyright>Copyright © Rico Suter, 2022</Copyright> | ||
|
||
<SignAssembly>True</SignAssembly> | ||
<AssemblyOriginatorKeyFile>../NJsonSchema.snk</AssemblyOriginatorKeyFile> | ||
|
||
<PackageTags>json schema validation generator .net</PackageTags> | ||
<PackageProjectUrl>http://NJsonSchema.org</PackageProjectUrl> | ||
<Description>JSON Schema reader, generator and validator for .NET</Description> | ||
<PackageIcon>NuGetIcon.png</PackageIcon> | ||
<PackageLicenseExpression>MIT</PackageLicenseExpression> | ||
<Company /> | ||
<PublishRepositoryUrl>true</PublishRepositoryUrl> | ||
<EmbedUntrackedSources>true</EmbedUntrackedSources> | ||
<IncludeSymbols>true</IncludeSymbols> | ||
<SymbolPackageFormat>snupkg</SymbolPackageFormat> | ||
<DebugSymbols>True</DebugSymbols> | ||
|
||
<LangVersion>latest</LangVersion> | ||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors> | ||
<Nullable>enable</Nullable> | ||
|
||
<UseArtifactsOutput>true</UseArtifactsOutput> | ||
|
||
</PropertyGroup> | ||
<PropertyGroup> | ||
<VersionPrefix>11.0.0</VersionPrefix> | ||
|
||
<Authors>Rico Suter</Authors> | ||
<Copyright>Copyright © Rico Suter, 2022</Copyright> | ||
|
||
<SignAssembly>True</SignAssembly> | ||
<AssemblyOriginatorKeyFile>../NJsonSchema.snk</AssemblyOriginatorKeyFile> | ||
|
||
<PackageTags>json schema validation generator .net</PackageTags> | ||
<PackageProjectUrl>http://NJsonSchema.org</PackageProjectUrl> | ||
<Description>JSON Schema reader, generator and validator for .NET</Description> | ||
<PackageIcon>NuGetIcon.png</PackageIcon> | ||
<PackageLicenseExpression>MIT</PackageLicenseExpression> | ||
<Company /> | ||
<PublishRepositoryUrl>true</PublishRepositoryUrl> | ||
<EmbedUntrackedSources>true</EmbedUntrackedSources> | ||
<IncludeSymbols>true</IncludeSymbols> | ||
<SymbolPackageFormat>snupkg</SymbolPackageFormat> | ||
<DebugSymbols>True</DebugSymbols> | ||
|
||
<LangVersion>latest</LangVersion> | ||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors> | ||
<Nullable>enable</Nullable> | ||
|
||
<UseArtifactsOutput>true</UseArtifactsOutput> | ||
|
||
</PropertyGroup> | ||
|
||
<PropertyGroup Label="Analyzer settings"> | ||
<EnableNETAnalyzers>true</EnableNETAnalyzers> | ||
<AnalysisLevel>latest-Recommended</AnalysisLevel> | ||
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild> | ||
<!-- | ||
[CA1200] Avoid using cref tags with a prefix | ||
[CA1510] Use 'ArgumentNullException.ThrowIfNull' instead of explicitly throwing a new exception instance | ||
[CA1716] rename parameter property so that it no longer conflicts with the reserved language keyword | ||
[CA1720] Identifier 'xxx' contains type name | ||
--> | ||
<NoWarn>$(NoWarn);CA1200;CA1510;CA1716;CA1720</NoWarn> | ||
</PropertyGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
// <author>Rico Suter, [email protected]</author> | ||
//----------------------------------------------------------------------- | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using NJsonSchema.CodeGeneration.Models; | ||
|
@@ -145,7 +146,7 @@ public ClassTemplateModel(string typeName, CSharpGeneratorSettings settings, | |
_schema?.InheritsSchema(_resolver.ExceptionSchema) == true; | ||
|
||
/// <summary>Gets a value indicating whether to use the DateFormatConverter.</summary> | ||
public bool UseDateFormatConverter => _settings.DateType.StartsWith("System.DateTime"); | ||
public bool UseDateFormatConverter => _settings.DateType.StartsWith("System.DateTime", StringComparison.Ordinal); | ||
|
||
/// <summary>Gets or sets the access modifier of generated classes and interfaces.</summary> | ||
public string TypeAccessModifier => _settings.TypeAccessModifier; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
// <author>Rico Suter, [email protected]</author> | ||
//----------------------------------------------------------------------- | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text.RegularExpressions; | ||
|
@@ -69,7 +70,7 @@ public static IEnumerable<CodeArtifact> OrderByBaseDependency(this IEnumerable<C | |
} | ||
|
||
// resolve arrays | ||
if (baseTypeName.EndsWith("[]")) | ||
if (baseTypeName.EndsWith("[]", StringComparison.Ordinal)) | ||
{ | ||
return baseTypeName.Substring(0, baseTypeName.Length - 2); | ||
} | ||
|
Oops, something went wrong.