Skip to content

Commit 0def13e

Browse files
Update data models (#11)
Co-authored-by: openactive-bot <openactive-bot@users.noreply.github.com>
1 parent 7da4cf4 commit 0def13e

6 files changed

Lines changed: 111 additions & 9 deletions

File tree

OpenActive.NET.Generator/package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

OpenActive.NET.Generator/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"author": "Nick Evans",
1212
"license": "MIT",
1313
"dependencies": {
14-
"@openactive/data-models": "^2.0.166",
14+
"@openactive/data-models": "^2.0.170",
1515
"fs-extra": "^7.0.1",
1616
"sync-request": "^6.0.0"
1717
}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
2+
using Newtonsoft.Json;
3+
using System;
4+
using System.Collections.Generic;
5+
using System.Runtime.Serialization;
6+
7+
namespace OpenActive.NET
8+
{
9+
/// <summary>
10+
/// [NOTICE: This class is part of the Open Booking API Test Interface, and MUST NOT be used in production.]
11+
/// This type is derived from https://schema.org/Action, which means that any of this type's properties within schema.org may also be used.
12+
/// </summary>
13+
[DataContract]
14+
public partial class ChangeOfLogisticsLocationSimulateAction : OpenBookingSimulateAction
15+
{
16+
/// <summary>
17+
/// Returns the JSON-LD representation of this instance.
18+
/// This method overrides Schema.NET ToString() to serialise using OpenActiveSerializer.
19+
/// </summary>
20+
/// <returns>A <see cref="string" /> that represents the JSON-LD representation of this instance.</returns>
21+
public override string ToString()
22+
{
23+
return OpenActiveSerializer.Serialize(this);
24+
}
25+
26+
/// <summary>
27+
/// Returns the JSON-LD representation of this instance, including "https://schema.org" in the "@context".
28+
///
29+
/// This method must be used when you want to embed the output raw (as-is) into a web
30+
/// page. It uses serializer settings with HTML escaping to avoid Cross-Site Scripting (XSS)
31+
/// vulnerabilities if the object was constructed from an untrusted source.
32+
///
33+
/// This method overrides Schema.NET ToHtmlEscapedString() to serialise using OpenActiveSerializer.
34+
/// </summary>
35+
/// <returns>
36+
/// A <see cref="string" /> that represents the JSON-LD representation of this instance.
37+
/// </returns>
38+
public new string ToHtmlEscapedString()
39+
{
40+
return OpenActiveSerializer.SerializeToHtmlEmbeddableString(this);
41+
}
42+
43+
/// <summary>
44+
/// Gets the name of the type as specified by schema.org.
45+
/// </summary>
46+
[DataMember(Name = "@type", Order = 1)]
47+
public override string Type => "test:ChangeOfLogisticsLocationSimulateAction";
48+
49+
50+
}
51+
}

OpenActive.NET/models/ChangeOfLogisticsSimulateAction.cs renamed to OpenActive.NET/models/ChangeOfLogisticsNameSimulateAction.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace OpenActive.NET
1111
/// This type is derived from https://schema.org/Action, which means that any of this type's properties within schema.org may also be used.
1212
/// </summary>
1313
[DataContract]
14-
public partial class ChangeOfLogisticsSimulateAction : OpenBookingSimulateAction
14+
public partial class ChangeOfLogisticsNameSimulateAction : OpenBookingSimulateAction
1515
{
1616
/// <summary>
1717
/// Returns the JSON-LD representation of this instance.
@@ -44,7 +44,7 @@ public override string ToString()
4444
/// Gets the name of the type as specified by schema.org.
4545
/// </summary>
4646
[DataMember(Name = "@type", Order = 1)]
47-
public override string Type => "test:ChangeOfLogisticsSimulateAction";
47+
public override string Type => "test:ChangeOfLogisticsNameSimulateAction";
4848

4949

5050
}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
2+
using Newtonsoft.Json;
3+
using System;
4+
using System.Collections.Generic;
5+
using System.Runtime.Serialization;
6+
7+
namespace OpenActive.NET
8+
{
9+
/// <summary>
10+
/// [NOTICE: This class is part of the Open Booking API Test Interface, and MUST NOT be used in production.]
11+
/// This type is derived from https://schema.org/Action, which means that any of this type's properties within schema.org may also be used.
12+
/// </summary>
13+
[DataContract]
14+
public partial class ChangeOfLogisticsTimeSimulateAction : OpenBookingSimulateAction
15+
{
16+
/// <summary>
17+
/// Returns the JSON-LD representation of this instance.
18+
/// This method overrides Schema.NET ToString() to serialise using OpenActiveSerializer.
19+
/// </summary>
20+
/// <returns>A <see cref="string" /> that represents the JSON-LD representation of this instance.</returns>
21+
public override string ToString()
22+
{
23+
return OpenActiveSerializer.Serialize(this);
24+
}
25+
26+
/// <summary>
27+
/// Returns the JSON-LD representation of this instance, including "https://schema.org" in the "@context".
28+
///
29+
/// This method must be used when you want to embed the output raw (as-is) into a web
30+
/// page. It uses serializer settings with HTML escaping to avoid Cross-Site Scripting (XSS)
31+
/// vulnerabilities if the object was constructed from an untrusted source.
32+
///
33+
/// This method overrides Schema.NET ToHtmlEscapedString() to serialise using OpenActiveSerializer.
34+
/// </summary>
35+
/// <returns>
36+
/// A <see cref="string" /> that represents the JSON-LD representation of this instance.
37+
/// </returns>
38+
public new string ToHtmlEscapedString()
39+
{
40+
return OpenActiveSerializer.SerializeToHtmlEmbeddableString(this);
41+
}
42+
43+
/// <summary>
44+
/// Gets the name of the type as specified by schema.org.
45+
/// </summary>
46+
[DataMember(Name = "@type", Order = 1)]
47+
public override string Type => "test:ChangeOfLogisticsTimeSimulateAction";
48+
49+
50+
}
51+
}

OpenActive.NET/models/OpeningHoursSpecification.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public override string ToString()
6161

6262

6363
/// <summary>
64-
/// Defines the days of the week upon which the `opens` and `closes` values are specified.
64+
/// Defines the days of the week upon which the `opens` and `closes` values are specified. Note this property is optional when used within `specialOpeningHoursSpecification`.
6565
/// </summary>
6666
/// <example>
6767
/// <code>
@@ -90,7 +90,7 @@ public override string ToString()
9090

9191

9292
/// <summary>
93-
/// The date when the item becomes valid. The item will be valid at the beginning of the specified day.
93+
/// The date when the item becomes valid. The item will be valid at the beginning of the specified day. Note this property is required when used within `specialOpeningHoursSpecification`.
9494
/// </summary>
9595
/// <example>
9696
/// <code>
@@ -103,7 +103,7 @@ public override string ToString()
103103

104104

105105
/// <summary>
106-
/// The date after which the item is no longer valid. The item will cease to be valid at the end of the specified day.
106+
/// The date after which the item is no longer valid. The item will cease to be valid at the end of the specified day. Note this property is required when used within `specialOpeningHoursSpecification`.
107107
/// </summary>
108108
/// <example>
109109
/// <code>

0 commit comments

Comments
 (0)