Skip to content

Commit 7ec8b11

Browse files
committed
Adjust package names and visibility
1 parent 5d6ca2a commit 7ec8b11

File tree

108 files changed

+6901
-6883
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+6901
-6883
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<Import Project="$(EndjinProjectPropsPath)" Condition="$(EndjinProjectPropsPath) != ''" />
3+
4+
<PropertyGroup>
5+
<TargetFramework>net6.0</TargetFramework>
6+
<ImplicitUsings>enable</ImplicitUsings>
7+
<Nullable>enable</Nullable>
8+
</PropertyGroup>
9+
10+
<PropertyGroup>
11+
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
12+
<Description>Defines .NET types representing data types found in JSON, including numerous types for specialized string forms such as JsonUuid and JsonDateTime.</Description>
13+
</PropertyGroup>
14+
15+
16+
<ItemGroup>
17+
<PackageReference Include="Corvus.Extensions" Version="1.1.4" />
18+
<PackageReference Include="Endjin.RecommendedPractices" Version="1.2.0">
19+
<PrivateAssets>all</PrivateAssets>
20+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
21+
</PackageReference>
22+
<PackageReference Include="Microsoft.Extensions.Http" Version="6.0.0" />
23+
<PackageReference Include="Microsoft.Extensions.ObjectPool" Version="6.0.5" />
24+
<PackageReference Include="NodaTime" Version="3.1.0" />
25+
<PackageReference Include="System.Buffers" Version="4.5.1" />
26+
<PackageReference Include="System.Collections.Immutable" Version="6.0.0" />
27+
<PackageReference Include="System.Text.Json" Version="6.0.4" />
28+
</ItemGroup>
29+
30+
31+
<ItemGroup>
32+
<ProjectReference Include="..\Corvus.JsonHelpers\Corvus.JsonHelpers.csproj" />
33+
</ItemGroup>
34+
35+
<ItemGroup>
36+
<PackageReference Update="StyleCop.Analyzers" Version="1.2.0-beta.333" />
37+
</ItemGroup>
38+
39+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<Import Project="$(EndjinProjectPropsPath)" Condition="$(EndjinProjectPropsPath) != ''" />
4+
5+
<PropertyGroup>
6+
<TargetFramework>net6.0</TargetFramework>
7+
<ImplicitUsings>enable</ImplicitUsings>
8+
<Nullable>enable</Nullable>
9+
</PropertyGroup>
10+
11+
<PropertyGroup>
12+
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
13+
<Description>Object models representing JSON Schema documents (201909 and 202012 drafts)</Description>
14+
</PropertyGroup>
15+
16+
17+
<ItemGroup>
18+
<PackageReference Include="Endjin.RecommendedPractices" Version="1.2.0">
19+
<PrivateAssets>all</PrivateAssets>
20+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
21+
</PackageReference>
22+
</ItemGroup>
23+
24+
25+
<ItemGroup>
26+
<ProjectReference Include="..\Corvus.Json.ExtendedTypes\Corvus.Json.ExtendedTypes.csproj" />
27+
</ItemGroup>
28+
29+
</Project>

Solutions/Corvus.JsonSchema/Corvus.Json/Draft201909/Applicator.cs Solutions/Corvus.Json.JsonSchema/Corvus.Json.JsonSchema/Draft201909/Applicator.cs

+171-171
Large diffs are not rendered by default.

Solutions/Corvus.JsonSchema/Corvus.Json/Draft201909/Content.cs Solutions/Corvus.Json.JsonSchema/Corvus.Json.JsonSchema/Draft201909/Content.cs

+7-7
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// </auto-generated>
88
//------------------------------------------------------------------------------
99
#nullable enable
10-
namespace Corvus.Json.Draft201909
10+
namespace Corvus.Json.JsonSchema.Draft201909
1111
{
1212
using System;
1313
using System.Collections.Generic;
@@ -200,7 +200,7 @@ public Corvus.Json.JsonString ContentEncoding
200200
/// <example>
201201
/// {Property examples}.
202202
/// </example>
203-
public Corvus.Json.Draft201909.Schema ContentSchema
203+
public Corvus.Json.JsonSchema.Draft201909.Schema ContentSchema
204204
{
205205
get
206206
{
@@ -216,7 +216,7 @@ public Corvus.Json.Draft201909.Schema ContentSchema
216216
{
217217
if (this.jsonElementBacking.TryGetProperty(ContentSchemaUtf8JsonPropertyName.Span, out JsonElement result))
218218
{
219-
return new Corvus.Json.Draft201909.Schema(result);
219+
return new Corvus.Json.JsonSchema.Draft201909.Schema(result);
220220
}
221221
}
222222

@@ -407,7 +407,7 @@ public static implicit operator JsonBoolean(Content boolean)
407407
/// <summary>
408408
/// Creates an instance of a <see cref = "Content"/>.
409409
/// </summary>
410-
public static Content Create(Corvus.Json.JsonString? contentMediaType = null, Corvus.Json.JsonString? contentEncoding = null, Corvus.Json.Draft201909.Schema? contentSchema = null)
410+
public static Content Create(Corvus.Json.JsonString? contentMediaType = null, Corvus.Json.JsonString? contentEncoding = null, Corvus.Json.JsonSchema.Draft201909.Schema? contentSchema = null)
411411
{
412412
var builder = ImmutableDictionary.CreateBuilder<string, JsonAny>();
413413
if (contentMediaType is Corvus.Json.JsonString contentMediaType__)
@@ -420,7 +420,7 @@ public static Content Create(Corvus.Json.JsonString? contentMediaType = null, Co
420420
builder.Add(ContentEncodingJsonPropertyName, contentEncoding__);
421421
}
422422

423-
if (contentSchema is Corvus.Json.Draft201909.Schema contentSchema__)
423+
if (contentSchema is Corvus.Json.JsonSchema.Draft201909.Schema contentSchema__)
424424
{
425425
builder.Add(ContentSchemaJsonPropertyName, contentSchema__);
426426
}
@@ -453,7 +453,7 @@ public Content WithContentEncoding(Corvus.Json.JsonString value)
453453
/// </summary>
454454
/// <param name = "value">The value to set.</param>
455455
/// <returns>The entity with the updated property.</returns>
456-
public Content WithContentSchema(Corvus.Json.Draft201909.Schema value)
456+
public Content WithContentSchema(Corvus.Json.JsonSchema.Draft201909.Schema value)
457457
{
458458
return this.SetProperty(ContentSchemaJsonPropertyName, value);
459459
}
@@ -736,7 +736,7 @@ private static ValidationContext __CorvusValidateContentEncoding(in Content that
736736

737737
private static ValidationContext __CorvusValidateContentSchema(in Content that, in ValidationContext validationContext, ValidationLevel level)
738738
{
739-
Corvus.Json.Draft201909.Schema property = that.ContentSchema;
739+
Corvus.Json.JsonSchema.Draft201909.Schema property = that.ContentSchema;
740740
return property.Validate(validationContext, level);
741741
}
742742

Solutions/Corvus.JsonSchema/Corvus.Json/Draft201909/Core.cs Solutions/Corvus.Json.JsonSchema/Corvus.Json.JsonSchema/Draft201909/Core.cs

+31-31
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// </auto-generated>
88
//------------------------------------------------------------------------------
99
#nullable enable
10-
namespace Corvus.Json.Draft201909
10+
namespace Corvus.Json.JsonSchema.Draft201909
1111
{
1212
using System;
1313
using System.Collections.Generic;
@@ -181,7 +181,7 @@ public Core(bool boolean)
181181
/// <example>
182182
/// {Property examples}.
183183
/// </example>
184-
public Corvus.Json.Draft201909.Core.IdValue Id
184+
public Corvus.Json.JsonSchema.Draft201909.Core.IdValue Id
185185
{
186186
get
187187
{
@@ -197,7 +197,7 @@ public Corvus.Json.Draft201909.Core.IdValue Id
197197
{
198198
if (this.jsonElementBacking.TryGetProperty(IdUtf8JsonPropertyName.Span, out JsonElement result))
199199
{
200-
return new Corvus.Json.Draft201909.Core.IdValue(result);
200+
return new Corvus.Json.JsonSchema.Draft201909.Core.IdValue(result);
201201
}
202202
}
203203

@@ -249,7 +249,7 @@ public Corvus.Json.JsonUri Schema
249249
/// <example>
250250
/// {Property examples}.
251251
/// </example>
252-
public Corvus.Json.Draft201909.Core.AnchorValue Anchor
252+
public Corvus.Json.JsonSchema.Draft201909.Core.AnchorValue Anchor
253253
{
254254
get
255255
{
@@ -265,7 +265,7 @@ public Corvus.Json.Draft201909.Core.AnchorValue Anchor
265265
{
266266
if (this.jsonElementBacking.TryGetProperty(AnchorUtf8JsonPropertyName.Span, out JsonElement result))
267267
{
268-
return new Corvus.Json.Draft201909.Core.AnchorValue(result);
268+
return new Corvus.Json.JsonSchema.Draft201909.Core.AnchorValue(result);
269269
}
270270
}
271271

@@ -351,7 +351,7 @@ public Corvus.Json.JsonUriReference RecursiveRef
351351
/// <example>
352352
/// {Property examples}.
353353
/// </example>
354-
public Corvus.Json.Draft201909.Core.RecursiveAnchorValue RecursiveAnchor
354+
public Corvus.Json.JsonSchema.Draft201909.Core.RecursiveAnchorValue RecursiveAnchor
355355
{
356356
get
357357
{
@@ -367,7 +367,7 @@ public Corvus.Json.Draft201909.Core.RecursiveAnchorValue RecursiveAnchor
367367
{
368368
if (this.jsonElementBacking.TryGetProperty(RecursiveAnchorUtf8JsonPropertyName.Span, out JsonElement result))
369369
{
370-
return new Corvus.Json.Draft201909.Core.RecursiveAnchorValue(result);
370+
return new Corvus.Json.JsonSchema.Draft201909.Core.RecursiveAnchorValue(result);
371371
}
372372
}
373373

@@ -385,7 +385,7 @@ public Corvus.Json.Draft201909.Core.RecursiveAnchorValue RecursiveAnchor
385385
/// <example>
386386
/// {Property examples}.
387387
/// </example>
388-
public Corvus.Json.Draft201909.Core.VocabularyValue Vocabulary
388+
public Corvus.Json.JsonSchema.Draft201909.Core.VocabularyValue Vocabulary
389389
{
390390
get
391391
{
@@ -401,7 +401,7 @@ public Corvus.Json.Draft201909.Core.VocabularyValue Vocabulary
401401
{
402402
if (this.jsonElementBacking.TryGetProperty(VocabularyUtf8JsonPropertyName.Span, out JsonElement result))
403403
{
404-
return new Corvus.Json.Draft201909.Core.VocabularyValue(result);
404+
return new Corvus.Json.JsonSchema.Draft201909.Core.VocabularyValue(result);
405405
}
406406
}
407407

@@ -453,7 +453,7 @@ public Corvus.Json.JsonString Comment
453453
/// <example>
454454
/// {Property examples}.
455455
/// </example>
456-
public Corvus.Json.Draft201909.Core.DefsValue Defs
456+
public Corvus.Json.JsonSchema.Draft201909.Core.DefsValue Defs
457457
{
458458
get
459459
{
@@ -469,7 +469,7 @@ public Corvus.Json.Draft201909.Core.DefsValue Defs
469469
{
470470
if (this.jsonElementBacking.TryGetProperty(DefsUtf8JsonPropertyName.Span, out JsonElement result))
471471
{
472-
return new Corvus.Json.Draft201909.Core.DefsValue(result);
472+
return new Corvus.Json.JsonSchema.Draft201909.Core.DefsValue(result);
473473
}
474474
}
475475

@@ -660,10 +660,10 @@ public static implicit operator JsonBoolean(Core boolean)
660660
/// <summary>
661661
/// Creates an instance of a <see cref = "Core"/>.
662662
/// </summary>
663-
public static Core Create(Corvus.Json.Draft201909.Core.IdValue? id = null, Corvus.Json.JsonUri? schema = null, Corvus.Json.Draft201909.Core.AnchorValue? anchor = null, Corvus.Json.JsonUriReference? @ref = null, Corvus.Json.JsonUriReference? recursiveRef = null, Corvus.Json.Draft201909.Core.RecursiveAnchorValue? recursiveAnchor = null, Corvus.Json.Draft201909.Core.VocabularyValue? vocabulary = null, Corvus.Json.JsonString? comment = null, Corvus.Json.Draft201909.Core.DefsValue? defs = null)
663+
public static Core Create(Corvus.Json.JsonSchema.Draft201909.Core.IdValue? id = null, Corvus.Json.JsonUri? schema = null, Corvus.Json.JsonSchema.Draft201909.Core.AnchorValue? anchor = null, Corvus.Json.JsonUriReference? @ref = null, Corvus.Json.JsonUriReference? recursiveRef = null, Corvus.Json.JsonSchema.Draft201909.Core.RecursiveAnchorValue? recursiveAnchor = null, Corvus.Json.JsonSchema.Draft201909.Core.VocabularyValue? vocabulary = null, Corvus.Json.JsonString? comment = null, Corvus.Json.JsonSchema.Draft201909.Core.DefsValue? defs = null)
664664
{
665665
var builder = ImmutableDictionary.CreateBuilder<string, JsonAny>();
666-
if (id is Corvus.Json.Draft201909.Core.IdValue id__)
666+
if (id is Corvus.Json.JsonSchema.Draft201909.Core.IdValue id__)
667667
{
668668
builder.Add(IdJsonPropertyName, id__);
669669
}
@@ -673,7 +673,7 @@ public static Core Create(Corvus.Json.Draft201909.Core.IdValue? id = null, Corvu
673673
builder.Add(SchemaJsonPropertyName, schema__);
674674
}
675675

676-
if (anchor is Corvus.Json.Draft201909.Core.AnchorValue anchor__)
676+
if (anchor is Corvus.Json.JsonSchema.Draft201909.Core.AnchorValue anchor__)
677677
{
678678
builder.Add(AnchorJsonPropertyName, anchor__);
679679
}
@@ -688,12 +688,12 @@ public static Core Create(Corvus.Json.Draft201909.Core.IdValue? id = null, Corvu
688688
builder.Add(RecursiveRefJsonPropertyName, recursiveRef__);
689689
}
690690

691-
if (recursiveAnchor is Corvus.Json.Draft201909.Core.RecursiveAnchorValue recursiveAnchor__)
691+
if (recursiveAnchor is Corvus.Json.JsonSchema.Draft201909.Core.RecursiveAnchorValue recursiveAnchor__)
692692
{
693693
builder.Add(RecursiveAnchorJsonPropertyName, recursiveAnchor__);
694694
}
695695

696-
if (vocabulary is Corvus.Json.Draft201909.Core.VocabularyValue vocabulary__)
696+
if (vocabulary is Corvus.Json.JsonSchema.Draft201909.Core.VocabularyValue vocabulary__)
697697
{
698698
builder.Add(VocabularyJsonPropertyName, vocabulary__);
699699
}
@@ -703,7 +703,7 @@ public static Core Create(Corvus.Json.Draft201909.Core.IdValue? id = null, Corvu
703703
builder.Add(CommentJsonPropertyName, comment__);
704704
}
705705

706-
if (defs is Corvus.Json.Draft201909.Core.DefsValue defs__)
706+
if (defs is Corvus.Json.JsonSchema.Draft201909.Core.DefsValue defs__)
707707
{
708708
builder.Add(DefsJsonPropertyName, defs__);
709709
}
@@ -716,7 +716,7 @@ public static Core Create(Corvus.Json.Draft201909.Core.IdValue? id = null, Corvu
716716
/// </summary>
717717
/// <param name = "value">The value to set.</param>
718718
/// <returns>The entity with the updated property.</returns>
719-
public Core WithId(Corvus.Json.Draft201909.Core.IdValue value)
719+
public Core WithId(Corvus.Json.JsonSchema.Draft201909.Core.IdValue value)
720720
{
721721
return this.SetProperty(IdJsonPropertyName, value);
722722
}
@@ -736,7 +736,7 @@ public Core WithSchema(Corvus.Json.JsonUri value)
736736
/// </summary>
737737
/// <param name = "value">The value to set.</param>
738738
/// <returns>The entity with the updated property.</returns>
739-
public Core WithAnchor(Corvus.Json.Draft201909.Core.AnchorValue value)
739+
public Core WithAnchor(Corvus.Json.JsonSchema.Draft201909.Core.AnchorValue value)
740740
{
741741
return this.SetProperty(AnchorJsonPropertyName, value);
742742
}
@@ -766,7 +766,7 @@ public Core WithRecursiveRef(Corvus.Json.JsonUriReference value)
766766
/// </summary>
767767
/// <param name = "value">The value to set.</param>
768768
/// <returns>The entity with the updated property.</returns>
769-
public Core WithRecursiveAnchor(Corvus.Json.Draft201909.Core.RecursiveAnchorValue value)
769+
public Core WithRecursiveAnchor(Corvus.Json.JsonSchema.Draft201909.Core.RecursiveAnchorValue value)
770770
{
771771
return this.SetProperty(RecursiveAnchorJsonPropertyName, value);
772772
}
@@ -776,7 +776,7 @@ public Core WithRecursiveAnchor(Corvus.Json.Draft201909.Core.RecursiveAnchorValu
776776
/// </summary>
777777
/// <param name = "value">The value to set.</param>
778778
/// <returns>The entity with the updated property.</returns>
779-
public Core WithVocabulary(Corvus.Json.Draft201909.Core.VocabularyValue value)
779+
public Core WithVocabulary(Corvus.Json.JsonSchema.Draft201909.Core.VocabularyValue value)
780780
{
781781
return this.SetProperty(VocabularyJsonPropertyName, value);
782782
}
@@ -796,7 +796,7 @@ public Core WithComment(Corvus.Json.JsonString value)
796796
/// </summary>
797797
/// <param name = "value">The value to set.</param>
798798
/// <returns>The entity with the updated property.</returns>
799-
public Core WithDefs(Corvus.Json.Draft201909.Core.DefsValue value)
799+
public Core WithDefs(Corvus.Json.JsonSchema.Draft201909.Core.DefsValue value)
800800
{
801801
return this.SetProperty(DefsJsonPropertyName, value);
802802
}
@@ -1117,7 +1117,7 @@ private static ImmutableDictionary<string, PropertyValidator<Core>> CreateLocalP
11171117

11181118
private static ValidationContext __CorvusValidateId(in Core that, in ValidationContext validationContext, ValidationLevel level)
11191119
{
1120-
Corvus.Json.Draft201909.Core.IdValue property = that.Id;
1120+
Corvus.Json.JsonSchema.Draft201909.Core.IdValue property = that.Id;
11211121
return property.Validate(validationContext, level);
11221122
}
11231123

@@ -1129,7 +1129,7 @@ private static ValidationContext __CorvusValidateSchema(in Core that, in Validat
11291129

11301130
private static ValidationContext __CorvusValidateAnchor(in Core that, in ValidationContext validationContext, ValidationLevel level)
11311131
{
1132-
Corvus.Json.Draft201909.Core.AnchorValue property = that.Anchor;
1132+
Corvus.Json.JsonSchema.Draft201909.Core.AnchorValue property = that.Anchor;
11331133
return property.Validate(validationContext, level);
11341134
}
11351135

@@ -1147,13 +1147,13 @@ private static ValidationContext __CorvusValidateRecursiveRef(in Core that, in V
11471147

11481148
private static ValidationContext __CorvusValidateRecursiveAnchor(in Core that, in ValidationContext validationContext, ValidationLevel level)
11491149
{
1150-
Corvus.Json.Draft201909.Core.RecursiveAnchorValue property = that.RecursiveAnchor;
1150+
Corvus.Json.JsonSchema.Draft201909.Core.RecursiveAnchorValue property = that.RecursiveAnchor;
11511151
return property.Validate(validationContext, level);
11521152
}
11531153

11541154
private static ValidationContext __CorvusValidateVocabulary(in Core that, in ValidationContext validationContext, ValidationLevel level)
11551155
{
1156-
Corvus.Json.Draft201909.Core.VocabularyValue property = that.Vocabulary;
1156+
Corvus.Json.JsonSchema.Draft201909.Core.VocabularyValue property = that.Vocabulary;
11571157
return property.Validate(validationContext, level);
11581158
}
11591159

@@ -1165,7 +1165,7 @@ private static ValidationContext __CorvusValidateComment(in Core that, in Valida
11651165

11661166
private static ValidationContext __CorvusValidateDefs(in Core that, in ValidationContext validationContext, ValidationLevel level)
11671167
{
1168-
Corvus.Json.Draft201909.Core.DefsValue property = that.Defs;
1168+
Corvus.Json.JsonSchema.Draft201909.Core.DefsValue property = that.Defs;
11691169
return property.Validate(validationContext, level);
11701170
}
11711171

@@ -3071,16 +3071,16 @@ public void WriteTo(Utf8JsonWriter writer)
30713071
/// <summary>
30723072
/// Enumerate the object as the given item type
30733073
/// </summary>
3074-
public JsonObjectEnumerator<Corvus.Json.Draft201909.Schema> EnumerateProperties()
3074+
public JsonObjectEnumerator<Corvus.Json.JsonSchema.Draft201909.Schema> EnumerateProperties()
30753075
{
30763076
if (this.objectBacking is ImmutableDictionary<string, JsonAny> properties)
30773077
{
3078-
return new JsonObjectEnumerator<Corvus.Json.Draft201909.Schema>(properties);
3078+
return new JsonObjectEnumerator<Corvus.Json.JsonSchema.Draft201909.Schema>(properties);
30793079
}
30803080

30813081
if (this.jsonElementBacking.ValueKind == JsonValueKind.Object)
30823082
{
3083-
return new JsonObjectEnumerator<Corvus.Json.Draft201909.Schema>(this.jsonElementBacking);
3083+
return new JsonObjectEnumerator<Corvus.Json.JsonSchema.Draft201909.Schema>(this.jsonElementBacking);
30843084
}
30853085

30863086
return default;
@@ -3323,7 +3323,7 @@ private ValidationContext ValidateObject(JsonValueKind valueKind, in ValidationC
33233323
string propertyName = property.Name;
33243324
if (!result.HasEvaluatedLocalProperty(propertyCount))
33253325
{
3326-
result = property.ValueAs<Corvus.Json.Draft201909.Schema>().Validate(result, level);
3326+
result = property.ValueAs<Corvus.Json.JsonSchema.Draft201909.Schema>().Validate(result, level);
33273327
if (level == ValidationLevel.Flag && !result.IsValid)
33283328
{
33293329
return result;

0 commit comments

Comments
 (0)