Merge pull request #7 from Microsoft/sarif-refactor

Sarif refactor
This commit is contained in:
Larry Golding 2017-09-06 15:40:07 -07:00 коммит произвёл GitHub
Родитель fc5f72e957 e56e292ce0
Коммит b26ba47c75
35 изменённых файлов: 1358 добавлений и 1252 удалений

Просмотреть файл

@ -13,6 +13,10 @@
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
@ -49,10 +53,6 @@
<HintPath>..\packages\Microsoft.CodeAnalysis.Workspaces.Common.1.1.1\lib\net45\Microsoft.CodeAnalysis.Workspaces.Desktop.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Collections.Immutable, Version=1.1.37.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Collections.Immutable.1.1.37\lib\dotnet\System.Collections.Immutable.dll</HintPath>

Просмотреть файл

@ -7,7 +7,7 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTitle("JSON Schema To .NET Library")]
[assembly: AssemblyDescription("Classes for generating .NET classes from a JSON Schema")]
[assembly: InternalsVisibleTo("Microsoft.Json.Schema.ToDotNet.UnitTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d3eec1f09c636920d12f3b3be04b7b80613923d6d38a7a38c0d2fa3de610cba46e3ce82e04fd5a1dc2daf5545335a46d21611b9cffaf3cea13095f3e6d6716e31b39158d10054eeee200dea5e850887dd41d615237ecbe36d4f893deb0c7cd8452ba3e23190413faa99817c5abf77502b77170bd93f5ad099ee2750af93c69a0")]
[assembly: InternalsVisibleTo("Microsoft.Json.Schema.ToDotNet.UnitTests, PublicKey=002400000480000094000000060200000024000052534131000400000100010011b297c974c17c656cd84846a057602d37853ca40fa0781f4fbd750d90565c0cbe6208434b3fbdb9f2125bfbf93a33204fb9c62358bdc2738286a0cc996669c8a01bf558d86be3922952f36e04700c0700cc8261375cd37783b2fbe324fa10fb93d39d1c74a3a0d10a1217209ec91b4db71a6cdbf7b4eeb7bc97701bed8aeca4")]
// This allows Moq to mock internal interfaces of assemblies that are not strong named.
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")]

Просмотреть файл

@ -9,6 +9,7 @@
<package id="Microsoft.CodeAnalysis.VisualBasic.Workspaces" version="1.1.1" targetFramework="net452" />
<package id="Microsoft.CodeAnalysis.Workspaces.Common" version="1.1.1" targetFramework="net452" />
<package id="Microsoft.Composition" version="1.0.27" targetFramework="net452" />
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net452" />
<package id="System.Collections" version="4.0.0" targetFramework="net452" />
<package id="System.Collections.Immutable" version="1.1.37" targetFramework="net452" />
<package id="System.Diagnostics.Debug" version="4.0.0" targetFramework="net452" />

Просмотреть файл

@ -30,11 +30,11 @@
<HintPath>..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Sarif, Version=1.5.31.0, Culture=neutral, PublicKeyToken=a567ef0185dba9aa, processorArchitecture=MSIL">
<HintPath>..\packages\Sarif.Sdk.1.5.31\lib\net45\Sarif.dll</HintPath>
<Reference Include="System" />
<Reference Include="System.Collections.Immutable, Version=1.1.37.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Collections.Immutable.1.1.37\lib\dotnet\System.Collections.Immutable.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
@ -67,7 +67,6 @@
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SchemaWriterTests.cs" />
<Compile Include="UriOrFragmentTests.cs" />
<Compile Include="ValidatorTests.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Json.Schema.TestUtilities\Json.Schema.TestUtilities.csproj">

Просмотреть файл

@ -52,8 +52,8 @@ namespace Microsoft.Json.Schema.UnitTests
};
action.ShouldThrow<JsonSyntaxException>()
.Where(ex => ex.Result.Locations.First().AnalysisTarget.Region.StartLine == 2
&& ex.Result.Locations.First().AnalysisTarget.Region.StartColumn == 10);
.Where(ex => ex.JsonReaderException.LineNumber == 2
&& ex.JsonReaderException.LinePosition == 10);
}
public class LogicallyInvalidSchemaTestCase : IXunitSerializable
@ -199,7 +199,12 @@ namespace Microsoft.Json.Schema.UnitTests
};
action.ShouldThrow<SchemaValidationException>()
.Where(ex => ex.Results.Count == test.NumErrors);
.Where(ex => (ex.WrappedExceptions != null
? ex.WrappedExceptions.Count() == test.NumErrors
: 1 == test.NumErrors) &&
ex.JToken != null &&
ex.ErrorNumber > 0 &&
ex.Args != null);
}
}
}

Просмотреть файл

@ -3,8 +3,8 @@
<package id="FluentAssertions" version="4.6.1" targetFramework="net452" />
<package id="Moq" version="4.2.1510.2205" targetFramework="net452" />
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net452" />
<package id="Sarif.Sdk" version="1.5.31" targetFramework="net45" />
<package id="System.Collections" version="4.0.0" targetFramework="net452" />
<package id="System.Collections.Immutable" version="1.1.37" targetFramework="net451" />
<package id="System.Diagnostics.Debug" version="4.0.0" targetFramework="net452" />
<package id="System.Globalization" version="4.0.0" targetFramework="net452" />
<package id="System.Linq" version="4.0.0" targetFramework="net452" />

Просмотреть файл

@ -23,11 +23,15 @@
<HintPath>..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Sarif, Version=1.5.31.0, Culture=neutral, PublicKeyToken=a567ef0185dba9aa, processorArchitecture=MSIL">
<HintPath>..\packages\Sarif.Sdk.1.5.31\lib\net45\Sarif.dll</HintPath>
<Reference Include="Sarif, Version=1.6.0.0, Culture=neutral, PublicKeyToken=6eeb4570dcdece70, processorArchitecture=MSIL">
<HintPath>..\packages\Sarif.Sdk.1.6.0\lib\net45\Sarif.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Collections.Immutable, Version=1.1.37.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Collections.Immutable.1.1.37\lib\dotnet\System.Collections.Immutable.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
@ -55,6 +59,7 @@
<ItemGroup>
<Compile Include="ValidationSuite.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ValidatorTests.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
@ -63,10 +68,18 @@
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Json.Schema.TestUtilities\Json.Schema.TestUtilities.csproj">
<Project>{6d6133a4-8098-4210-99be-5ca01eb833b1}</Project>
<Name>Json.Schema.TestUtilities</Name>
</ProjectReference>
<ProjectReference Include="..\Json.Schema\Json.Schema.csproj">
<Project>{4da17661-563a-45ee-9731-eea9360f6c5d}</Project>
<Name>Json.Schema</Name>
</ProjectReference>
<ProjectReference Include="..\JsonSchemaValidator\JsonSchemaValidator.csproj">
<Project>{99d12428-9972-4203-9771-4ac5bd99c904}</Project>
<Name>JsonSchemaValidator</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">

Просмотреть файл

@ -7,6 +7,7 @@ using System.Collections.Generic;
using System.IO;
using FluentAssertions;
using Microsoft.CodeAnalysis.Sarif;
using Microsoft.Json.Schema.JsonSchemaValidator.Validation;
using Microsoft.Json.Schema.Validation;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
@ -16,7 +17,13 @@ namespace Microsoft.Json.Schema.ValidationSuiteTests
{
public class ValidationSuiteTests
{
[Theory(DisplayName = nameof(ValidationSuite))]
// This test runs the JSON Schema Test Suite. Since this implementation
// of JSON Schema is not quite complete, a few of the tests in the suite
// fail. If you want to fill in some of the missing pieces, uncomment
// this test to verify your changes. When you're done, if the
// implementation is still incomplete, comment it out again.
//
//[Theory(DisplayName = nameof(ValidationSuite))]
[ClassData(typeof(ValidationData))]
public void ValidationSuite(TestData testData)
{

Просмотреть файл

@ -5,7 +5,9 @@ using System.Collections.Generic;
using System.Linq;
using FluentAssertions;
using Microsoft.CodeAnalysis.Sarif;
using Microsoft.Json.Schema.Sarif;
using Microsoft.Json.Schema.JsonSchemaValidator;
using Microsoft.Json.Schema.JsonSchemaValidator.Sarif;
using Microsoft.Json.Schema.JsonSchemaValidator.Validation;
using Microsoft.Json.Schema.TestUtilities;
using Newtonsoft.Json.Linq;
using Xunit;

Просмотреть файл

@ -2,7 +2,16 @@
<packages>
<package id="FluentAssertions" version="4.6.1" targetFramework="net452" />
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net452" />
<package id="Sarif.Sdk" version="1.5.31" targetFramework="net45" />
<package id="Sarif.Sdk" version="1.6.0" targetFramework="net451" />
<package id="System.Collections" version="4.0.0" targetFramework="net451" />
<package id="System.Collections.Immutable" version="1.1.37" targetFramework="net451" />
<package id="System.Diagnostics.Debug" version="4.0.0" targetFramework="net451" />
<package id="System.Globalization" version="4.0.0" targetFramework="net451" />
<package id="System.Linq" version="4.0.0" targetFramework="net451" />
<package id="System.Resources.ResourceManager" version="4.0.0" targetFramework="net451" />
<package id="System.Runtime" version="4.0.0" targetFramework="net451" />
<package id="System.Runtime.Extensions" version="4.0.0" targetFramework="net451" />
<package id="System.Threading" version="4.0.0" targetFramework="net451" />
<package id="xunit" version="2.1.0" targetFramework="net452" />
<package id="xunit.abstractions" version="2.0.0" targetFramework="net452" />
<package id="xunit.assert" version="2.1.0" targetFramework="net452" />

Просмотреть файл

@ -4,20 +4,18 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using Microsoft.CodeAnalysis.Sarif;
using Newtonsoft.Json.Serialization;
namespace Microsoft.Json.Schema
{
internal class ErrorCapturingTraceWriter : ITraceWriter
internal class SchemaValidationExceptionCapturingTraceWriter : ITraceWriter
{
internal ErrorCapturingTraceWriter()
internal SchemaValidationExceptionCapturingTraceWriter()
{
Errors = new List<Result>();
SchemaValidationExceptions = new List<SchemaValidationException>();
}
internal List<Result> Errors;
internal List<SchemaValidationException> SchemaValidationExceptions;
#region ITraceWriter
@ -26,9 +24,10 @@ namespace Microsoft.Json.Schema
public void Trace(TraceLevel level, string message, Exception ex)
{
var schemaValidationException = ex as SchemaValidationException;
if (schemaValidationException != null && schemaValidationException.Results.Any())
if (schemaValidationException != null)
{
Errors.AddRange(schemaValidationException.Results);
SchemaValidationExceptions.Add(schemaValidationException);
}
}

Просмотреть файл

@ -4,16 +4,14 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using Microsoft.CodeAnalysis.Sarif;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace Microsoft.Json.Schema
{
internal static class DictionaryExtensions
public static class DictionaryExtensions
{
internal static bool HasSameElementsAs<K, V>(this Dictionary<K, V> left, Dictionary<K, V> right)
{
@ -32,9 +30,9 @@ namespace Microsoft.Json.Schema
}
}
internal static class IEnumerableExtensions
public static class IEnumerableExtensions
{
internal static bool HasSameElementsAs<T>(this IEnumerable<T> left, IEnumerable<T> right)
public static bool HasSameElementsAs<T>(this IEnumerable<T> left, IEnumerable<T> right)
{
if (left == null && right == null)
{
@ -126,24 +124,4 @@ namespace Microsoft.Json.Schema
serializer.TraceWriter.Trace(TraceLevel.Error, exception.Message, exception);
}
}
public static class RuleExtensions
{
public static Result SetAnalysisTargetUri(this Result result, string filePath)
{
// For now, I have to make the URI absolute. Once https://github.com/Microsoft/sarif-sdk/issues/308
// is fixed, I won't have to do this. I'll just set uriKind appropriately,
// according to IsPathRooted.
UriKind uriKind = UriKind.Absolute;
if (!Path.IsPathRooted(filePath))
{
uriKind = UriKind.Relative;
filePath = Path.Combine(Environment.CurrentDirectory, filePath);
}
result.Locations.First().AnalysisTarget.Uri = new Uri(filePath, uriKind);
return result;
}
}
}

Просмотреть файл

@ -12,10 +12,6 @@
<HintPath>..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Sarif, Version=1.5.31.0, Culture=neutral, PublicKeyToken=a567ef0185dba9aa, processorArchitecture=MSIL">
<HintPath>..\packages\Sarif.Sdk.1.5.31\lib\net45\Sarif.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Collections.Immutable, Version=1.1.37.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Collections.Immutable.1.1.37\lib\dotnet\System.Collections.Immutable.dll</HintPath>
@ -61,36 +57,32 @@
<Compile Include="Dependency.cs" />
<Compile Include="DependencyConverter.cs" />
<Compile Include="Error.cs" />
<Compile Include="ErrorCapturingTraceWriter.cs" />
<Compile Include="ExceptionCapturingTraceWriter.cs" />
<Compile Include="FormatAttributes.cs" />
<Compile Include="ExtensionMethods.cs" />
<Compile Include="Hash.cs" />
<Compile Include="JsonSyntaxException.cs" />
<Compile Include="SchemaValidationException.cs" />
<Compile Include="Items.cs" />
<Compile Include="ItemsConverter.cs" />
<Compile Include="JsonSchema.cs" />
<Compile Include="JsonSchemaContractResolver.cs" />
<Compile Include="ErrorNumber.cs" />
<Compile Include="Sarif\ResultFactory.cs" />
<Compile Include="Sarif\RuleFactory.cs" />
<Compile Include="Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="SchemaType.cs" />
<Compile Include="SchemaTypeConverter.cs" />
<Compile Include="JTokenTypeExtensions.cs" />
<Compile Include="MustBeStringConverter.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="RefProperty.cs" />
<Compile Include="Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="SchemaReader.cs" />
<Compile Include="SchemaValidationException.cs" />
<Compile Include="SchemaWriter.cs" />
<Compile Include="UriOrFragmentConverter.cs" />
<Compile Include="UriOrFragment.cs" />
<Compile Include="Validation\JTokenEqualityComparer.cs" />
<Compile Include="Validation\Validator.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config">
@ -101,7 +93,6 @@
<EmbeddedResource Include="Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

Просмотреть файл

@ -2,10 +2,7 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Microsoft.CodeAnalysis.Sarif;
using Microsoft.Json.Schema.Sarif;
using Newtonsoft.Json;
namespace Microsoft.Json.Schema
@ -70,40 +67,12 @@ namespace Microsoft.Json.Schema
/// </summary>
public JsonSyntaxException(string fileName, JsonReaderException ex)
{
Rule rule = RuleFactory.GetRuleFromErrorNumber(ErrorNumber.SyntaxError);
Result = new Result
{
RuleId = rule.Id,
Level = rule.DefaultLevel,
Locations = new List<Location>
{
new Location
{
AnalysisTarget = new PhysicalLocation
{
Uri = new Uri(fileName, UriKind.RelativeOrAbsolute),
Region = new Region
{
StartLine = ex.LineNumber,
StartColumn = ex.LinePosition
}
}
}
},
FormattedRuleMessage = new FormattedRuleMessage
{
FormatId = RuleFactory.DefaultMessageFormatId,
Arguments = new List<string>
{
ex.Path,
ex.Message
}
}
};
FileName = fileName;
JsonReaderException = ex;
}
public Result Result { get; }
public string FileName { get; internal set; }
public JsonReaderException JsonReaderException { get; internal set; }
}
}

Просмотреть файл

@ -7,8 +7,9 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTitle("JSON Schema Library")]
[assembly: AssemblyDescription("Classes for working with JSON Schema")]
[assembly: InternalsVisibleTo("Microsoft.Json.Schema.UnitTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d3eec1f09c636920d12f3b3be04b7b80613923d6d38a7a38c0d2fa3de610cba46e3ce82e04fd5a1dc2daf5545335a46d21611b9cffaf3cea13095f3e6d6716e31b39158d10054eeee200dea5e850887dd41d615237ecbe36d4f893deb0c7cd8452ba3e23190413faa99817c5abf77502b77170bd93f5ad099ee2750af93c69a0")]
[assembly: InternalsVisibleTo("Microsoft.Json.Schema.ToDotNet.UnitTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d3eec1f09c636920d12f3b3be04b7b80613923d6d38a7a38c0d2fa3de610cba46e3ce82e04fd5a1dc2daf5545335a46d21611b9cffaf3cea13095f3e6d6716e31b39158d10054eeee200dea5e850887dd41d615237ecbe36d4f893deb0c7cd8452ba3e23190413faa99817c5abf77502b77170bd93f5ad099ee2750af93c69a0")]
[assembly: InternalsVisibleTo("Microsoft.Json.Schema.UnitTests, PublicKey=002400000480000094000000060200000024000052534131000400000100010011b297c974c17c656cd84846a057602d37853ca40fa0781f4fbd750d90565c0cbe6208434b3fbdb9f2125bfbf93a33204fb9c62358bdc2738286a0cc996669c8a01bf558d86be3922952f36e04700c0700cc8261375cd37783b2fbe324fa10fb93d39d1c74a3a0d10a1217209ec91b4db71a6cdbf7b4eeb7bc97701bed8aeca4")]
[assembly: InternalsVisibleTo("Microsoft.Json.Schema.ToDotNet.UnitTests, PublicKey=002400000480000094000000060200000024000052534131000400000100010011b297c974c17c656cd84846a057602d37853ca40fa0781f4fbd750d90565c0cbe6208434b3fbdb9f2125bfbf93a33204fb9c62358bdc2738286a0cc996669c8a01bf558d86be3922952f36e04700c0700cc8261375cd37783b2fbe324fa10fb93d39d1c74a3a0d10a1217209ec91b4db71a6cdbf7b4eeb7bc97701bed8aeca4")]
// This allows Moq to mock internal interfaces of assemblies that are not strong named.
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")]

604
src/Json.Schema/Resources.Designer.cs сгенерированный
Просмотреть файл

@ -60,15 +60,6 @@ namespace Microsoft.Json.Schema {
}
}
/// <summary>
/// Looks up a localized string similar to The schema does not define a property named &quot;{1}&quot;, and the schema does not permit additional properties..
/// </summary>
internal static string ErrorAdditionalPropertiesProhibited {
get {
return ResourceManager.GetString("ErrorAdditionalPropertiesProhibited", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to This schema does not contain the sub-schema definition referred to by the $ref value &quot;{0}&quot;..
/// </summary>
@ -78,150 +69,6 @@ namespace Microsoft.Json.Schema {
}
}
/// <summary>
/// Looks up a localized string similar to The schema requires that when property &quot;{1}&quot; is present, properties [{2}] are also present, but properties [{3}] are missing..
/// </summary>
internal static string ErrorDependentPropertyMissing {
get {
return ResourceManager.GetString("ErrorDependentPropertyMissing", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to JSON schema requires the value of &quot;additionalItems&quot; to be either a Boolean or a schema, but a token of type &quot;{1}&quot; was seen..
/// </summary>
internal static string ErrorInvalidAdditionalItemsType {
get {
return ResourceManager.GetString("ErrorInvalidAdditionalItemsType", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to JSON schema requires the value of &quot;additionalProperties&quot; to be either a Boolean or a schema, but a token of type &quot;{1}&quot; was seen..
/// </summary>
internal static string ErrorInvalidAdditionalPropertiesType {
get {
return ResourceManager.GetString("ErrorInvalidAdditionalPropertiesType", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to JSON schema requires the value of each property of the &quot;dependencies&quot; object, to be either an schema or an array of strings, but a token of type &quot;{1}&quot; was seen..
/// </summary>
internal static string ErrorInvalidDependencyType {
get {
return ResourceManager.GetString("ErrorInvalidDependencyType", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The value &quot;{1}&quot; does not match any of the enum values [{2}]..
/// </summary>
internal static string ErrorInvalidEnumValue {
get {
return ResourceManager.GetString("ErrorInvalidEnumValue", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to JSON schema requires the value of &quot;items&quot; to be either a schema or an array of schemas, but a token of type &quot;{1}&quot; was seen..
/// </summary>
internal static string ErrorInvalidItemsType {
get {
return ResourceManager.GetString("ErrorInvalidItemsType", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to JSON requires that if the value of a property of the &quot;dependencies&quot; object is an array, then every element of the array must be a string, but a token of type &quot;{1}&quot; was seen..
/// </summary>
internal static string ErrorInvalidPropertyDependencyType {
get {
return ResourceManager.GetString("ErrorInvalidPropertyDependencyType", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to &quot;{1}&quot; is not a valid schema type..
/// </summary>
internal static string ErrorInvalidTypeString {
get {
return ResourceManager.GetString("ErrorInvalidTypeString", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to JSON schema requires the value of &quot;type&quot; to be either a string or an array of strings, but a token of type &quot;{1}&quot; was seen..
/// </summary>
internal static string ErrorInvalidTypeType {
get {
return ResourceManager.GetString("ErrorInvalidTypeType", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to at &quot;{{0}}&quot;: {0}.
/// </summary>
internal static string ErrorMessageFormatWithPath {
get {
return ResourceManager.GetString("ErrorMessageFormatWithPath", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The instance does not validate successfully against all of the {1} schemas specified by &quot;allOf&quot;..
/// </summary>
internal static string ErrorNotAllOf {
get {
return ResourceManager.GetString("ErrorNotAllOf", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The value {1} is not a multiple of {2}..
/// </summary>
internal static string ErrorNotAMultiple {
get {
return ResourceManager.GetString("ErrorNotAMultiple", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The instance does validate successfully against any of the {1} schemas specified by &quot;anyOf&quot;..
/// </summary>
internal static string ErrorNotAnyOf {
get {
return ResourceManager.GetString("ErrorNotAnyOf", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The property is required to be a string, but the token is of type &quot;{1}&quot;..
/// </summary>
internal static string ErrorNotAString {
get {
return ResourceManager.GetString("ErrorNotAString", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The instance validates successfully against {1} of the {2} schemas specified by &quot;oneOf&quot;, instead of validating successfully against exactly one of them..
/// </summary>
internal static string ErrorNotOneOf {
get {
return ResourceManager.GetString("ErrorNotOneOf", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The elements of the array are not unique..
/// </summary>
internal static string ErrorNotUnique {
get {
return ResourceManager.GetString("ErrorNotUnique", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to This partial implementation of JSON Schema only accepts $ref values in the form of fragments that refer to sub-properties of the &quot;definitions&quot; property, for example &quot;#/definitions/def1&quot;. The URI reference&quot;{0}&quot; is not supported..
/// </summary>
@ -231,169 +78,6 @@ namespace Microsoft.Json.Schema {
}
}
/// <summary>
/// Looks up a localized string similar to The required property &quot;{1}&quot; is missing..
/// </summary>
internal static string ErrorRequiredPropertyMissing {
get {
return ResourceManager.GetString("ErrorRequiredPropertyMissing", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The string &quot;{1}&quot; does not match the regular expression &quot;{2}&quot;..
/// </summary>
internal static string ErrorStringDoesNotMatchPattern {
get {
return ResourceManager.GetString("ErrorStringDoesNotMatchPattern", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The string &quot;{1}&quot; has length {2}, which is greater than the maximum length {3}.
///.
/// </summary>
internal static string ErrorStringTooLong {
get {
return ResourceManager.GetString("ErrorStringTooLong", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The string &quot;{1}&quot; has length {2}, which is less than the minimum length {3}..
/// </summary>
internal static string ErrorStringTooShort {
get {
return ResourceManager.GetString("ErrorStringTooShort", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to JSON syntax error: {1}.
/// </summary>
internal static string ErrorSyntaxError {
get {
return ResourceManager.GetString("ErrorSyntaxError", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The schema requires at least {1} array items, but there are {2}..
/// </summary>
internal static string ErrorTooFewArrayItems {
get {
return ResourceManager.GetString("ErrorTooFewArrayItems", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The array has {1} items, but the array of schemas specified by &quot;items&quot; has only {2} items, and &quot;additionalItems&quot; is not specified to allow additional array items..
/// </summary>
internal static string ErrorTooFewItemSchemas {
get {
return ResourceManager.GetString("ErrorTooFewItemSchemas", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The schema requires at least {1} object properties, but there are {2}..
/// </summary>
internal static string ErrorTooFewProperties {
get {
return ResourceManager.GetString("ErrorTooFewProperties", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The schema permits at most {1} array items, but there are {2}..
/// </summary>
internal static string ErrorTooManyArrayItems {
get {
return ResourceManager.GetString("ErrorTooManyArrayItems", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The schema permits at most {1} object properties, but there are {2}..
/// </summary>
internal static string ErrorTooManyProperties {
get {
return ResourceManager.GetString("ErrorTooManyProperties", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The instance validates successfully against the schema specified by &quot;not&quot;..
/// </summary>
internal static string ErrorValidatesAgainstNotSchema {
get {
return ResourceManager.GetString("ErrorValidatesAgainstNotSchema", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The value {1} is greater than the maximum value of {2}..
/// </summary>
internal static string ErrorValueTooLarge {
get {
return ResourceManager.GetString("ErrorValueTooLarge", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The value {1} is greater than or equal to the exclusive maximum value of {2}..
/// </summary>
internal static string ErrorValueTooLargeExclusive {
get {
return ResourceManager.GetString("ErrorValueTooLargeExclusive", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The value {1} is less than the minimum value of {2}..
/// </summary>
internal static string ErrorValueTooSmall {
get {
return ResourceManager.GetString("ErrorValueTooSmall", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The value {1} is less than or equal to the exclusive minimum value of {2}..
/// </summary>
internal static string ErrorValueTooSmallExclusive {
get {
return ResourceManager.GetString("ErrorValueTooSmallExclusive", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to ({0},{1}): error {2}: {3}.
/// </summary>
internal static string ErrorWithLineInfo {
get {
return ResourceManager.GetString("ErrorWithLineInfo", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to ({0},{1}): error {2}: at {3}: {4}.
/// </summary>
internal static string ErrorWithLineInfoAndPath {
get {
return ResourceManager.GetString("ErrorWithLineInfoAndPath", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The schema requires one of the types [{1}], but a token of type &quot;{2}&quot; was found..
/// </summary>
internal static string ErrorWrongType {
get {
return ResourceManager.GetString("ErrorWrongType", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The schema does not specify a single schema for all array items. Access the per-item schemas through the Schemas property..
/// </summary>
@ -402,293 +86,5 @@ namespace Microsoft.Json.Schema {
return ResourceManager.GetString("ExceptionNotASingleSchema", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to An object contains a property not defined by the schema is present, and the schema does not permit additional properties..
/// </summary>
internal static string RuleDescriptionAdditionalPropertiesProhibited {
get {
return ResourceManager.GetString("RuleDescriptionAdditionalPropertiesProhibited", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to An instance does not have all the properties specified in the schema by a property dependency..
/// </summary>
internal static string RuleDescriptionDependentPropertyMissing {
get {
return ResourceManager.GetString("RuleDescriptionDependentPropertyMissing", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The value of the &quot;additionalItems&quot; schema property is neither a Boolean nor a schema..
/// </summary>
internal static string RuleDescriptionInvalidAdditionalItemsType {
get {
return ResourceManager.GetString("RuleDescriptionInvalidAdditionalItemsType", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The value of the &quot;additionalProperties&quot; schema property is neither a boolean nor an object..
/// </summary>
internal static string RuleDescriptionInvalidAdditionalPropertiesType {
get {
return ResourceManager.GetString("RuleDescriptionInvalidAdditionalPropertiesType", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The value of one of the properties of the &quot;dependencies&quot; schema property is either a schema nor an array of strings..
/// </summary>
internal static string RuleDescriptionInvalidDependencyType {
get {
return ResourceManager.GetString("RuleDescriptionInvalidDependencyType", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to A string does not match any of the values specified by the schema&apos;s &quot;enum&quot; property..
/// </summary>
internal static string RuleDescriptionInvalidEnumValue {
get {
return ResourceManager.GetString("RuleDescriptionInvalidEnumValue", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The value of the &quot;items&quot; property is neither a schema nor an array of schemas..
/// </summary>
internal static string RuleDescriptionInvalidItemsType {
get {
return ResourceManager.GetString("RuleDescriptionInvalidItemsType", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The value of one of the properties of the &quot;dependencies&quot; schema property is an array which contains an element which is not a string..
/// </summary>
internal static string RuleDescriptionInvalidPropertyDependencyType {
get {
return ResourceManager.GetString("RuleDescriptionInvalidPropertyDependencyType", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The string value of the &quot;type&quot; schema property is not one of the valid values..
/// </summary>
internal static string RuleDescriptionInvalidTypeString {
get {
return ResourceManager.GetString("RuleDescriptionInvalidTypeString", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The value of the &quot;type&quot; schema property is neither a string nor an array of strings..
/// </summary>
internal static string RuleDescriptionInvalidTypeType {
get {
return ResourceManager.GetString("RuleDescriptionInvalidTypeType", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to n instance does not successfully validate against all of the schemas by the schema&apos;s &quot;allOf&quot; property..
/// </summary>
internal static string RuleDescriptionNotAllOf {
get {
return ResourceManager.GetString("RuleDescriptionNotAllOf", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to A numeric value is not a multiple of the value specified by the schema&apos;s &quot;multipleOf&quot; property..
/// </summary>
internal static string RuleDescriptionNotAMultiple {
get {
return ResourceManager.GetString("RuleDescriptionNotAMultiple", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to An instance does not successfully validate against any of the schemas by the schema&apos;s &quot;anyOf&quot; property..
/// </summary>
internal static string RuleDescriptionNotAnyOf {
get {
return ResourceManager.GetString("RuleDescriptionNotAnyOf", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to A schema property that is required to be a string is not a string..
/// </summary>
internal static string RuleDescriptionNotAString {
get {
return ResourceManager.GetString("RuleDescriptionNotAString", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to An instance does not successfully validate against exactly one of the schemas by the schema&apos;s &quot;oneOf&quot; property..
/// </summary>
internal static string RuleDescriptionNotOneOf {
get {
return ResourceManager.GetString("RuleDescriptionNotOneOf", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to An array&apos;s elements are not unique, as required by the schema&apos;s &quot;uniqueItems&quot; property..
/// </summary>
internal static string RuleDescriptionNotUnique {
get {
return ResourceManager.GetString("RuleDescriptionNotUnique", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to A property required by the schema&apos;s &quot;required&quot; property is missing..
/// </summary>
internal static string RuleDescriptionRequiredPropertyMissing {
get {
return ResourceManager.GetString("RuleDescriptionRequiredPropertyMissing", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to A string does not match the regular expression pattern specified by the schema&apos;s &quot;pattern&quot; property..
/// </summary>
internal static string RuleDescriptionStringDoesNotMatchPattern {
get {
return ResourceManager.GetString("RuleDescriptionStringDoesNotMatchPattern", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to A string is longer than permitted by the schema&apos;s &quot;maxLength&quot; property..
/// </summary>
internal static string RuleDescriptionStringTooLong {
get {
return ResourceManager.GetString("RuleDescriptionStringTooLong", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to A string is shorter than permitted by the schema&apos;s &quot;minLength&quot; property..
/// </summary>
internal static string RuleDescriptionStringTooShort {
get {
return ResourceManager.GetString("RuleDescriptionStringTooShort", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The schema is not a valid JSON document..
/// </summary>
internal static string RuleDescriptionSyntaxError {
get {
return ResourceManager.GetString("RuleDescriptionSyntaxError", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to An array has fewer elements than permitted by the schema&apos;s &quot;minItems&quot; property..
/// </summary>
internal static string RuleDescriptionTooFewArrayItems {
get {
return ResourceManager.GetString("RuleDescriptionTooFewArrayItems", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to An array has more elements than the number of elements in the array specified by the schema&apos;s &quot;items&quot; property, and the schema does not permit additional array items..
/// </summary>
internal static string RuleDescriptionTooFewItemSchemas {
get {
return ResourceManager.GetString("RuleDescriptionTooFewItemSchemas", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to An object has fewer properties than permitted by the schema&apos;s &quot;minProperties&quot; property..
/// </summary>
internal static string RuleDescriptionTooFewProperties {
get {
return ResourceManager.GetString("RuleDescriptionTooFewProperties", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to An array has more elements than permitted by the schema&apos;s &quot;maxItems&quot; property..
/// </summary>
internal static string RuleDescriptionTooManyArrayItems {
get {
return ResourceManager.GetString("RuleDescriptionTooManyArrayItems", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to An object has more properties than permitted by the schema&apos;s &quot;maxProperties&quot; property..
/// </summary>
internal static string RuleDescriptionTooManyProperties {
get {
return ResourceManager.GetString("RuleDescriptionTooManyProperties", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to An instance successfully validates against the schema specified by the schema&apos;s &quot;not&quot; property..
/// </summary>
internal static string RuleDescriptionValidatesAgainstNotSchema {
get {
return ResourceManager.GetString("RuleDescriptionValidatesAgainstNotSchema", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to A numeric value is greater than the maximum value permitted by the schema&apos;s &quot;maximum&quot; property..
/// </summary>
internal static string RuleDescriptionValueTooLarge {
get {
return ResourceManager.GetString("RuleDescriptionValueTooLarge", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to A numeric value is greater than or equal to the exclusive maximum value permitted by the schema&apos;s &quot;maximum&quot; and &quot;exclusiveMaximum&quot; properties..
/// </summary>
internal static string RuleDescriptionValueTooLargeExclusive {
get {
return ResourceManager.GetString("RuleDescriptionValueTooLargeExclusive", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to A numeric value is less than the minimum value permitted by the schema&apos;s &quot;minimum&quot; property..
/// </summary>
internal static string RuleDescriptionValueTooSmall {
get {
return ResourceManager.GetString("RuleDescriptionValueTooSmall", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to A numeric value is less than or equal to the exclusive minimum value permitted by the schema&apos;s &quot;minimum&quot; and &quot;exclusiveMinimum&quot; properties..
/// </summary>
internal static string RuleDescriptionValueTooSmallExclusive {
get {
return ResourceManager.GetString("RuleDescriptionValueTooSmallExclusive", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to An instance has a type that is not permitted by the schema&apos;s &quot;type&quot; property..
/// </summary>
internal static string RuleDescriptionWrongType {
get {
return ResourceManager.GetString("RuleDescriptionWrongType", resourceCulture);
}
}
}
}

Просмотреть файл

@ -117,215 +117,13 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="ErrorAdditionalPropertiesProhibited" xml:space="preserve">
<value>The schema does not define a property named "{1}", and the schema does not permit additional properties.</value>
</data>
<data name="ErrorDefinitionDoesNotExist" xml:space="preserve">
<value>This schema does not contain the sub-schema definition referred to by the $ref value "{0}".</value>
</data>
<data name="ErrorInvalidAdditionalPropertiesType" xml:space="preserve">
<value>JSON schema requires the value of "additionalProperties" to be either a Boolean or a schema, but a token of type "{1}" was seen.</value>
</data>
<data name="ErrorNotAllOf" xml:space="preserve">
<value>The instance does not validate successfully against all of the {1} schemas specified by "allOf".</value>
</data>
<data name="ErrorNotAMultiple" xml:space="preserve">
<value>The value {1} is not a multiple of {2}.</value>
</data>
<data name="ErrorNotAnyOf" xml:space="preserve">
<value>The instance does validate successfully against any of the {1} schemas specified by "anyOf".</value>
</data>
<data name="ErrorNotAString" xml:space="preserve">
<value>The property is required to be a string, but the token is of type "{1}".</value>
</data>
<data name="ErrorNotOneOf" xml:space="preserve">
<value>The instance validates successfully against {1} of the {2} schemas specified by "oneOf", instead of validating successfully against exactly one of them.</value>
</data>
<data name="ErrorOnlyDefinitionFragmentsSupported" xml:space="preserve">
<value>This partial implementation of JSON Schema only accepts $ref values in the form of fragments that refer to sub-properties of the "definitions" property, for example "#/definitions/def1". The URI reference"{0}" is not supported.</value>
</data>
<data name="ErrorRequiredPropertyMissing" xml:space="preserve">
<value>The required property "{1}" is missing.</value>
</data>
<data name="ErrorStringDoesNotMatchPattern" xml:space="preserve">
<value>The string "{1}" does not match the regular expression "{2}".</value>
</data>
<data name="ErrorStringTooLong" xml:space="preserve">
<value>The string "{1}" has length {2}, which is greater than the maximum length {3}.
</value>
</data>
<data name="ErrorStringTooShort" xml:space="preserve">
<value>The string "{1}" has length {2}, which is less than the minimum length {3}.</value>
</data>
<data name="ErrorTooFewArrayItems" xml:space="preserve">
<value>The schema requires at least {1} array items, but there are {2}.</value>
</data>
<data name="ErrorTooFewProperties" xml:space="preserve">
<value>The schema requires at least {1} object properties, but there are {2}.</value>
</data>
<data name="ErrorTooManyArrayItems" xml:space="preserve">
<value>The schema permits at most {1} array items, but there are {2}.</value>
</data>
<data name="ErrorTooManyProperties" xml:space="preserve">
<value>The schema permits at most {1} object properties, but there are {2}.</value>
</data>
<data name="ErrorValueTooLarge" xml:space="preserve">
<value>The value {1} is greater than the maximum value of {2}.</value>
</data>
<data name="ErrorValueTooLargeExclusive" xml:space="preserve">
<value>The value {1} is greater than or equal to the exclusive maximum value of {2}.</value>
</data>
<data name="ErrorValueTooSmall" xml:space="preserve">
<value>The value {1} is less than the minimum value of {2}.</value>
</data>
<data name="ErrorValueTooSmallExclusive" xml:space="preserve">
<value>The value {1} is less than or equal to the exclusive minimum value of {2}.</value>
</data>
<data name="ErrorWithLineInfo" xml:space="preserve">
<value>({0},{1}): error {2}: {3}</value>
</data>
<data name="ErrorWrongType" xml:space="preserve">
<value>The schema requires one of the types [{1}], but a token of type "{2}" was found.</value>
</data>
<data name="ErrorInvalidEnumValue" xml:space="preserve">
<value>The value "{1}" does not match any of the enum values [{2}].</value>
</data>
<data name="ErrorNotUnique" xml:space="preserve">
<value>The elements of the array are not unique.</value>
</data>
<data name="ErrorInvalidItemsType" xml:space="preserve">
<value>JSON schema requires the value of "items" to be either a schema or an array of schemas, but a token of type "{1}" was seen.</value>
</data>
<data name="ErrorTooFewItemSchemas" xml:space="preserve">
<value>The array has {1} items, but the array of schemas specified by "items" has only {2} items, and "additionalItems" is not specified to allow additional array items.</value>
</data>
<data name="ExceptionNotASingleSchema" xml:space="preserve">
<value>The schema does not specify a single schema for all array items. Access the per-item schemas through the Schemas property.</value>
</data>
<data name="ErrorWithLineInfoAndPath" xml:space="preserve">
<value>({0},{1}): error {2}: at {3}: {4}</value>
</data>
<data name="ErrorValidatesAgainstNotSchema" xml:space="preserve">
<value>The instance validates successfully against the schema specified by "not".</value>
</data>
<data name="ErrorInvalidTypeString" xml:space="preserve">
<value>"{1}" is not a valid schema type.</value>
</data>
<data name="ErrorInvalidTypeType" xml:space="preserve">
<value>JSON schema requires the value of "type" to be either a string or an array of strings, but a token of type "{1}" was seen.</value>
</data>
<data name="RuleDescriptionAdditionalPropertiesProhibited" xml:space="preserve">
<value>An object contains a property not defined by the schema is present, and the schema does not permit additional properties.</value>
</data>
<data name="RuleDescriptionInvalidAdditionalPropertiesType" xml:space="preserve">
<value>The value of the "additionalProperties" schema property is neither a boolean nor an object.</value>
</data>
<data name="RuleDescriptionInvalidEnumValue" xml:space="preserve">
<value>A string does not match any of the values specified by the schema's "enum" property.</value>
</data>
<data name="RuleDescriptionInvalidTypeString" xml:space="preserve">
<value>The string value of the "type" schema property is not one of the valid values.</value>
</data>
<data name="RuleDescriptionInvalidTypeType" xml:space="preserve">
<value>The value of the "type" schema property is neither a string nor an array of strings.</value>
</data>
<data name="RuleDescriptionNotAllOf" xml:space="preserve">
<value>n instance does not successfully validate against all of the schemas by the schema's "allOf" property.</value>
</data>
<data name="RuleDescriptionNotAMultiple" xml:space="preserve">
<value>A numeric value is not a multiple of the value specified by the schema's "multipleOf" property.</value>
</data>
<data name="RuleDescriptionNotAnyOf" xml:space="preserve">
<value>An instance does not successfully validate against any of the schemas by the schema's "anyOf" property.</value>
</data>
<data name="RuleDescriptionNotAString" xml:space="preserve">
<value>A schema property that is required to be a string is not a string.</value>
</data>
<data name="RuleDescriptionNotOneOf" xml:space="preserve">
<value>An instance does not successfully validate against exactly one of the schemas by the schema's "oneOf" property.</value>
</data>
<data name="RuleDescriptionNotUnique" xml:space="preserve">
<value>An array's elements are not unique, as required by the schema's "uniqueItems" property.</value>
</data>
<data name="RuleDescriptionRequiredPropertyMissing" xml:space="preserve">
<value>A property required by the schema's "required" property is missing.</value>
</data>
<data name="RuleDescriptionStringDoesNotMatchPattern" xml:space="preserve">
<value>A string does not match the regular expression pattern specified by the schema's "pattern" property.</value>
</data>
<data name="RuleDescriptionStringTooLong" xml:space="preserve">
<value>A string is longer than permitted by the schema's "maxLength" property.</value>
</data>
<data name="RuleDescriptionStringTooShort" xml:space="preserve">
<value>A string is shorter than permitted by the schema's "minLength" property.</value>
</data>
<data name="RuleDescriptionTooFewArrayItems" xml:space="preserve">
<value>An array has fewer elements than permitted by the schema's "minItems" property.</value>
</data>
<data name="RuleDescriptionTooFewItemSchemas" xml:space="preserve">
<value>An array has more elements than the number of elements in the array specified by the schema's "items" property, and the schema does not permit additional array items.</value>
</data>
<data name="RuleDescriptionTooFewProperties" xml:space="preserve">
<value>An object has fewer properties than permitted by the schema's "minProperties" property.</value>
</data>
<data name="RuleDescriptionTooManyArrayItems" xml:space="preserve">
<value>An array has more elements than permitted by the schema's "maxItems" property.</value>
</data>
<data name="RuleDescriptionTooManyProperties" xml:space="preserve">
<value>An object has more properties than permitted by the schema's "maxProperties" property.</value>
</data>
<data name="RuleDescriptionValidatesAgainstNotSchema" xml:space="preserve">
<value>An instance successfully validates against the schema specified by the schema's "not" property.</value>
</data>
<data name="RuleDescriptionValueTooLarge" xml:space="preserve">
<value>A numeric value is greater than the maximum value permitted by the schema's "maximum" property.</value>
</data>
<data name="RuleDescriptionValueTooLargeExclusive" xml:space="preserve">
<value>A numeric value is greater than or equal to the exclusive maximum value permitted by the schema's "maximum" and "exclusiveMaximum" properties.</value>
</data>
<data name="RuleDescriptionValueTooSmall" xml:space="preserve">
<value>A numeric value is less than the minimum value permitted by the schema's "minimum" property.</value>
</data>
<data name="RuleDescriptionValueTooSmallExclusive" xml:space="preserve">
<value>A numeric value is less than or equal to the exclusive minimum value permitted by the schema's "minimum" and "exclusiveMinimum" properties.</value>
</data>
<data name="RuleDescriptionWrongType" xml:space="preserve">
<value>An instance has a type that is not permitted by the schema's "type" property.</value>
</data>
<data name="ErrorMessageFormatWithPath" xml:space="preserve">
<value>at "{{0}}": {0}</value>
</data>
<data name="ErrorSyntaxError" xml:space="preserve">
<value>JSON syntax error: {1}</value>
</data>
<data name="RuleDescriptionSyntaxError" xml:space="preserve">
<value>The schema is not a valid JSON document.</value>
</data>
<data name="ErrorInvalidAdditionalItemsType" xml:space="preserve">
<value>JSON schema requires the value of "additionalItems" to be either a Boolean or a schema, but a token of type "{1}" was seen.</value>
</data>
<data name="ErrorDependentPropertyMissing" xml:space="preserve">
<value>The schema requires that when property "{1}" is present, properties [{2}] are also present, but properties [{3}] are missing.</value>
</data>
<data name="ErrorInvalidDependencyType" xml:space="preserve">
<value>JSON schema requires the value of each property of the "dependencies" object, to be either an schema or an array of strings, but a token of type "{1}" was seen.</value>
</data>
<data name="ErrorInvalidPropertyDependencyType" xml:space="preserve">
<value>JSON requires that if the value of a property of the "dependencies" object is an array, then every element of the array must be a string, but a token of type "{1}" was seen.</value>
</data>
<data name="RuleDescriptionDependentPropertyMissing" xml:space="preserve">
<value>An instance does not have all the properties specified in the schema by a property dependency.</value>
</data>
<data name="RuleDescriptionInvalidAdditionalItemsType" xml:space="preserve">
<value>The value of the "additionalItems" schema property is neither a Boolean nor a schema.</value>
</data>
<data name="RuleDescriptionInvalidDependencyType" xml:space="preserve">
<value>The value of one of the properties of the "dependencies" schema property is either a schema nor an array of strings.</value>
</data>
<data name="RuleDescriptionInvalidItemsType" xml:space="preserve">
<value>The value of the "items" property is neither a schema nor an array of schemas.</value>
</data>
<data name="RuleDescriptionInvalidPropertyDependencyType" xml:space="preserve">
<value>The value of one of the properties of the "dependencies" schema property is an array which contains an element which is not a string.</value>
</data>
</root>

Просмотреть файл

@ -5,6 +5,7 @@ using System;
using System.IO;
using System.Linq;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
namespace Microsoft.Json.Schema
{
@ -21,7 +22,8 @@ namespace Microsoft.Json.Schema
// because Json.NET treats "$ref" specially.
jsonText = RefProperty.ConvertFromInput(jsonText);
var traceWriter = new ErrorCapturingTraceWriter();
var traceWriter = new SchemaValidationExceptionCapturingTraceWriter();
var serializer = new JsonSerializer
{
ContractResolver = new JsonSchemaContractResolver(),
@ -41,9 +43,10 @@ namespace Microsoft.Json.Schema
}
}
if (traceWriter.Errors.Any())
if (traceWriter.SchemaValidationExceptions.Any())
{
throw new SchemaValidationException(traceWriter.Errors);
throw new SchemaValidationException(traceWriter.SchemaValidationExceptions);
}
return schema;

Просмотреть файл

@ -5,8 +5,6 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using Microsoft.CodeAnalysis.Sarif;
using Microsoft.Json.Schema.Sarif;
using Newtonsoft.Json.Linq;
namespace Microsoft.Json.Schema
@ -80,45 +78,46 @@ namespace Microsoft.Json.Schema
/// an error message.
/// </param>
public SchemaValidationException(JToken jToken, ErrorNumber errorNumber, params object[] args)
: this(ResultFactory.CreateResult(jToken, errorNumber, args))
: this()
{
JToken = jToken;
ErrorNumber = errorNumber;
Args = args;
}
/// <summ
/// <summary>
/// Initializes a new instance of the <see cref="SchemaValidationException"/> class
/// with an error encountered while reading a JSON schema.
/// with one or more SchemaValidationException instances
/// </summary>
/// <param name="result">
/// An error encountered while reading a JSON schema.
/// <param name="wrappedExceptions">
/// One or more schema validation exceptions that are aggregated by this instance
/// </param>
public SchemaValidationException(Result result)
: this(new[] { result })
public SchemaValidationException(IEnumerable<SchemaValidationException> wrappedExceptions)
: this()
{
}
WrappedExceptions = wrappedExceptions;
}
/// <summary>
/// Initializes a new instance of the <see cref="SchemaValidationException"/> class
/// with a list of errors encountered while reading a JSON schema.
/// One or more SchemaValidationExceptions that have been bundled into
/// this exception instance.
/// </summary>
/// <param name="results">
/// The list of errors encountered while reading a JSON schema.
/// </param>
public SchemaValidationException(IEnumerable<Result> results)
{
Results = results.ToList();
}
public IEnumerable<SchemaValidationException> WrappedExceptions { get; private set; }
/// <summary>
/// Gets the list of errors encountered while reading a JSON schema.
/// The token on which the error was encountered
/// </summary>
public List<Result> Results { get; }
public JToken JToken { get; private set; }
private static string FormatMessage(IEnumerable<Result> results)
{
return string.Join(
"\n",
results.Select(
r => r.FormatForVisualStudio(RuleFactory.GetRuleFromRuleId(r.RuleId))));
}
/// <summary>
/// The error number that identifies the validation issue.
/// </summary>
public ErrorNumber ErrorNumber { get; private set; }
/// <summary>
/// An argument list that parameterizes the validation issue.
/// </summary>
public object[] Args { get; private set; }
}
}

Просмотреть файл

@ -2,7 +2,6 @@
<packages>
<package id="Microsoft.Composition" version="1.0.27" targetFramework="net452" />
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net452" />
<package id="Sarif.Sdk" version="1.5.31" targetFramework="net45" />
<package id="System.Collections" version="4.0.0" targetFramework="net452" />
<package id="System.Collections.Immutable" version="1.1.37" targetFramework="net452" />
<package id="System.Diagnostics.Debug" version="4.0.0" targetFramework="net452" />

Просмотреть файл

@ -65,7 +65,6 @@
<file src='Microsoft.CodeAnalysis.VisualBasic.Workspaces.dll' target='tools\Microsoft.CodeAnalysis.VisualBasic.Workspaces.dll' />
<file src='Microsoft.CodeAnalysis.Workspaces.dll' target='tools\Microsoft.CodeAnalysis.Workspaces.dll' />
<file src='Newtonsoft.Json.dll' target='tools\Newtonsoft.Json.dll' />
<file src='Sarif.dll' target='tools\Sarif.dll' />
<file src='System.Collections.Immutable.dll' target='tools\System.Collections.Immutable.dll' />
<file src='System.Composition.AttributedModel.dll' target='tools\System.Composition.AttributedModel.dll' />
<file src='System.Composition.Hosting.dll' target='tools\System.Composition.Hosting.dll' />

Просмотреть файл

@ -0,0 +1,76 @@
// Copyright (c) Microsoft Corporation. All Rights Reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using Microsoft.CodeAnalysis.Sarif;
using Microsoft.Json.Schema.JsonSchemaValidator.Sarif;
using Newtonsoft.Json;
namespace Microsoft.Json.Schema.JsonSchemaValidator
{
public static class RuleExtensions
{
public static Result SetAnalysisTargetUri(this Result result, string filePath)
{
// For now, I have to make the URI absolute. Once https://github.com/Microsoft/sarif-sdk/issues/308
// is fixed, I won't have to do this. I'll just set uriKind appropriately,
// according to IsPathRooted.
UriKind uriKind = UriKind.Absolute;
if (!Path.IsPathRooted(filePath))
{
uriKind = UriKind.Relative;
filePath = Path.Combine(Environment.CurrentDirectory, filePath);
}
result.Locations.First().AnalysisTarget.Uri = new Uri(filePath, uriKind);
return result;
}
}
public static class JsonSyntaxErrorExceptionExtensions
{
public static Result ToSarifResult(this JsonSyntaxException ex)
{
string fileName = ex.FileName;
JsonReaderException jsonReaderException = ex.JsonReaderException;
Rule rule = RuleFactory.GetRuleFromErrorNumber(ErrorNumber.SyntaxError);
return new Result
{
RuleId = rule.Id,
Level = rule.DefaultLevel,
Locations = new List<Location>
{
new Location
{
AnalysisTarget = new PhysicalLocation
{
Uri = new Uri(fileName, UriKind.RelativeOrAbsolute),
Region = new Region
{
StartLine = jsonReaderException.LineNumber,
StartColumn = jsonReaderException.LinePosition
}
}
}
},
FormattedRuleMessage = new FormattedRuleMessage
{
FormatId = RuleFactory.DefaultMessageFormatId,
Arguments = new List<string>
{
jsonReaderException.Path,
jsonReaderException.Message
}
}
};
}
}
}

Просмотреть файл

@ -17,11 +17,15 @@
<HintPath>..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Sarif, Version=1.5.31.0, Culture=neutral, PublicKeyToken=a567ef0185dba9aa, processorArchitecture=MSIL">
<HintPath>..\packages\Sarif.Sdk.1.5.31\lib\net45\Sarif.dll</HintPath>
<Reference Include="Sarif, Version=1.6.0.0, Culture=neutral, PublicKeyToken=6eeb4570dcdece70, processorArchitecture=MSIL">
<HintPath>..\packages\Sarif.Sdk.1.6.0\lib\net45\Sarif.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Collections.Immutable, Version=1.1.37.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Collections.Immutable.1.1.37\lib\dotnet\System.Collections.Immutable.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
@ -31,13 +35,18 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="ExtensionMethods.cs" />
<Compile Include="Options.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Resources.Designer.cs">
<Compile Include="Sarif\ResultFactory.cs" />
<Compile Include="Sarif\RuleFactory.cs" />
<Compile Include="Validation\JTokenEqualityComparer.cs" />
<Compile Include="Validation\Validator.cs" />
<Compile Include="ValidatorResources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
<DependentUpon>ValidatorResources.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
@ -54,9 +63,9 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources.resx">
<EmbeddedResource Include="ValidatorResources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<LastGenOutput>ValidatorResources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

Просмотреть файл

@ -10,8 +10,8 @@ using System.Reflection;
using CommandLine;
using Microsoft.CodeAnalysis.Sarif;
using Microsoft.CodeAnalysis.Sarif.Writers;
using Microsoft.Json.Schema.Sarif;
using Microsoft.Json.Schema.Validation;
using Microsoft.Json.Schema.JsonSchemaValidator.Sarif;
using Microsoft.Json.Schema.JsonSchemaValidator.Validation;
namespace Microsoft.Json.Schema.JsonSchemaValidator
{
@ -38,9 +38,7 @@ namespace Microsoft.Json.Schema.JsonSchemaValidator
options.InstanceFilePath,
options.SchemaFilePath
},
verbose: true,
computeTargetsHash: false,
logEnvironment: false,
loggingOptions: LoggingOptions.Verbose,
prereleaseInfo: null,
invocationTokensToRedact: null))
{
@ -48,7 +46,7 @@ namespace Microsoft.Json.Schema.JsonSchemaValidator
exitCode = Validate(options.InstanceFilePath, options.SchemaFilePath, logger);
TimeSpan elapsedTime = DateTime.Now - start;
string message = string.Format(CultureInfo.CurrentCulture, Resources.ElapsedTime, elapsedTime);
string message = string.Format(CultureInfo.CurrentCulture, ValidatorResources.ElapsedTime, elapsedTime);
LogToolNotification(logger, message);
}
@ -76,13 +74,13 @@ namespace Microsoft.Json.Schema.JsonSchemaValidator
}
else
{
LogToolNotification(logger, Resources.Success);
LogToolNotification(logger, ValidatorResources.Success);
returnCode = 0;
}
}
catch (JsonSyntaxException ex)
{
ReportResult(ex.Result, logger);
{
ReportResult(ex.ToSarifResult(), logger);
}
catch (SchemaValidationException ex)
{
@ -101,10 +99,10 @@ namespace Microsoft.Json.Schema.JsonSchemaValidator
string schemaFile,
SarifLogger logger)
{
foreach (Result result in ex.Results)
foreach (SchemaValidationException wrappedException in ex.WrappedExceptions)
{
Result result = ResultFactory.CreateResult(wrappedException.JToken, wrappedException.ErrorNumber, wrappedException.Args);
result.SetAnalysisTargetUri(schemaFile);
ReportResult(result, logger);
}
}
@ -169,7 +167,7 @@ namespace Microsoft.Json.Schema.JsonSchemaValidator
var copyrightAttribute = attributes.Single(a => a is AssemblyCopyrightAttribute) as AssemblyCopyrightAttribute;
string copyright = copyrightAttribute.Copyright;
Console.WriteLine(string.Format(CultureInfo.CurrentCulture, Resources.Banner, programName, version));
Console.WriteLine(string.Format(CultureInfo.CurrentCulture, ValidatorResources.Banner, programName, version));
Console.WriteLine(copyright);
Console.WriteLine();
}

Просмотреть файл

@ -2,6 +2,10 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Reflection;
using System.Runtime.CompilerServices;
[assembly: AssemblyTitle("Json Schema Validation Tool")]
[assembly: AssemblyDescription("Command line tool to validate a JSON file against a JSON Schema")]
[assembly: InternalsVisibleTo("Microsoft.Json.Schema.ValidationSuiteTests, PublicKey=002400000480000094000000060200000024000052534131000400000100010011b297c974c17c656cd84846a057602d37853ca40fa0781f4fbd750d90565c0cbe6208434b3fbdb9f2125bfbf93a33204fb9c62358bdc2738286a0cc996669c8a01bf558d86be3922952f36e04700c0700cc8261375cd37783b2fbe324fa10fb93d39d1c74a3a0d10a1217209ec91b4db71a6cdbf7b4eeb7bc97701bed8aeca4")]

90
src/JsonSchemaValidator/Resources.Designer.cs сгенерированный
Просмотреть файл

@ -1,90 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Microsoft.Json.Schema.JsonSchemaValidator {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.Json.Schema.JsonSchemaValidator.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized string similar to {0} version {1}.
/// </summary>
internal static string Banner {
get {
return ResourceManager.GetString("Banner", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Validation time: {0}.
/// </summary>
internal static string ElapsedTime {
get {
return ResourceManager.GetString("ElapsedTime", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Success: The file is valid according to the schema..
/// </summary>
internal static string Success {
get {
return ResourceManager.GetString("Success", resourceCulture);
}
}
}
}

Просмотреть файл

@ -1,129 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Banner" xml:space="preserve">
<value>{0} version {1}</value>
</data>
<data name="ElapsedTime" xml:space="preserve">
<value>Validation time: {0}</value>
</data>
<data name="Success" xml:space="preserve">
<value>Success: The file is valid according to the schema.</value>
</data>
</root>

Просмотреть файл

@ -9,7 +9,7 @@ using Microsoft.CodeAnalysis.Sarif;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace Microsoft.Json.Schema.Sarif
namespace Microsoft.Json.Schema.JsonSchemaValidator.Sarif
{
internal partial class ResultFactory
{

Просмотреть файл

@ -5,7 +5,7 @@ using System.Collections.Generic;
using System.Globalization;
using Microsoft.CodeAnalysis.Sarif;
namespace Microsoft.Json.Schema.Sarif
namespace Microsoft.Json.Schema.JsonSchemaValidator.Sarif
{
// TODO Not best name. Maybe RuleDictionary.Instance and have it implement IDictionary.
public static class RuleFactory
@ -17,7 +17,7 @@ namespace Microsoft.Json.Schema.Sarif
private static Rule MakeRule(ErrorNumber errorNumber, string fullDescription, string messageFormat)
{
string messageFormatWithPath = string.Format(CultureInfo.CurrentCulture, Resources.ErrorMessageFormatWithPath, messageFormat);
string messageFormatWithPath = string.Format(CultureInfo.CurrentCulture, ValidatorResources.ErrorMessageFormatWithPath, messageFormat);
return new Rule
{
@ -36,163 +36,163 @@ namespace Microsoft.Json.Schema.Sarif
{
[ErrorNumber.SyntaxError] = MakeRule(
ErrorNumber.SyntaxError,
Resources.RuleDescriptionSyntaxError,
Resources.ErrorSyntaxError),
ValidatorResources.RuleDescriptionSyntaxError,
ValidatorResources.ErrorSyntaxError),
[ErrorNumber.NotAString] = MakeRule(
ErrorNumber.NotAString,
Resources.RuleDescriptionNotAString,
Resources.ErrorNotAString),
ValidatorResources.RuleDescriptionNotAString,
ValidatorResources.ErrorNotAString),
[ErrorNumber.InvalidAdditionalPropertiesType] = MakeRule(
ErrorNumber.InvalidAdditionalPropertiesType,
Resources.RuleDescriptionInvalidAdditionalPropertiesType,
Resources.ErrorInvalidAdditionalPropertiesType),
ValidatorResources.RuleDescriptionInvalidAdditionalPropertiesType,
ValidatorResources.ErrorInvalidAdditionalPropertiesType),
[ErrorNumber.InvalidItemsType] = MakeRule(
ErrorNumber.InvalidItemsType,
Resources.RuleDescriptionInvalidItemsType,
Resources.ErrorInvalidItemsType),
ValidatorResources.RuleDescriptionInvalidItemsType,
ValidatorResources.ErrorInvalidItemsType),
[ErrorNumber.InvalidTypeType] = MakeRule(
ErrorNumber.InvalidTypeType,
Resources.RuleDescriptionInvalidTypeType,
Resources.ErrorInvalidTypeType),
ValidatorResources.RuleDescriptionInvalidTypeType,
ValidatorResources.ErrorInvalidTypeType),
[ErrorNumber.InvalidTypeString] = MakeRule(
ErrorNumber.InvalidTypeString,
Resources.RuleDescriptionInvalidTypeString,
Resources.ErrorInvalidTypeString),
ValidatorResources.RuleDescriptionInvalidTypeString,
ValidatorResources.ErrorInvalidTypeString),
[ErrorNumber.InvalidAdditionalItemsType] = MakeRule(
ErrorNumber.InvalidAdditionalItemsType,
Resources.RuleDescriptionInvalidAdditionalItemsType,
Resources.ErrorInvalidAdditionalItemsType),
ValidatorResources.RuleDescriptionInvalidAdditionalItemsType,
ValidatorResources.ErrorInvalidAdditionalItemsType),
[ErrorNumber.InvalidDependencyType] = MakeRule(
ErrorNumber.InvalidDependencyType,
Resources.RuleDescriptionInvalidDependencyType,
Resources.ErrorInvalidDependencyType),
ValidatorResources.RuleDescriptionInvalidDependencyType,
ValidatorResources.ErrorInvalidDependencyType),
[ErrorNumber.InvalidPropertyDependencyType] = MakeRule(
ErrorNumber.InvalidPropertyDependencyType,
Resources.RuleDescriptionInvalidPropertyDependencyType,
Resources.ErrorInvalidPropertyDependencyType),
ValidatorResources.RuleDescriptionInvalidPropertyDependencyType,
ValidatorResources.ErrorInvalidPropertyDependencyType),
[ErrorNumber.WrongType] = MakeRule(
ErrorNumber.WrongType,
Resources.RuleDescriptionWrongType,
Resources.ErrorWrongType),
ValidatorResources.RuleDescriptionWrongType,
ValidatorResources.ErrorWrongType),
[ErrorNumber.RequiredPropertyMissing] = MakeRule(
ErrorNumber.RequiredPropertyMissing,
Resources.RuleDescriptionRequiredPropertyMissing,
Resources.ErrorRequiredPropertyMissing),
ValidatorResources.RuleDescriptionRequiredPropertyMissing,
ValidatorResources.ErrorRequiredPropertyMissing),
[ErrorNumber.TooFewArrayItems] = MakeRule(
ErrorNumber.TooFewArrayItems,
Resources.RuleDescriptionTooFewArrayItems,
Resources.ErrorTooFewArrayItems),
ValidatorResources.RuleDescriptionTooFewArrayItems,
ValidatorResources.ErrorTooFewArrayItems),
[ErrorNumber.TooManyArrayItems] = MakeRule(
ErrorNumber.TooManyArrayItems,
Resources.RuleDescriptionTooManyArrayItems,
Resources.ErrorTooManyArrayItems),
ValidatorResources.RuleDescriptionTooManyArrayItems,
ValidatorResources.ErrorTooManyArrayItems),
[ErrorNumber.AdditionalPropertiesProhibited] = MakeRule(
ErrorNumber.AdditionalPropertiesProhibited,
Resources.RuleDescriptionAdditionalPropertiesProhibited,
Resources.ErrorAdditionalPropertiesProhibited),
ValidatorResources.RuleDescriptionAdditionalPropertiesProhibited,
ValidatorResources.ErrorAdditionalPropertiesProhibited),
[ErrorNumber.ValueTooLarge] = MakeRule(
ErrorNumber.ValueTooLarge,
Resources.RuleDescriptionValueTooLarge,
Resources.ErrorValueTooLarge),
ValidatorResources.RuleDescriptionValueTooLarge,
ValidatorResources.ErrorValueTooLarge),
[ErrorNumber.ValueTooLargeExclusive] = MakeRule(
ErrorNumber.ValueTooLargeExclusive,
Resources.RuleDescriptionValueTooLargeExclusive,
Resources.ErrorValueTooLargeExclusive),
ValidatorResources.RuleDescriptionValueTooLargeExclusive,
ValidatorResources.ErrorValueTooLargeExclusive),
[ErrorNumber.ValueTooSmall] = MakeRule(
ErrorNumber.ValueTooSmall,
Resources.RuleDescriptionValueTooSmall,
Resources.ErrorValueTooSmall),
ValidatorResources.RuleDescriptionValueTooSmall,
ValidatorResources.ErrorValueTooSmall),
[ErrorNumber.ValueTooSmallExclusive] = MakeRule(
ErrorNumber.ValueTooSmallExclusive,
Resources.RuleDescriptionValueTooSmallExclusive,
Resources.ErrorValueTooSmallExclusive),
ValidatorResources.RuleDescriptionValueTooSmallExclusive,
ValidatorResources.ErrorValueTooSmallExclusive),
[ErrorNumber.TooManyProperties] = MakeRule(
ErrorNumber.TooManyProperties,
Resources.RuleDescriptionTooManyProperties,
Resources.ErrorTooManyProperties),
ValidatorResources.RuleDescriptionTooManyProperties,
ValidatorResources.ErrorTooManyProperties),
[ErrorNumber.TooFewProperties] = MakeRule(
ErrorNumber.TooFewProperties,
Resources.RuleDescriptionTooFewProperties,
Resources.ErrorTooFewProperties),
ValidatorResources.RuleDescriptionTooFewProperties,
ValidatorResources.ErrorTooFewProperties),
[ErrorNumber.NotAMultiple] = MakeRule(
ErrorNumber.NotAMultiple,
Resources.RuleDescriptionNotAMultiple,
Resources.ErrorNotAMultiple),
ValidatorResources.RuleDescriptionNotAMultiple,
ValidatorResources.ErrorNotAMultiple),
[ErrorNumber.StringTooLong] = MakeRule(
ErrorNumber.StringTooLong,
Resources.RuleDescriptionStringTooLong,
Resources.ErrorStringTooLong),
ValidatorResources.RuleDescriptionStringTooLong,
ValidatorResources.ErrorStringTooLong),
[ErrorNumber.StringTooShort] = MakeRule(
ErrorNumber.StringTooShort,
Resources.RuleDescriptionStringTooShort,
Resources.ErrorStringTooShort),
ValidatorResources.RuleDescriptionStringTooShort,
ValidatorResources.ErrorStringTooShort),
[ErrorNumber.StringDoesNotMatchPattern] = MakeRule(
ErrorNumber.StringDoesNotMatchPattern,
Resources.RuleDescriptionStringDoesNotMatchPattern,
Resources.ErrorStringDoesNotMatchPattern),
ValidatorResources.RuleDescriptionStringDoesNotMatchPattern,
ValidatorResources.ErrorStringDoesNotMatchPattern),
[ErrorNumber.NotAllOf] = MakeRule(
ErrorNumber.NotAllOf,
Resources.RuleDescriptionNotAllOf,
Resources.ErrorNotAllOf),
ValidatorResources.RuleDescriptionNotAllOf,
ValidatorResources.ErrorNotAllOf),
[ErrorNumber.NotAnyOf] = MakeRule(
ErrorNumber.NotAnyOf,
Resources.RuleDescriptionNotAnyOf,
Resources.ErrorNotAnyOf),
ValidatorResources.RuleDescriptionNotAnyOf,
ValidatorResources.ErrorNotAnyOf),
[ErrorNumber.NotOneOf] = MakeRule(
ErrorNumber.NotOneOf,
Resources.RuleDescriptionNotOneOf,
Resources.ErrorNotOneOf),
ValidatorResources.RuleDescriptionNotOneOf,
ValidatorResources.ErrorNotOneOf),
[ErrorNumber.InvalidEnumValue] = MakeRule(
ErrorNumber.InvalidEnumValue,
Resources.RuleDescriptionInvalidEnumValue,
Resources.ErrorInvalidEnumValue),
ValidatorResources.RuleDescriptionInvalidEnumValue,
ValidatorResources.ErrorInvalidEnumValue),
[ErrorNumber.NotUnique] = MakeRule(
ErrorNumber.NotUnique,
Resources.RuleDescriptionNotUnique,
Resources.ErrorNotUnique),
ValidatorResources.RuleDescriptionNotUnique,
ValidatorResources.ErrorNotUnique),
[ErrorNumber.TooFewItemSchemas] = MakeRule(
ErrorNumber.TooFewItemSchemas,
Resources.RuleDescriptionTooFewItemSchemas,
Resources.ErrorTooFewItemSchemas),
ValidatorResources.RuleDescriptionTooFewItemSchemas,
ValidatorResources.ErrorTooFewItemSchemas),
[ErrorNumber.ValidatesAgainstNotSchema] = MakeRule(
ErrorNumber.ValidatesAgainstNotSchema,
Resources.RuleDescriptionValidatesAgainstNotSchema,
Resources.ErrorValidatesAgainstNotSchema),
ValidatorResources.RuleDescriptionValidatesAgainstNotSchema,
ValidatorResources.ErrorValidatesAgainstNotSchema),
[ErrorNumber.DependentPropertyMissing] = MakeRule(
ErrorNumber.DependentPropertyMissing,
Resources.RuleDescriptionDependentPropertyMissing,
Resources.ErrorDependentPropertyMissing)
ValidatorResources.RuleDescriptionDependentPropertyMissing,
ValidatorResources.ErrorDependentPropertyMissing)
};
public static Rule GetRuleFromRuleId(string ruleId)

Просмотреть файл

@ -6,7 +6,7 @@ using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json.Linq;
namespace Microsoft.Json.Schema.Validation
namespace Microsoft.Json.Schema.JsonSchemaValidator.Validation
{
internal class JTokenEqualityComparer : IEqualityComparer<JToken>
{

Просмотреть файл

@ -7,11 +7,11 @@ using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using Microsoft.CodeAnalysis.Sarif;
using Microsoft.Json.Schema.Sarif;
using Microsoft.Json.Schema.JsonSchemaValidator.Sarif;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace Microsoft.Json.Schema.Validation
namespace Microsoft.Json.Schema.JsonSchemaValidator.Validation
{
/// <summary>
/// Validates a JSON instance against a schema.

721
src/JsonSchemaValidator/ValidatorResources.Designer.cs сгенерированный Normal file
Просмотреть файл

@ -0,0 +1,721 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Microsoft.Json.Schema.JsonSchemaValidator {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class ValidatorResources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal ValidatorResources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.Json.Schema.JsonSchemaValidator.ValidatorResources", typeof(ValidatorResources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized string similar to {0} version {1}.
/// </summary>
internal static string Banner {
get {
return ResourceManager.GetString("Banner", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Validation time: {0}.
/// </summary>
internal static string ElapsedTime {
get {
return ResourceManager.GetString("ElapsedTime", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The schema does not define a property named &quot;{1}&quot;, and the schema does not permit additional properties..
/// </summary>
internal static string ErrorAdditionalPropertiesProhibited {
get {
return ResourceManager.GetString("ErrorAdditionalPropertiesProhibited", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to This schema does not contain the sub-schema definition referred to by the $ref value &quot;{0}&quot;..
/// </summary>
internal static string ErrorDefinitionDoesNotExist {
get {
return ResourceManager.GetString("ErrorDefinitionDoesNotExist", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The schema requires that when property &quot;{1}&quot; is present, properties [{2}] are also present, but properties [{3}] are missing..
/// </summary>
internal static string ErrorDependentPropertyMissing {
get {
return ResourceManager.GetString("ErrorDependentPropertyMissing", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to JSON schema requires the value of &quot;additionalItems&quot; to be either a Boolean or a schema, but a token of type &quot;{1}&quot; was seen..
/// </summary>
internal static string ErrorInvalidAdditionalItemsType {
get {
return ResourceManager.GetString("ErrorInvalidAdditionalItemsType", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to JSON schema requires the value of &quot;additionalProperties&quot; to be either a Boolean or a schema, but a token of type &quot;{1}&quot; was seen..
/// </summary>
internal static string ErrorInvalidAdditionalPropertiesType {
get {
return ResourceManager.GetString("ErrorInvalidAdditionalPropertiesType", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to JSON schema requires the value of each property of the &quot;dependencies&quot; object, to be either an schema or an array of strings, but a token of type &quot;{1}&quot; was seen..
/// </summary>
internal static string ErrorInvalidDependencyType {
get {
return ResourceManager.GetString("ErrorInvalidDependencyType", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The value &quot;{1}&quot; does not match any of the enum values [{2}]..
/// </summary>
internal static string ErrorInvalidEnumValue {
get {
return ResourceManager.GetString("ErrorInvalidEnumValue", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to JSON schema requires the value of &quot;items&quot; to be either a schema or an array of schemas, but a token of type &quot;{1}&quot; was seen..
/// </summary>
internal static string ErrorInvalidItemsType {
get {
return ResourceManager.GetString("ErrorInvalidItemsType", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to JSON requires that if the value of a property of the &quot;dependencies&quot; object is an array, then every element of the array must be a string, but a token of type &quot;{1}&quot; was seen..
/// </summary>
internal static string ErrorInvalidPropertyDependencyType {
get {
return ResourceManager.GetString("ErrorInvalidPropertyDependencyType", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to &quot;{1}&quot; is not a valid schema type..
/// </summary>
internal static string ErrorInvalidTypeString {
get {
return ResourceManager.GetString("ErrorInvalidTypeString", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to JSON schema requires the value of &quot;type&quot; to be either a string or an array of strings, but a token of type &quot;{1}&quot; was seen..
/// </summary>
internal static string ErrorInvalidTypeType {
get {
return ResourceManager.GetString("ErrorInvalidTypeType", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to at &quot;{{0}}&quot;: {0}.
/// </summary>
internal static string ErrorMessageFormatWithPath {
get {
return ResourceManager.GetString("ErrorMessageFormatWithPath", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The instance does not validate successfully against all of the {1} schemas specified by &quot;allOf&quot;..
/// </summary>
internal static string ErrorNotAllOf {
get {
return ResourceManager.GetString("ErrorNotAllOf", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The value {1} is not a multiple of {2}..
/// </summary>
internal static string ErrorNotAMultiple {
get {
return ResourceManager.GetString("ErrorNotAMultiple", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The instance does validate successfully against any of the {1} schemas specified by &quot;anyOf&quot;..
/// </summary>
internal static string ErrorNotAnyOf {
get {
return ResourceManager.GetString("ErrorNotAnyOf", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The property is required to be a string, but the token is of type &quot;{1}&quot;..
/// </summary>
internal static string ErrorNotAString {
get {
return ResourceManager.GetString("ErrorNotAString", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The instance validates successfully against {1} of the {2} schemas specified by &quot;oneOf&quot;, instead of validating successfully against exactly one of them..
/// </summary>
internal static string ErrorNotOneOf {
get {
return ResourceManager.GetString("ErrorNotOneOf", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The elements of the array are not unique..
/// </summary>
internal static string ErrorNotUnique {
get {
return ResourceManager.GetString("ErrorNotUnique", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to This partial implementation of JSON Schema only accepts $ref values in the form of fragments that refer to sub-properties of the &quot;definitions&quot; property, for example &quot;#/definitions/def1&quot;. The URI reference&quot;{0}&quot; is not supported..
/// </summary>
internal static string ErrorOnlyDefinitionFragmentsSupported {
get {
return ResourceManager.GetString("ErrorOnlyDefinitionFragmentsSupported", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The required property &quot;{1}&quot; is missing..
/// </summary>
internal static string ErrorRequiredPropertyMissing {
get {
return ResourceManager.GetString("ErrorRequiredPropertyMissing", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The string &quot;{1}&quot; does not match the regular expression &quot;{2}&quot;..
/// </summary>
internal static string ErrorStringDoesNotMatchPattern {
get {
return ResourceManager.GetString("ErrorStringDoesNotMatchPattern", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The string &quot;{1}&quot; has length {2}, which is greater than the maximum length {3}.
///.
/// </summary>
internal static string ErrorStringTooLong {
get {
return ResourceManager.GetString("ErrorStringTooLong", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The string &quot;{1}&quot; has length {2}, which is less than the minimum length {3}..
/// </summary>
internal static string ErrorStringTooShort {
get {
return ResourceManager.GetString("ErrorStringTooShort", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to JSON syntax error: {1}.
/// </summary>
internal static string ErrorSyntaxError {
get {
return ResourceManager.GetString("ErrorSyntaxError", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The schema requires at least {1} array items, but there are {2}..
/// </summary>
internal static string ErrorTooFewArrayItems {
get {
return ResourceManager.GetString("ErrorTooFewArrayItems", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The array has {1} items, but the array of schemas specified by &quot;items&quot; has only {2} items, and &quot;additionalItems&quot; is not specified to allow additional array items..
/// </summary>
internal static string ErrorTooFewItemSchemas {
get {
return ResourceManager.GetString("ErrorTooFewItemSchemas", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The schema requires at least {1} object properties, but there are {2}..
/// </summary>
internal static string ErrorTooFewProperties {
get {
return ResourceManager.GetString("ErrorTooFewProperties", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The schema permits at most {1} array items, but there are {2}..
/// </summary>
internal static string ErrorTooManyArrayItems {
get {
return ResourceManager.GetString("ErrorTooManyArrayItems", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The schema permits at most {1} object properties, but there are {2}..
/// </summary>
internal static string ErrorTooManyProperties {
get {
return ResourceManager.GetString("ErrorTooManyProperties", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The instance validates successfully against the schema specified by &quot;not&quot;..
/// </summary>
internal static string ErrorValidatesAgainstNotSchema {
get {
return ResourceManager.GetString("ErrorValidatesAgainstNotSchema", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The value {1} is greater than the maximum value of {2}..
/// </summary>
internal static string ErrorValueTooLarge {
get {
return ResourceManager.GetString("ErrorValueTooLarge", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The value {1} is greater than or equal to the exclusive maximum value of {2}..
/// </summary>
internal static string ErrorValueTooLargeExclusive {
get {
return ResourceManager.GetString("ErrorValueTooLargeExclusive", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The value {1} is less than the minimum value of {2}..
/// </summary>
internal static string ErrorValueTooSmall {
get {
return ResourceManager.GetString("ErrorValueTooSmall", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The value {1} is less than or equal to the exclusive minimum value of {2}..
/// </summary>
internal static string ErrorValueTooSmallExclusive {
get {
return ResourceManager.GetString("ErrorValueTooSmallExclusive", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to ({0},{1}): error {2}: {3}.
/// </summary>
internal static string ErrorWithLineInfo {
get {
return ResourceManager.GetString("ErrorWithLineInfo", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to ({0},{1}): error {2}: at {3}: {4}.
/// </summary>
internal static string ErrorWithLineInfoAndPath {
get {
return ResourceManager.GetString("ErrorWithLineInfoAndPath", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The schema requires one of the types [{1}], but a token of type &quot;{2}&quot; was found..
/// </summary>
internal static string ErrorWrongType {
get {
return ResourceManager.GetString("ErrorWrongType", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The schema does not specify a single schema for all array items. Access the per-item schemas through the Schemas property..
/// </summary>
internal static string ExceptionNotASingleSchema {
get {
return ResourceManager.GetString("ExceptionNotASingleSchema", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to An object contains a property not defined by the schema is present, and the schema does not permit additional properties..
/// </summary>
internal static string RuleDescriptionAdditionalPropertiesProhibited {
get {
return ResourceManager.GetString("RuleDescriptionAdditionalPropertiesProhibited", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to An instance does not have all the properties specified in the schema by a property dependency..
/// </summary>
internal static string RuleDescriptionDependentPropertyMissing {
get {
return ResourceManager.GetString("RuleDescriptionDependentPropertyMissing", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The value of the &quot;additionalItems&quot; schema property is neither a Boolean nor a schema..
/// </summary>
internal static string RuleDescriptionInvalidAdditionalItemsType {
get {
return ResourceManager.GetString("RuleDescriptionInvalidAdditionalItemsType", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The value of the &quot;additionalProperties&quot; schema property is neither a boolean nor an object..
/// </summary>
internal static string RuleDescriptionInvalidAdditionalPropertiesType {
get {
return ResourceManager.GetString("RuleDescriptionInvalidAdditionalPropertiesType", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The value of one of the properties of the &quot;dependencies&quot; schema property is either a schema nor an array of strings..
/// </summary>
internal static string RuleDescriptionInvalidDependencyType {
get {
return ResourceManager.GetString("RuleDescriptionInvalidDependencyType", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to A string does not match any of the values specified by the schema&apos;s &quot;enum&quot; property..
/// </summary>
internal static string RuleDescriptionInvalidEnumValue {
get {
return ResourceManager.GetString("RuleDescriptionInvalidEnumValue", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The value of the &quot;items&quot; property is neither a schema nor an array of schemas..
/// </summary>
internal static string RuleDescriptionInvalidItemsType {
get {
return ResourceManager.GetString("RuleDescriptionInvalidItemsType", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The value of one of the properties of the &quot;dependencies&quot; schema property is an array which contains an element which is not a string..
/// </summary>
internal static string RuleDescriptionInvalidPropertyDependencyType {
get {
return ResourceManager.GetString("RuleDescriptionInvalidPropertyDependencyType", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The string value of the &quot;type&quot; schema property is not one of the valid values..
/// </summary>
internal static string RuleDescriptionInvalidTypeString {
get {
return ResourceManager.GetString("RuleDescriptionInvalidTypeString", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The value of the &quot;type&quot; schema property is neither a string nor an array of strings..
/// </summary>
internal static string RuleDescriptionInvalidTypeType {
get {
return ResourceManager.GetString("RuleDescriptionInvalidTypeType", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to n instance does not successfully validate against all of the schemas by the schema&apos;s &quot;allOf&quot; property..
/// </summary>
internal static string RuleDescriptionNotAllOf {
get {
return ResourceManager.GetString("RuleDescriptionNotAllOf", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to A numeric value is not a multiple of the value specified by the schema&apos;s &quot;multipleOf&quot; property..
/// </summary>
internal static string RuleDescriptionNotAMultiple {
get {
return ResourceManager.GetString("RuleDescriptionNotAMultiple", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to An instance does not successfully validate against any of the schemas by the schema&apos;s &quot;anyOf&quot; property..
/// </summary>
internal static string RuleDescriptionNotAnyOf {
get {
return ResourceManager.GetString("RuleDescriptionNotAnyOf", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to A schema property that is required to be a string is not a string..
/// </summary>
internal static string RuleDescriptionNotAString {
get {
return ResourceManager.GetString("RuleDescriptionNotAString", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to An instance does not successfully validate against exactly one of the schemas by the schema&apos;s &quot;oneOf&quot; property..
/// </summary>
internal static string RuleDescriptionNotOneOf {
get {
return ResourceManager.GetString("RuleDescriptionNotOneOf", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to An array&apos;s elements are not unique, as required by the schema&apos;s &quot;uniqueItems&quot; property..
/// </summary>
internal static string RuleDescriptionNotUnique {
get {
return ResourceManager.GetString("RuleDescriptionNotUnique", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to A property required by the schema&apos;s &quot;required&quot; property is missing..
/// </summary>
internal static string RuleDescriptionRequiredPropertyMissing {
get {
return ResourceManager.GetString("RuleDescriptionRequiredPropertyMissing", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to A string does not match the regular expression pattern specified by the schema&apos;s &quot;pattern&quot; property..
/// </summary>
internal static string RuleDescriptionStringDoesNotMatchPattern {
get {
return ResourceManager.GetString("RuleDescriptionStringDoesNotMatchPattern", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to A string is longer than permitted by the schema&apos;s &quot;maxLength&quot; property..
/// </summary>
internal static string RuleDescriptionStringTooLong {
get {
return ResourceManager.GetString("RuleDescriptionStringTooLong", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to A string is shorter than permitted by the schema&apos;s &quot;minLength&quot; property..
/// </summary>
internal static string RuleDescriptionStringTooShort {
get {
return ResourceManager.GetString("RuleDescriptionStringTooShort", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The schema is not a valid JSON document..
/// </summary>
internal static string RuleDescriptionSyntaxError {
get {
return ResourceManager.GetString("RuleDescriptionSyntaxError", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to An array has fewer elements than permitted by the schema&apos;s &quot;minItems&quot; property..
/// </summary>
internal static string RuleDescriptionTooFewArrayItems {
get {
return ResourceManager.GetString("RuleDescriptionTooFewArrayItems", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to An array has more elements than the number of elements in the array specified by the schema&apos;s &quot;items&quot; property, and the schema does not permit additional array items..
/// </summary>
internal static string RuleDescriptionTooFewItemSchemas {
get {
return ResourceManager.GetString("RuleDescriptionTooFewItemSchemas", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to An object has fewer properties than permitted by the schema&apos;s &quot;minProperties&quot; property..
/// </summary>
internal static string RuleDescriptionTooFewProperties {
get {
return ResourceManager.GetString("RuleDescriptionTooFewProperties", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to An array has more elements than permitted by the schema&apos;s &quot;maxItems&quot; property..
/// </summary>
internal static string RuleDescriptionTooManyArrayItems {
get {
return ResourceManager.GetString("RuleDescriptionTooManyArrayItems", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to An object has more properties than permitted by the schema&apos;s &quot;maxProperties&quot; property..
/// </summary>
internal static string RuleDescriptionTooManyProperties {
get {
return ResourceManager.GetString("RuleDescriptionTooManyProperties", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to An instance successfully validates against the schema specified by the schema&apos;s &quot;not&quot; property..
/// </summary>
internal static string RuleDescriptionValidatesAgainstNotSchema {
get {
return ResourceManager.GetString("RuleDescriptionValidatesAgainstNotSchema", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to A numeric value is greater than the maximum value permitted by the schema&apos;s &quot;maximum&quot; property..
/// </summary>
internal static string RuleDescriptionValueTooLarge {
get {
return ResourceManager.GetString("RuleDescriptionValueTooLarge", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to A numeric value is greater than or equal to the exclusive maximum value permitted by the schema&apos;s &quot;maximum&quot; and &quot;exclusiveMaximum&quot; properties..
/// </summary>
internal static string RuleDescriptionValueTooLargeExclusive {
get {
return ResourceManager.GetString("RuleDescriptionValueTooLargeExclusive", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to A numeric value is less than the minimum value permitted by the schema&apos;s &quot;minimum&quot; property..
/// </summary>
internal static string RuleDescriptionValueTooSmall {
get {
return ResourceManager.GetString("RuleDescriptionValueTooSmall", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to A numeric value is less than or equal to the exclusive minimum value permitted by the schema&apos;s &quot;minimum&quot; and &quot;exclusiveMinimum&quot; properties..
/// </summary>
internal static string RuleDescriptionValueTooSmallExclusive {
get {
return ResourceManager.GetString("RuleDescriptionValueTooSmallExclusive", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to An instance has a type that is not permitted by the schema&apos;s &quot;type&quot; property..
/// </summary>
internal static string RuleDescriptionWrongType {
get {
return ResourceManager.GetString("RuleDescriptionWrongType", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Success: The file is valid according to the schema..
/// </summary>
internal static string Success {
get {
return ResourceManager.GetString("Success", resourceCulture);
}
}
}
}

Просмотреть файл

@ -0,0 +1,340 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Banner" xml:space="preserve">
<value>{0} version {1}</value>
</data>
<data name="ElapsedTime" xml:space="preserve">
<value>Validation time: {0}</value>
</data>
<data name="ErrorAdditionalPropertiesProhibited" xml:space="preserve">
<value>The schema does not define a property named "{1}", and the schema does not permit additional properties.</value>
</data>
<data name="ErrorDefinitionDoesNotExist" xml:space="preserve">
<value>This schema does not contain the sub-schema definition referred to by the $ref value "{0}".</value>
</data>
<data name="ErrorDependentPropertyMissing" xml:space="preserve">
<value>The schema requires that when property "{1}" is present, properties [{2}] are also present, but properties [{3}] are missing.</value>
</data>
<data name="ErrorInvalidAdditionalItemsType" xml:space="preserve">
<value>JSON schema requires the value of "additionalItems" to be either a Boolean or a schema, but a token of type "{1}" was seen.</value>
</data>
<data name="ErrorInvalidAdditionalPropertiesType" xml:space="preserve">
<value>JSON schema requires the value of "additionalProperties" to be either a Boolean or a schema, but a token of type "{1}" was seen.</value>
</data>
<data name="ErrorInvalidDependencyType" xml:space="preserve">
<value>JSON schema requires the value of each property of the "dependencies" object, to be either an schema or an array of strings, but a token of type "{1}" was seen.</value>
</data>
<data name="ErrorInvalidEnumValue" xml:space="preserve">
<value>The value "{1}" does not match any of the enum values [{2}].</value>
</data>
<data name="ErrorInvalidItemsType" xml:space="preserve">
<value>JSON schema requires the value of "items" to be either a schema or an array of schemas, but a token of type "{1}" was seen.</value>
</data>
<data name="ErrorInvalidPropertyDependencyType" xml:space="preserve">
<value>JSON requires that if the value of a property of the "dependencies" object is an array, then every element of the array must be a string, but a token of type "{1}" was seen.</value>
</data>
<data name="ErrorInvalidTypeString" xml:space="preserve">
<value>"{1}" is not a valid schema type.</value>
</data>
<data name="ErrorInvalidTypeType" xml:space="preserve">
<value>JSON schema requires the value of "type" to be either a string or an array of strings, but a token of type "{1}" was seen.</value>
</data>
<data name="ErrorMessageFormatWithPath" xml:space="preserve">
<value>at "{{0}}": {0}</value>
</data>
<data name="ErrorNotAllOf" xml:space="preserve">
<value>The instance does not validate successfully against all of the {1} schemas specified by "allOf".</value>
</data>
<data name="ErrorNotAMultiple" xml:space="preserve">
<value>The value {1} is not a multiple of {2}.</value>
</data>
<data name="ErrorNotAnyOf" xml:space="preserve">
<value>The instance does validate successfully against any of the {1} schemas specified by "anyOf".</value>
</data>
<data name="ErrorNotAString" xml:space="preserve">
<value>The property is required to be a string, but the token is of type "{1}".</value>
</data>
<data name="ErrorNotOneOf" xml:space="preserve">
<value>The instance validates successfully against {1} of the {2} schemas specified by "oneOf", instead of validating successfully against exactly one of them.</value>
</data>
<data name="ErrorNotUnique" xml:space="preserve">
<value>The elements of the array are not unique.</value>
</data>
<data name="ErrorOnlyDefinitionFragmentsSupported" xml:space="preserve">
<value>This partial implementation of JSON Schema only accepts $ref values in the form of fragments that refer to sub-properties of the "definitions" property, for example "#/definitions/def1". The URI reference"{0}" is not supported.</value>
</data>
<data name="ErrorRequiredPropertyMissing" xml:space="preserve">
<value>The required property "{1}" is missing.</value>
</data>
<data name="ErrorStringDoesNotMatchPattern" xml:space="preserve">
<value>The string "{1}" does not match the regular expression "{2}".</value>
</data>
<data name="ErrorStringTooLong" xml:space="preserve">
<value>The string "{1}" has length {2}, which is greater than the maximum length {3}.
</value>
</data>
<data name="ErrorStringTooShort" xml:space="preserve">
<value>The string "{1}" has length {2}, which is less than the minimum length {3}.</value>
</data>
<data name="ErrorSyntaxError" xml:space="preserve">
<value>JSON syntax error: {1}</value>
</data>
<data name="ErrorTooFewArrayItems" xml:space="preserve">
<value>The schema requires at least {1} array items, but there are {2}.</value>
</data>
<data name="ErrorTooFewItemSchemas" xml:space="preserve">
<value>The array has {1} items, but the array of schemas specified by "items" has only {2} items, and "additionalItems" is not specified to allow additional array items.</value>
</data>
<data name="ErrorTooFewProperties" xml:space="preserve">
<value>The schema requires at least {1} object properties, but there are {2}.</value>
</data>
<data name="ErrorTooManyArrayItems" xml:space="preserve">
<value>The schema permits at most {1} array items, but there are {2}.</value>
</data>
<data name="ErrorTooManyProperties" xml:space="preserve">
<value>The schema permits at most {1} object properties, but there are {2}.</value>
</data>
<data name="ErrorValidatesAgainstNotSchema" xml:space="preserve">
<value>The instance validates successfully against the schema specified by "not".</value>
</data>
<data name="ErrorValueTooLarge" xml:space="preserve">
<value>The value {1} is greater than the maximum value of {2}.</value>
</data>
<data name="ErrorValueTooLargeExclusive" xml:space="preserve">
<value>The value {1} is greater than or equal to the exclusive maximum value of {2}.</value>
</data>
<data name="ErrorValueTooSmall" xml:space="preserve">
<value>The value {1} is less than the minimum value of {2}.</value>
</data>
<data name="ErrorValueTooSmallExclusive" xml:space="preserve">
<value>The value {1} is less than or equal to the exclusive minimum value of {2}.</value>
</data>
<data name="ErrorWithLineInfo" xml:space="preserve">
<value>({0},{1}): error {2}: {3}</value>
</data>
<data name="ErrorWithLineInfoAndPath" xml:space="preserve">
<value>({0},{1}): error {2}: at {3}: {4}</value>
</data>
<data name="ErrorWrongType" xml:space="preserve">
<value>The schema requires one of the types [{1}], but a token of type "{2}" was found.</value>
</data>
<data name="ExceptionNotASingleSchema" xml:space="preserve">
<value>The schema does not specify a single schema for all array items. Access the per-item schemas through the Schemas property.</value>
</data>
<data name="RuleDescriptionAdditionalPropertiesProhibited" xml:space="preserve">
<value>An object contains a property not defined by the schema is present, and the schema does not permit additional properties.</value>
</data>
<data name="RuleDescriptionDependentPropertyMissing" xml:space="preserve">
<value>An instance does not have all the properties specified in the schema by a property dependency.</value>
</data>
<data name="RuleDescriptionInvalidAdditionalItemsType" xml:space="preserve">
<value>The value of the "additionalItems" schema property is neither a Boolean nor a schema.</value>
</data>
<data name="RuleDescriptionInvalidAdditionalPropertiesType" xml:space="preserve">
<value>The value of the "additionalProperties" schema property is neither a boolean nor an object.</value>
</data>
<data name="RuleDescriptionInvalidDependencyType" xml:space="preserve">
<value>The value of one of the properties of the "dependencies" schema property is either a schema nor an array of strings.</value>
</data>
<data name="RuleDescriptionInvalidEnumValue" xml:space="preserve">
<value>A string does not match any of the values specified by the schema's "enum" property.</value>
</data>
<data name="RuleDescriptionInvalidItemsType" xml:space="preserve">
<value>The value of the "items" property is neither a schema nor an array of schemas.</value>
</data>
<data name="RuleDescriptionInvalidPropertyDependencyType" xml:space="preserve">
<value>The value of one of the properties of the "dependencies" schema property is an array which contains an element which is not a string.</value>
</data>
<data name="RuleDescriptionInvalidTypeString" xml:space="preserve">
<value>The string value of the "type" schema property is not one of the valid values.</value>
</data>
<data name="RuleDescriptionInvalidTypeType" xml:space="preserve">
<value>The value of the "type" schema property is neither a string nor an array of strings.</value>
</data>
<data name="RuleDescriptionNotAllOf" xml:space="preserve">
<value>n instance does not successfully validate against all of the schemas by the schema's "allOf" property.</value>
</data>
<data name="RuleDescriptionNotAMultiple" xml:space="preserve">
<value>A numeric value is not a multiple of the value specified by the schema's "multipleOf" property.</value>
</data>
<data name="RuleDescriptionNotAnyOf" xml:space="preserve">
<value>An instance does not successfully validate against any of the schemas by the schema's "anyOf" property.</value>
</data>
<data name="RuleDescriptionNotAString" xml:space="preserve">
<value>A schema property that is required to be a string is not a string.</value>
</data>
<data name="RuleDescriptionNotOneOf" xml:space="preserve">
<value>An instance does not successfully validate against exactly one of the schemas by the schema's "oneOf" property.</value>
</data>
<data name="RuleDescriptionNotUnique" xml:space="preserve">
<value>An array's elements are not unique, as required by the schema's "uniqueItems" property.</value>
</data>
<data name="RuleDescriptionRequiredPropertyMissing" xml:space="preserve">
<value>A property required by the schema's "required" property is missing.</value>
</data>
<data name="RuleDescriptionStringDoesNotMatchPattern" xml:space="preserve">
<value>A string does not match the regular expression pattern specified by the schema's "pattern" property.</value>
</data>
<data name="RuleDescriptionStringTooLong" xml:space="preserve">
<value>A string is longer than permitted by the schema's "maxLength" property.</value>
</data>
<data name="RuleDescriptionStringTooShort" xml:space="preserve">
<value>A string is shorter than permitted by the schema's "minLength" property.</value>
</data>
<data name="RuleDescriptionSyntaxError" xml:space="preserve">
<value>The schema is not a valid JSON document.</value>
</data>
<data name="RuleDescriptionTooFewArrayItems" xml:space="preserve">
<value>An array has fewer elements than permitted by the schema's "minItems" property.</value>
</data>
<data name="RuleDescriptionTooFewItemSchemas" xml:space="preserve">
<value>An array has more elements than the number of elements in the array specified by the schema's "items" property, and the schema does not permit additional array items.</value>
</data>
<data name="RuleDescriptionTooFewProperties" xml:space="preserve">
<value>An object has fewer properties than permitted by the schema's "minProperties" property.</value>
</data>
<data name="RuleDescriptionTooManyArrayItems" xml:space="preserve">
<value>An array has more elements than permitted by the schema's "maxItems" property.</value>
</data>
<data name="RuleDescriptionTooManyProperties" xml:space="preserve">
<value>An object has more properties than permitted by the schema's "maxProperties" property.</value>
</data>
<data name="RuleDescriptionValidatesAgainstNotSchema" xml:space="preserve">
<value>An instance successfully validates against the schema specified by the schema's "not" property.</value>
</data>
<data name="RuleDescriptionValueTooLarge" xml:space="preserve">
<value>A numeric value is greater than the maximum value permitted by the schema's "maximum" property.</value>
</data>
<data name="RuleDescriptionValueTooLargeExclusive" xml:space="preserve">
<value>A numeric value is greater than or equal to the exclusive maximum value permitted by the schema's "maximum" and "exclusiveMaximum" properties.</value>
</data>
<data name="RuleDescriptionValueTooSmall" xml:space="preserve">
<value>A numeric value is less than the minimum value permitted by the schema's "minimum" property.</value>
</data>
<data name="RuleDescriptionValueTooSmallExclusive" xml:space="preserve">
<value>A numeric value is less than or equal to the exclusive minimum value permitted by the schema's "minimum" and "exclusiveMinimum" properties.</value>
</data>
<data name="RuleDescriptionWrongType" xml:space="preserve">
<value>An instance has a type that is not permitted by the schema's "type" property.</value>
</data>
<data name="Success" xml:space="preserve">
<value>Success: The file is valid according to the schema.</value>
</data>
</root>

Просмотреть файл

@ -2,5 +2,14 @@
<packages>
<package id="CommandLineParser" version="2.0.273-beta" targetFramework="net451" />
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net452" />
<package id="Sarif.Sdk" version="1.5.31" targetFramework="net45" />
<package id="Sarif.Sdk" version="1.6.0" targetFramework="net451" />
<package id="System.Collections" version="4.0.0" targetFramework="net451" />
<package id="System.Collections.Immutable" version="1.1.37" targetFramework="net451" />
<package id="System.Diagnostics.Debug" version="4.0.0" targetFramework="net451" />
<package id="System.Globalization" version="4.0.0" targetFramework="net451" />
<package id="System.Linq" version="4.0.0" targetFramework="net451" />
<package id="System.Resources.ResourceManager" version="4.0.0" targetFramework="net451" />
<package id="System.Runtime" version="4.0.0" targetFramework="net451" />
<package id="System.Runtime.Extensions" version="4.0.0" targetFramework="net451" />
<package id="System.Threading" version="4.0.0" targetFramework="net451" />
</packages>

Просмотреть файл

@ -1,6 +1,6 @@
<CurrentVersion>
<Major>0</Major>
<Minor>49</Minor>
<Minor>50</Minor>
<Patch>0</Patch>
<PreRelease></PreRelease>
</CurrentVersion>