Skip to content

Commit 680b0d6

Browse files
committed
Merge branch 'incoming changes' into 'omos/all-bindings'
2 parents d53557a + 373e714 commit 680b0d6

42 files changed

Lines changed: 440 additions & 6 deletions

Some content is hidden

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

‎src/ByteBard.AsyncAPI.Bindings/AnypointMQ/AnypointMQChannelBinding.cs‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,23 @@ public class AnypointMQChannelBinding : ChannelBinding<AnypointMQChannelBinding>
2121
{ "bindingVersion", (a, n) => { a.BindingVersion = n.GetScalarValue(); } },
2222
};
2323

24+
/// <summary>
25+
/// Writes the Anypoint MQ channel binding object and its extensions for AsyncAPI 2.0.
26+
/// </summary>
27+
/// <exception cref="ArgumentNullException"><paramref name="writer"/> is null.</exception>
2428
public override void SerializeV2(IAsyncApiWriter writer) => this.SerializeV3(writer);
2529

30+
/// <summary>
31+
/// Writes the Anypoint MQ channel binding object and its extensions for AsyncAPI 3.0.
32+
/// </summary>
33+
/// <exception cref="ArgumentNullException"><paramref name="writer"/> is null.</exception>
2634
public override void SerializeV3(IAsyncApiWriter writer) => this.SerializeProperties(writer);
2735

36+
/// <summary>
37+
/// Writes the Anypoint MQ channel binding object and its extensions for AsyncAPI 3.0.
38+
/// </summary>
39+
/// <remarks>An unset binding version is omitted.</remarks>
40+
/// <exception cref="ArgumentNullException"><paramref name="writer"/> is null.</exception>
2841
public override void SerializeProperties(IAsyncApiWriter writer)
2942
{
3043
if (writer is null) throw new ArgumentNullException(nameof(writer));

‎src/ByteBard.AsyncAPI.Bindings/AnypointMQ/AnypointMQMessageBinding.cs‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ public class AnypointMQMessageBinding : MessageBinding<AnypointMQMessageBinding>
2020
{ "bindingVersion", (a, n) => { a.BindingVersion = n.GetScalarValue(); } },
2121
};
2222

23+
/// <summary>
24+
/// Writes the Anypoint MQ message binding object and its extensions for AsyncAPI 2.0.
25+
/// </summary>
26+
/// <exception cref="ArgumentNullException"><paramref name="writer"/> is null.</exception>
2327
public override void SerializeV2(IAsyncApiWriter writer)
2428
{
2529
if (writer is null) throw new ArgumentNullException(nameof(writer));
@@ -30,8 +34,17 @@ public override void SerializeV2(IAsyncApiWriter writer)
3034
writer.WriteEndObject();
3135
}
3236

37+
/// <summary>
38+
/// Writes the Anypoint MQ message binding object and its extensions for AsyncAPI 3.0.
39+
/// </summary>
40+
/// <exception cref="ArgumentNullException"><paramref name="writer"/> is null.</exception>
3341
public override void SerializeV3(IAsyncApiWriter writer) => this.SerializeProperties(writer);
3442

43+
/// <summary>
44+
/// Writes the Anypoint MQ message binding object and its extensions for AsyncAPI 3.0.
45+
/// </summary>
46+
/// <remarks>An unset binding version is omitted.</remarks>
47+
/// <exception cref="ArgumentNullException"><paramref name="writer"/> is null.</exception>
3548
public override void SerializeProperties(IAsyncApiWriter writer)
3649
{
3750
if (writer is null) throw new ArgumentNullException(nameof(writer));

‎src/ByteBard.AsyncAPI.Bindings/BindingHelpers.cs‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ namespace ByteBard.AsyncAPI.Bindings
88

99
public static class BindingHelpers
1010
{
11+
/// <summary>
12+
/// Parses a nested object using the supplied field handlers.
13+
/// </summary>
14+
/// <param name="node">The nested object to parse.</param>
15+
/// <param name="fixedFieldMap">Handlers for recognized property names; other properties follow the reader's unmapped-member setting.</param>
16+
/// <returns>A new instance populated from recognized fields, which may be incomplete when field parsing reports errors.</returns>
17+
/// <remarks>Field-level reader and AsyncAPI exceptions are recorded as diagnostics; other handler exceptions propagate.</remarks>
18+
/// <exception cref="ByteBard.AsyncAPI.Readers.Exceptions.AsyncApiReaderException"><paramref name="node"/> is not a map.</exception>
1119
public static T ParseMap<T>(this ParseNode node, FixedFieldMap<T> fixedFieldMap)
1220
where T : new()
1321
{

‎src/ByteBard.AsyncAPI.Bindings/BindingsCollection.cs‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ namespace ByteBard.AsyncAPI.Bindings
2323

2424
public static class BindingsCollection
2525
{
26+
/// <summary>
27+
/// Adds the source items to the destination collection.
28+
/// </summary>
29+
/// <returns>The same destination collection, after adding the items.</returns>
30+
/// <remarks>Enumeration and collection errors propagate; items already added are not rolled back.</remarks>
31+
/// <exception cref="ArgumentNullException"><paramref name="destination"/> or <paramref name="source"/> is null.</exception>
32+
/// <exception cref="NotSupportedException">The destination collection does not support adding items.</exception>
2633
public static TCollection Add<TCollection, TItem>(this TCollection destination, IEnumerable<TItem> source)
2734
where TCollection : ICollection<TItem>
2835
{

‎src/ByteBard.AsyncAPI.Bindings/GooglePubSub/GooglePubSubChannelBinding.cs‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,22 @@ public class GooglePubSubChannelBinding : ChannelBinding<GooglePubSubChannelBind
3636
{ "name", (a, n) => { a.Name = n.GetScalarValue(); } },
3737
};
3838

39+
/// <summary>
40+
/// Writes the Google Pub/Sub channel binding object and its extensions for AsyncAPI 2.0.
41+
/// </summary>
42+
/// <exception cref="ArgumentNullException"><paramref name="writer"/> is null.</exception>
3943
public override void SerializeV2(IAsyncApiWriter writer) => this.SerializeV3(writer);
44+
/// <summary>
45+
/// Writes the Google Pub/Sub channel binding object and its extensions for AsyncAPI 3.0.
46+
/// </summary>
47+
/// <exception cref="ArgumentNullException"><paramref name="writer"/> is null.</exception>
4048
public override void SerializeV3(IAsyncApiWriter writer) => this.SerializeProperties(writer);
4149

50+
/// <summary>
51+
/// Writes the Google Pub/Sub channel binding object and its extensions for AsyncAPI 3.0.
52+
/// </summary>
53+
/// <remarks>An unset binding version is omitted.</remarks>
54+
/// <exception cref="ArgumentNullException"><paramref name="writer"/> is null.</exception>
4255
public override void SerializeProperties(IAsyncApiWriter writer)
4356
{
4457
if (writer is null) throw new ArgumentNullException(nameof(writer));

‎src/ByteBard.AsyncAPI.Bindings/GooglePubSub/GooglePubSubMessageBinding.cs‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,22 @@ public class GooglePubSubMessageBinding : MessageBinding<GooglePubSubMessageBind
2626
{ "name", (a, n) => { a.Name = n.GetScalarValue(); } },
2727
};
2828

29+
/// <summary>
30+
/// Writes the Google Pub/Sub message binding object and its extensions for AsyncAPI 2.0.
31+
/// </summary>
32+
/// <exception cref="ArgumentNullException"><paramref name="writer"/> is null.</exception>
2933
public override void SerializeV2(IAsyncApiWriter writer) => this.SerializeV3(writer);
34+
/// <summary>
35+
/// Writes the Google Pub/Sub message binding object and its extensions for AsyncAPI 3.0.
36+
/// </summary>
37+
/// <exception cref="ArgumentNullException"><paramref name="writer"/> is null.</exception>
3038
public override void SerializeV3(IAsyncApiWriter writer) => this.SerializeProperties(writer);
3139

40+
/// <summary>
41+
/// Writes the Google Pub/Sub message binding object and its extensions for AsyncAPI 3.0.
42+
/// </summary>
43+
/// <remarks>An unset binding version is omitted.</remarks>
44+
/// <exception cref="ArgumentNullException"><paramref name="writer"/> is null.</exception>
3245
public override void SerializeProperties(IAsyncApiWriter writer)
3346
{
3447
if (writer is null) throw new ArgumentNullException(nameof(writer));

‎src/ByteBard.AsyncAPI.Bindings/GooglePubSub/MessageSchema.cs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ public class MessageSchema : IAsyncApiElement
77
{
88
public string Name { get; set; }
99

10+
/// <summary>
11+
/// Writes the message schema object, omitting an unset name.
12+
/// </summary>
13+
/// <exception cref="System.NullReferenceException"><paramref name="writer"/> is null.</exception>
1014
public void Serialize(IAsyncApiWriter writer)
1115
{
1216
writer.WriteStartObject();

‎src/ByteBard.AsyncAPI.Bindings/GooglePubSub/MessageStoragePolicy.cs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ public class MessageStoragePolicy : IAsyncApiElement
88
{
99
public IEnumerable<string> AllowedPersistenceRegions { get; set; }
1010

11+
/// <summary>
12+
/// Writes the message storage policy object, omitting null or empty persistence regions.
13+
/// </summary>
14+
/// <exception cref="System.NullReferenceException"><paramref name="writer"/> is null.</exception>
1115
public void Serialize(IAsyncApiWriter writer)
1216
{
1317
writer.WriteStartObject();

‎src/ByteBard.AsyncAPI.Bindings/GooglePubSub/SchemaSettings.cs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ public class SchemaSettings : IAsyncApiElement
1010
public string LastRevisionId { get; set; }
1111
public string Name { get; set; }
1212

13+
/// <summary>
14+
/// Writes the schema settings object, omitting unset values.
15+
/// </summary>
16+
/// <exception cref="System.NullReferenceException"><paramref name="writer"/> is null.</exception>
1317
public void Serialize(IAsyncApiWriter writer)
1418
{
1519
writer.WriteStartObject();

‎src/ByteBard.AsyncAPI.Bindings/IBMMQ/IBMMQChannelBinding.cs‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,22 @@ public class IBMMQChannelBinding : ChannelBinding<IBMMQChannelBinding>
3737
{ "lastMsgRetained", (a, n) => { a.LastMsgRetained = n.GetBooleanValue(); } },
3838
};
3939

40+
/// <summary>
41+
/// Writes the IBM MQ channel binding object and its extensions for AsyncAPI 2.0.
42+
/// </summary>
43+
/// <exception cref="ArgumentNullException"><paramref name="writer"/> is null.</exception>
4044
public override void SerializeV2(IAsyncApiWriter writer) => this.SerializeV3(writer);
45+
/// <summary>
46+
/// Writes the IBM MQ channel binding object and its extensions for AsyncAPI 3.0.
47+
/// </summary>
48+
/// <exception cref="ArgumentNullException"><paramref name="writer"/> is null.</exception>
4149
public override void SerializeV3(IAsyncApiWriter writer) => this.SerializeProperties(writer);
4250

51+
/// <summary>
52+
/// Writes the IBM MQ channel binding object and its extensions for AsyncAPI 3.0.
53+
/// </summary>
54+
/// <remarks>An unset binding version is omitted.</remarks>
55+
/// <exception cref="ArgumentNullException"><paramref name="writer"/> is null.</exception>
4356
public override void SerializeProperties(IAsyncApiWriter writer)
4457
{
4558
if (writer is null) throw new ArgumentNullException(nameof(writer));

0 commit comments

Comments
 (0)