Skip to content

Commit 59114c7

Browse files
committed
Update schema from Schema.org and use https URL's
1 parent cbb3d9a commit 59114c7

File tree

191 files changed

+3578
-1860
lines changed

Some content is hidden

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

191 files changed

+3578
-1860
lines changed

Benchmarks/Schema.NET.Benchmarks/Core/BookBenchmark.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ public class BookBenchmark : SchemaBenchmarkBase
99
[GlobalSetup]
1010
public void Setup() => this.ConfigureBenchmark(new Book()
1111
{
12-
Id = new Uri("http://example.com/book/1"),
12+
Id = new Uri("https://example.com/book/1"),
1313
Name = "The Catcher in the Rye",
1414
Author = new Person()
1515
{
1616
Name = "J.D. Salinger",
1717
},
18-
Url = new Uri("http://www.barnesandnoble.com/store/info/offer/JDSalinger"),
18+
Url = new Uri("https://www.barnesandnoble.com/store/info/offer/JDSalinger"),
1919
WorkExample = new List<ICreativeWork>()
2020
{
2121
new Book()
@@ -27,7 +27,7 @@ public void Setup() => this.ConfigureBenchmark(new Book()
2727
{
2828
Target = new EntryPoint()
2929
{
30-
UrlTemplate = "http://www.barnesandnoble.com/store/info/offer/0316769487?purchase=true",
30+
UrlTemplate = "https://www.barnesandnoble.com/store/info/offer/0316769487?purchase=true",
3131
ActionPlatform = new List<Uri>()
3232
{
3333
new Uri("https://schema.org/DesktopWebPlatform"),
@@ -56,7 +56,7 @@ public void Setup() => this.ConfigureBenchmark(new Book()
5656
{
5757
Target = new EntryPoint()
5858
{
59-
UrlTemplate = "http://www.barnesandnoble.com/store/info/offer/031676947?purchase=true",
59+
UrlTemplate = "https://www.barnesandnoble.com/store/info/offer/031676947?purchase=true",
6060
ActionPlatform = new List<Uri>()
6161
{
6262
new Uri("https://schema.org/DesktopWebPlatform"),

Benchmarks/Schema.NET.Benchmarks/Core/WebsiteBenchmark.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public void Setup() => this.ConfigureBenchmark(new WebSite()
1010
{
1111
PotentialAction = new SearchAction()
1212
{
13-
Target = new Uri("http://example.com/search?&q={query}"),
13+
Target = new Uri("https://example.com/search?&q={query}"),
1414
QueryInput = "required",
1515
},
1616
Url = new Uri("https://example.com"),

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The code above outputs the following JSON-LD:
2020

2121
```JSON
2222
{
23-
"@context":"http://schema.org",
23+
"@context":"https://schema.org",
2424
"@type":"WebSite",
2525
"alternateName":"An Alternative Name",
2626
"name":"Your Site Name",
@@ -47,9 +47,9 @@ Using structured data in `html` requires the use of a `script` tag with a MIME t
4747
```HTML
4848
<script type="application/ld+json">
4949
{
50-
  "@context": "http://schema.org",
50+
  "@context": "https://schema.org",
5151
  "@type": "Organization",
52-
  "url": "http://www.example.com",
52+
  "url": "https://www.example.com",
5353
  "name": "Unlimited Ball Bearings Corp.",
5454
  "contactPoint": {
5555
    "@type": "ContactPoint",

Source/Schema.NET/ContextJsonConverter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public override JsonLdContext ReadJson(JsonReader reader, Type objectType, JsonL
4242
var o = JObject.Load(reader);
4343

4444
var nameProperty = o.Property("name", StringComparison.OrdinalIgnoreCase);
45-
name = nameProperty?.Value?.ToString() ?? "http://schema.org";
45+
name = nameProperty?.Value?.ToString() ?? "https://schema.org";
4646

4747
var languageProperty = o.Property("@language", StringComparison.OrdinalIgnoreCase);
4848
language = languageProperty?.Value?.ToString();

Source/Schema.NET/ValuesJsonConverter.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
namespace Schema.NET
22
{
33
using System;
4-
using System.Collections.Concurrent;
54
using System.Collections.Generic;
65
using System.Diagnostics;
76
using System.Globalization;
8-
using System.Linq.Expressions;
97
using System.Reflection;
108
using System.Xml;
119
using Newtonsoft.Json;

Source/Schema.NET/auto/BusOrCoach.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ public partial interface IBusOrCoach : IVehicle
1818
/// The permitted total weight of cargo and installations (e.g. a roof rack) on top of the vehicle.&lt;br/&gt;&lt;br/&gt;
1919
/// Typical unit code(s): KGM for kilogram, LBR for pound&lt;br/&gt;&lt;br/&gt;
2020
/// &lt;ul&gt;
21-
/// &lt;li&gt;Note 1: You can indicate additional information in the &lt;a class="localLink" href="http://schema.org/name"&gt;name&lt;/a&gt; of the &lt;a class="localLink" href="http://schema.org/QuantitativeValue"&gt;QuantitativeValue&lt;/a&gt; node.&lt;/li&gt;
22-
/// &lt;li&gt;Note 2: You may also link to a &lt;a class="localLink" href="http://schema.org/QualitativeValue"&gt;QualitativeValue&lt;/a&gt; node that provides additional information using &lt;a class="localLink" href="http://schema.org/valueReference"&gt;valueReference&lt;/a&gt;&lt;/li&gt;
23-
/// &lt;li&gt;Note 3: Note that you can use &lt;a class="localLink" href="http://schema.org/minValue"&gt;minValue&lt;/a&gt; and &lt;a class="localLink" href="http://schema.org/maxValue"&gt;maxValue&lt;/a&gt; to indicate ranges.&lt;/li&gt;
21+
/// &lt;li&gt;Note 1: You can indicate additional information in the &lt;a class="localLink" href="https://schema.org/name"&gt;name&lt;/a&gt; of the &lt;a class="localLink" href="https://schema.org/QuantitativeValue"&gt;QuantitativeValue&lt;/a&gt; node.&lt;/li&gt;
22+
/// &lt;li&gt;Note 2: You may also link to a &lt;a class="localLink" href="https://schema.org/QualitativeValue"&gt;QualitativeValue&lt;/a&gt; node that provides additional information using &lt;a class="localLink" href="https://schema.org/valueReference"&gt;valueReference&lt;/a&gt;&lt;/li&gt;
23+
/// &lt;li&gt;Note 3: Note that you can use &lt;a class="localLink" href="https://schema.org/minValue"&gt;minValue&lt;/a&gt; and &lt;a class="localLink" href="https://schema.org/maxValue"&gt;maxValue&lt;/a&gt; to indicate ranges.&lt;/li&gt;
2424
/// &lt;/ul&gt;
2525
/// </summary>
2626
OneOrMany<IQuantitativeValue> RoofLoad { get; set; }
@@ -49,9 +49,9 @@ public partial class BusOrCoach : Vehicle, IBusOrCoach, IEquatable<BusOrCoach>
4949
/// The permitted total weight of cargo and installations (e.g. a roof rack) on top of the vehicle.&lt;br/&gt;&lt;br/&gt;
5050
/// Typical unit code(s): KGM for kilogram, LBR for pound&lt;br/&gt;&lt;br/&gt;
5151
/// &lt;ul&gt;
52-
/// &lt;li&gt;Note 1: You can indicate additional information in the &lt;a class="localLink" href="http://schema.org/name"&gt;name&lt;/a&gt; of the &lt;a class="localLink" href="http://schema.org/QuantitativeValue"&gt;QuantitativeValue&lt;/a&gt; node.&lt;/li&gt;
53-
/// &lt;li&gt;Note 2: You may also link to a &lt;a class="localLink" href="http://schema.org/QualitativeValue"&gt;QualitativeValue&lt;/a&gt; node that provides additional information using &lt;a class="localLink" href="http://schema.org/valueReference"&gt;valueReference&lt;/a&gt;&lt;/li&gt;
54-
/// &lt;li&gt;Note 3: Note that you can use &lt;a class="localLink" href="http://schema.org/minValue"&gt;minValue&lt;/a&gt; and &lt;a class="localLink" href="http://schema.org/maxValue"&gt;maxValue&lt;/a&gt; to indicate ranges.&lt;/li&gt;
52+
/// &lt;li&gt;Note 1: You can indicate additional information in the &lt;a class="localLink" href="https://schema.org/name"&gt;name&lt;/a&gt; of the &lt;a class="localLink" href="https://schema.org/QuantitativeValue"&gt;QuantitativeValue&lt;/a&gt; node.&lt;/li&gt;
53+
/// &lt;li&gt;Note 2: You may also link to a &lt;a class="localLink" href="https://schema.org/QualitativeValue"&gt;QualitativeValue&lt;/a&gt; node that provides additional information using &lt;a class="localLink" href="https://schema.org/valueReference"&gt;valueReference&lt;/a&gt;&lt;/li&gt;
54+
/// &lt;li&gt;Note 3: Note that you can use &lt;a class="localLink" href="https://schema.org/minValue"&gt;minValue&lt;/a&gt; and &lt;a class="localLink" href="https://schema.org/maxValue"&gt;maxValue&lt;/a&gt; to indicate ranges.&lt;/li&gt;
5555
/// &lt;/ul&gt;
5656
/// </summary>
5757
[DataMember(Name = "roofLoad", Order = 307)]

Source/Schema.NET/bib/Collection.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@
55
using Newtonsoft.Json;
66

77
/// <summary>
8-
/// A created collection of Creative Works or other artefacts.
8+
/// A collection of items e.g. creative works or products.
99
/// </summary>
1010
public partial interface ICollection : ICreativeWork
1111
{
1212
/// <summary>
13-
/// The number of items in the &lt;a class="localLink" href="http://schema.org/Collection"&gt;Collection&lt;/a&gt;.
13+
/// The number of items in the &lt;a class="localLink" href="https://schema.org/Collection"&gt;Collection&lt;/a&gt;.
1414
/// </summary>
1515
OneOrMany<int?> CollectionSize { get; set; }
1616
}
1717

1818
/// <summary>
19-
/// A created collection of Creative Works or other artefacts.
19+
/// A collection of items e.g. creative works or products.
2020
/// </summary>
2121
[DataContract]
2222
public partial class Collection : CreativeWork, ICollection, IEquatable<Collection>
@@ -28,7 +28,7 @@ public partial class Collection : CreativeWork, ICollection, IEquatable<Collecti
2828
public override string Type => "Collection";
2929

3030
/// <summary>
31-
/// The number of items in the &lt;a class="localLink" href="http://schema.org/Collection"&gt;Collection&lt;/a&gt;.
31+
/// The number of items in the &lt;a class="localLink" href="https://schema.org/Collection"&gt;Collection&lt;/a&gt;.
3232
/// </summary>
3333
[DataMember(Name = "collectionSize", Order = 206)]
3434
[JsonConverter(typeof(ValuesJsonConverter))]

Source/Schema.NET/bib/ComicIssue.cs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@
66

77
/// <summary>
88
/// Individual comic issues are serially published as
9-
/// part of a larger series. For the sake of consistency, even one-shot issues
10-
/// belong to a series comprised of a single issue. All comic issues can be
11-
/// uniquely identified by: the combination of the name and volume number of the
12-
/// series to which the issue belongs; the issue number; and the variant
13-
/// description of the issue (if any).
9+
/// part of a larger series. For the sake of consistency, even one-shot issues
10+
/// belong to a series comprised of a single issue. All comic issues can be
11+
/// uniquely identified by: the combination of the name and volume number of the
12+
/// series to which the issue belongs; the issue number; and the variant
13+
/// description of the issue (if any).
1414
/// </summary>
1515
public partial interface IComicIssue : IPublicationIssue
1616
{
1717
/// <summary>
1818
/// The primary artist for a work
19-
/// in a medium other than pencils or digital line art--for example, if the
20-
/// primary artwork is done in watercolors or digital paints.
19+
/// in a medium other than pencils or digital line art--for example, if the
20+
/// primary artwork is done in watercolors or digital paints.
2121
/// </summary>
2222
OneOrMany<IPerson> Artist { get; set; }
2323

@@ -43,19 +43,19 @@ public partial interface IComicIssue : IPublicationIssue
4343

4444
/// <summary>
4545
/// A description of the variant cover
46-
/// for the issue, if the issue is a variant printing. For example, "Bryan Hitch
47-
/// Variant Cover" or "2nd Printing Variant".
46+
/// for the issue, if the issue is a variant printing. For example, "Bryan Hitch
47+
/// Variant Cover" or "2nd Printing Variant".
4848
/// </summary>
4949
OneOrMany<string> VariantCover { get; set; }
5050
}
5151

5252
/// <summary>
5353
/// Individual comic issues are serially published as
54-
/// part of a larger series. For the sake of consistency, even one-shot issues
55-
/// belong to a series comprised of a single issue. All comic issues can be
56-
/// uniquely identified by: the combination of the name and volume number of the
57-
/// series to which the issue belongs; the issue number; and the variant
58-
/// description of the issue (if any).
54+
/// part of a larger series. For the sake of consistency, even one-shot issues
55+
/// belong to a series comprised of a single issue. All comic issues can be
56+
/// uniquely identified by: the combination of the name and volume number of the
57+
/// series to which the issue belongs; the issue number; and the variant
58+
/// description of the issue (if any).
5959
/// </summary>
6060
[DataContract]
6161
public partial class ComicIssue : PublicationIssue, IComicIssue, IEquatable<ComicIssue>
@@ -68,8 +68,8 @@ public partial class ComicIssue : PublicationIssue, IComicIssue, IEquatable<Comi
6868

6969
/// <summary>
7070
/// The primary artist for a work
71-
/// in a medium other than pencils or digital line art--for example, if the
72-
/// primary artwork is done in watercolors or digital paints.
71+
/// in a medium other than pencils or digital line art--for example, if the
72+
/// primary artwork is done in watercolors or digital paints.
7373
/// </summary>
7474
[DataMember(Name = "artist", Order = 306)]
7575
[JsonConverter(typeof(ValuesJsonConverter))]
@@ -105,8 +105,8 @@ public partial class ComicIssue : PublicationIssue, IComicIssue, IEquatable<Comi
105105

106106
/// <summary>
107107
/// A description of the variant cover
108-
/// for the issue, if the issue is a variant printing. For example, "Bryan Hitch
109-
/// Variant Cover" or "2nd Printing Variant".
108+
/// for the issue, if the issue is a variant printing. For example, "Bryan Hitch
109+
/// Variant Cover" or "2nd Printing Variant".
110110
/// </summary>
111111
[DataMember(Name = "variantCover", Order = 311)]
112112
[JsonConverter(typeof(ValuesJsonConverter))]

Source/Schema.NET/bib/ComicSeries.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66

77
/// <summary>
88
/// A sequential publication of comic stories under a
9-
/// unifying title, for example "The Amazing Spider-Man" or "Groo the
10-
/// Wanderer".
9+
/// unifying title, for example "The Amazing Spider-Man" or "Groo the
10+
/// Wanderer".
1111
/// </summary>
1212
public partial interface IComicSeries : IPeriodical
1313
{
1414
}
1515

1616
/// <summary>
1717
/// A sequential publication of comic stories under a
18-
/// unifying title, for example "The Amazing Spider-Man" or "Groo the
19-
/// Wanderer".
18+
/// unifying title, for example "The Amazing Spider-Man" or "Groo the
19+
/// Wanderer".
2020
/// </summary>
2121
[DataContract]
2222
public partial class ComicSeries : Periodical, IComicSeries, IEquatable<ComicSeries>

Source/Schema.NET/bib/ComicStory.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66

77
/// <summary>
88
/// The term "story" is any indivisible, re-printable
9-
/// unit of a comic, including the interior stories, covers, and backmatter. Most
10-
/// comics have at least two stories: a cover (ComicCoverArt) and an interior story.
9+
/// unit of a comic, including the interior stories, covers, and backmatter. Most
10+
/// comics have at least two stories: a cover (ComicCoverArt) and an interior story.
1111
/// </summary>
1212
public partial interface IComicStory : ICreativeWork
1313
{
1414
/// <summary>
1515
/// The primary artist for a work
16-
/// in a medium other than pencils or digital line art--for example, if the
17-
/// primary artwork is done in watercolors or digital paints.
16+
/// in a medium other than pencils or digital line art--for example, if the
17+
/// primary artwork is done in watercolors or digital paints.
1818
/// </summary>
1919
OneOrMany<IPerson> Artist { get; set; }
2020

@@ -41,8 +41,8 @@ public partial interface IComicStory : ICreativeWork
4141

4242
/// <summary>
4343
/// The term "story" is any indivisible, re-printable
44-
/// unit of a comic, including the interior stories, covers, and backmatter. Most
45-
/// comics have at least two stories: a cover (ComicCoverArt) and an interior story.
44+
/// unit of a comic, including the interior stories, covers, and backmatter. Most
45+
/// comics have at least two stories: a cover (ComicCoverArt) and an interior story.
4646
/// </summary>
4747
[DataContract]
4848
public partial class ComicStory : CreativeWork, IComicStory, IEquatable<ComicStory>
@@ -55,8 +55,8 @@ public partial class ComicStory : CreativeWork, IComicStory, IEquatable<ComicSto
5555

5656
/// <summary>
5757
/// The primary artist for a work
58-
/// in a medium other than pencils or digital line art--for example, if the
59-
/// primary artwork is done in watercolors or digital paints.
58+
/// in a medium other than pencils or digital line art--for example, if the
59+
/// primary artwork is done in watercolors or digital paints.
6060
/// </summary>
6161
[DataMember(Name = "artist", Order = 206)]
6262
[JsonConverter(typeof(ValuesJsonConverter))]

0 commit comments

Comments
 (0)