Skip to content

Commit 3d270e7

Browse files
committed
First try of implementing avro
still missing a few bits and bobs
1 parent 80931cc commit 3d270e7

24 files changed

+257
-43
lines changed

src/LEGO.AsyncAPI.Bindings/Http/HttpMessageBinding.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public override void SerializeProperties(IAsyncApiWriter writer)
4242
protected override FixedFieldMap<HttpMessageBinding> FixedFieldMap => new()
4343
{
4444
{ "bindingVersion", (a, n) => { a.BindingVersion = n.GetScalarValue(); } },
45-
{ "headers", (a, n) => { a.Headers = JsonSchemaDeserializer.LoadSchema(n); } },
45+
{ "headers", (a, n) => { a.Headers = AsyncApiSchemaDeserializer.LoadSchema(n); } },
4646
};
4747
}
4848
}

src/LEGO.AsyncAPI.Bindings/Http/HttpOperationBinding.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public override void SerializeProperties(IAsyncApiWriter writer)
6363
{ "bindingVersion", (a, n) => { a.BindingVersion = n.GetScalarValue(); } },
6464
{ "type", (a, n) => { a.Type = n.GetScalarValue().GetEnumFromDisplayName<HttpOperationType>(); } },
6565
{ "method", (a, n) => { a.Method = n.GetScalarValue(); } },
66-
{ "query", (a, n) => { a.Query = JsonSchemaDeserializer.LoadSchema(n); } },
66+
{ "query", (a, n) => { a.Query = AsyncApiSchemaDeserializer.LoadSchema(n); } },
6767
};
6868

6969
public override string BindingKey => "http";

src/LEGO.AsyncAPI.Bindings/Kafka/KafkaMessageBinding.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public override void SerializeProperties(IAsyncApiWriter writer)
6767
protected override FixedFieldMap<KafkaMessageBinding> FixedFieldMap => new()
6868
{
6969
{ "bindingVersion", (a, n) => { a.BindingVersion = n.GetScalarValue(); } },
70-
{ "key", (a, n) => { a.Key = JsonSchemaDeserializer.LoadSchema(n); } },
70+
{ "key", (a, n) => { a.Key = AsyncApiSchemaDeserializer.LoadSchema(n); } },
7171
{ "schemaIdLocation", (a, n) => { a.SchemaIdLocation = n.GetScalarValue(); } },
7272
{ "schemaIdPayloadEncoding", (a, n) => { a.SchemaIdPayloadEncoding = n.GetScalarValue(); } },
7373
{ "schemaLookupStrategy", (a, n) => { a.SchemaLookupStrategy = n.GetScalarValue(); } },

src/LEGO.AsyncAPI.Bindings/Kafka/KafkaOperationBinding.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ public class KafkaOperationBinding : OperationBinding<KafkaOperationBinding>
2828
protected override FixedFieldMap<KafkaOperationBinding> FixedFieldMap => new()
2929
{
3030
{ "bindingVersion", (a, n) => { a.BindingVersion = n.GetScalarValue(); } },
31-
{ "groupId", (a, n) => { a.GroupId = JsonSchemaDeserializer.LoadSchema(n); } },
32-
{ "clientId", (a, n) => { a.ClientId = JsonSchemaDeserializer.LoadSchema(n); } },
31+
{ "groupId", (a, n) => { a.GroupId = AsyncApiSchemaDeserializer.LoadSchema(n); } },
32+
{ "clientId", (a, n) => { a.ClientId = AsyncApiSchemaDeserializer.LoadSchema(n); } },
3333
};
3434

3535
/// <summary>

src/LEGO.AsyncAPI.Bindings/MQTT/MQTTMessageBinding.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public override void SerializeProperties(IAsyncApiWriter writer)
5757
protected override FixedFieldMap<MQTTMessageBinding> FixedFieldMap => new()
5858
{
5959
{ "payloadFormatIndicator", (a, n) => { a.PayloadFormatIndicator = n.GetIntegerValueOrDefault(); } },
60-
{ "correlationData", (a, n) => { a.CorrelationData = JsonSchemaDeserializer.LoadSchema(n); } },
60+
{ "correlationData", (a, n) => { a.CorrelationData = AsyncApiSchemaDeserializer.LoadSchema(n); } },
6161
{ "contentType", (a, n) => { a.ContentType = n.GetScalarValue(); } },
6262
{ "responseTopic", (a, n) => { a.ResponseTopic = n.GetScalarValue(); } },
6363
};

src/LEGO.AsyncAPI.Bindings/WebSockets/WebSocketsChannelBinding.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ public class WebSocketsChannelBinding : ChannelBinding<WebSocketsChannelBinding>
3131
{
3232
{ "bindingVersion", (a, n) => { a.BindingVersion = n.GetScalarValue(); } },
3333
{ "method", (a, n) => { a.Method = n.GetScalarValue(); } },
34-
{ "query", (a, n) => { a.Query = JsonSchemaDeserializer.LoadSchema(n); } },
35-
{ "headers", (a, n) => { a.Headers = JsonSchemaDeserializer.LoadSchema(n); } },
34+
{ "query", (a, n) => { a.Query = AsyncApiSchemaDeserializer.LoadSchema(n); } },
35+
{ "headers", (a, n) => { a.Headers = AsyncApiSchemaDeserializer.LoadSchema(n); } },
3636
};
3737

3838
public override void SerializeProperties(IAsyncApiWriter writer)

src/LEGO.AsyncAPI.Readers/AsyncApiExternalReferenceResolver.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,10 @@ public override void Visit(AsyncApiOperation operation)
9191
public override void Visit(AsyncApiMessage message)
9292
{
9393
this.ResolveObject(message.Headers, r => message.Headers = r);
94-
this.ResolveObject(message.Payload, r => message.Payload = r);
94+
if (message.Payload is AsyncApiSchemaPayload)
95+
{
96+
this.ResolveObject(message.Payload as AsyncApiSchemaPayload, r => message.Payload = r);
97+
}
9598
this.ResolveList(message.Traits);
9699
this.ResolveObject(message.CorrelationId, r => message.CorrelationId = r);
97100
this.ResolveObject(message.Bindings, r => message.Bindings = r);

src/LEGO.AsyncAPI.Readers/ParseNodes/PropertyNode.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public void ParseField<T>(
7979
else
8080
{
8181
this.Context.Diagnostic.Errors.Add(
82-
new AsyncApiError("", $"{this.Name} is not a valid property at {this.Context.GetLocation()}"));
82+
new AsyncApiError(string.Empty, $"{this.Name} is not a valid property at {this.Context.GetLocation()}"));
8383
}
8484
}
8585
}

src/LEGO.AsyncAPI.Readers/V2/AsyncApiComponentsDeserializer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ internal static partial class AsyncApiV2Deserializer
1010
{
1111
private static FixedFieldMap<AsyncApiComponents> componentsFixedFields = new()
1212
{
13-
{ "schemas", (a, n) => a.Schemas = n.CreateMapWithReference(ReferenceType.Schema, JsonSchemaDeserializer.LoadSchema) },
13+
{ "schemas", (a, n) => a.Schemas = n.CreateMapWithReference(ReferenceType.Schema, AsyncApiSchemaDeserializer.LoadSchema) },
1414
{ "servers", (a, n) => a.Servers = n.CreateMapWithReference(ReferenceType.Server, LoadServer) },
1515
{ "channels", (a, n) => a.Channels = n.CreateMapWithReference(ReferenceType.Channel, LoadChannel) },
1616
{ "messages", (a, n) => a.Messages = n.CreateMapWithReference(ReferenceType.Message, LoadMessage) },

src/LEGO.AsyncAPI.Readers/V2/AsyncApiMessageDeserializer.cs

Lines changed: 49 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,19 @@ namespace LEGO.AsyncAPI.Readers
55
using LEGO.AsyncAPI.Exceptions;
66
using LEGO.AsyncAPI.Extensions;
77
using LEGO.AsyncAPI.Models;
8+
using LEGO.AsyncAPI.Models.Interfaces;
89
using LEGO.AsyncAPI.Readers.ParseNodes;
10+
using System;
911
using System.Collections.Generic;
12+
using System.Diagnostics.CodeAnalysis;
1013
using System.Linq;
1114

15+
16+
internal static partial class AsyncApiV2Deserializer
17+
{
18+
19+
}
20+
1221
/// <summary>
1322
/// Class containing logic to deserialize AsyncApi document into
1423
/// runtime AsyncApi object model.
@@ -21,10 +30,10 @@ internal static partial class AsyncApiV2Deserializer
2130
"messageId", (a, n) => { a.MessageId = n.GetScalarValue(); }
2231
},
2332
{
24-
"headers", (a, n) => { a.Headers = JsonSchemaDeserializer.LoadSchema(n); }
33+
"headers", (a, n) => { a.Headers = AsyncApiSchemaDeserializer.LoadSchema(n); }
2534
},
2635
{
27-
"payload", (a, n) => { a.Payload = JsonSchemaDeserializer.LoadSchema(n); }
36+
"payload", (a, n) => { a.Payload = null; /* resolved after the initial run */ }
2837
},
2938
{
3039
"correlationId", (a, n) => { a.CorrelationId = LoadCorrelationId(n); }
@@ -64,7 +73,34 @@ internal static partial class AsyncApiV2Deserializer
6473
},
6574
};
6675

67-
static readonly IEnumerable<string> SupportedSchemaFormats = new List<string>
76+
public static IAsyncApiMessagePayload LoadPayload(ParseNode n)
77+
{
78+
// #ToFix figure out a way to get the format in a proper way.
79+
return LoadPayload(n, null);
80+
}
81+
82+
private static IAsyncApiMessagePayload LoadPayload(ParseNode n, string format)
83+
{
84+
if (n == null)
85+
{
86+
return null;
87+
}
88+
89+
switch (format)
90+
{
91+
case null:
92+
case "":
93+
case var _ when SupportedJsonSchemaFormats.Where(s => format.StartsWith(s)).Any():
94+
return new AsyncApiSchemaPayload(AsyncApiSchemaDeserializer.LoadSchema(n));
95+
case var _ when SupportedAvroSchemaFormats.Where(s => format.StartsWith(s)).Any():
96+
return new AsyncApiAvroSchemaPayload();
97+
default:
98+
var supportedFormats = SupportedJsonSchemaFormats.Concat(SupportedAvroSchemaFormats);
99+
throw new AsyncApiException($"'Could not deserialize Payload. Supported formats are {string.Join(", ", supportedFormats)}");
100+
}
101+
}
102+
103+
static readonly IEnumerable<string> SupportedJsonSchemaFormats = new List<string>
68104
{
69105
"application/vnd.aai.asyncapi+json",
70106
"application/vnd.aai.asyncapi+yaml",
@@ -73,11 +109,18 @@ internal static partial class AsyncApiV2Deserializer
73109
"application/schema+yaml;version=draft-07",
74110
};
75111

112+
static readonly IEnumerable<string> SupportedAvroSchemaFormats = new List<string>
113+
{
114+
"application/vnd.apache.avro+json;version=1.9.0",
115+
"application/vnd.apache.avro+yaml;version=1.9.0",
116+
};
117+
76118
private static string LoadSchemaFormat(string schemaFormat)
77119
{
78-
if (!SupportedSchemaFormats.Where(s => schemaFormat.StartsWith(s)).Any())
120+
var supportedFormats = SupportedJsonSchemaFormats.Concat(SupportedAvroSchemaFormats);
121+
if (!supportedFormats.Where(s => schemaFormat.StartsWith(s)).Any())
79122
{
80-
throw new AsyncApiException($"'{schemaFormat}' is not a supported format. Supported formats are {string.Join(", ", SupportedSchemaFormats)}");
123+
throw new AsyncApiException($"'{schemaFormat}' is not a supported format. Supported formats are {string.Join(", ", supportedFormats)}");
81124
}
82125

83126
return schemaFormat;
@@ -100,6 +143,7 @@ public static AsyncApiMessage LoadMessage(ParseNode node)
100143
var message = new AsyncApiMessage();
101144

102145
ParseMap(mapNode, message, messageFixedFields, messagePatternFields);
146+
message.Payload = LoadPayload(mapNode["payload"]?.Value, message.SchemaFormat);
103147

104148
return message;
105149
}

src/LEGO.AsyncAPI.Readers/V2/AsyncApiMessageTraitDeserializer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ internal static partial class AsyncApiV2Deserializer
1111
private static FixedFieldMap<AsyncApiMessageTrait> messageTraitFixedFields = new()
1212
{
1313
{ "messageId", (a, n) => { a.MessageId = n.GetScalarValue(); } },
14-
{ "headers", (a, n) => { a.Headers = JsonSchemaDeserializer.LoadSchema(n); } },
14+
{ "headers", (a, n) => { a.Headers = AsyncApiSchemaDeserializer.LoadSchema(n); } },
1515
{ "correlationId", (a, n) => { a.CorrelationId = LoadCorrelationId(n); } },
1616
{ "schemaFormat", (a, n) => { a.SchemaFormat = n.GetScalarValue(); } },
1717
{ "contentType", (a, n) => { a.ContentType = n.GetScalarValue(); } },

src/LEGO.AsyncAPI.Readers/V2/AsyncApiParameterDeserializer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ internal static partial class AsyncApiV2Deserializer
1111
private static FixedFieldMap<AsyncApiParameter> parameterFixedFields = new()
1212
{
1313
{ "description", (a, n) => { a.Description = n.GetScalarValue(); } },
14-
{ "schema", (a, n) => { a.Schema = JsonSchemaDeserializer.LoadSchema(n); } },
14+
{ "schema", (a, n) => { a.Schema = AsyncApiSchemaDeserializer.LoadSchema(n); } },
1515
{ "location", (a, n) => { a.Location = n.GetScalarValue(); } },
1616
};
1717

src/LEGO.AsyncAPI.Readers/V2/AsyncApiSchemaDeserializer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace LEGO.AsyncAPI.Readers
99
using LEGO.AsyncAPI.Readers.ParseNodes;
1010
using LEGO.AsyncAPI.Writers;
1111

12-
public class JsonSchemaDeserializer
12+
public class AsyncApiSchemaDeserializer
1313
{
1414
private static readonly FixedFieldMap<AsyncApiSchema> schemaFixedFields = new()
1515
{

src/LEGO.AsyncAPI.Readers/V2/AsyncApiV2VersionService.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ public AsyncApiV2VersionService(AsyncApiDiagnostic diagnostic)
3535
[typeof(AsyncApiOAuthFlows)] = AsyncApiV2Deserializer.LoadOAuthFlows,
3636
[typeof(AsyncApiOperation)] = AsyncApiV2Deserializer.LoadOperation,
3737
[typeof(AsyncApiParameter)] = AsyncApiV2Deserializer.LoadParameter,
38-
[typeof(AsyncApiSchema)] = JsonSchemaDeserializer.LoadSchema,
38+
[typeof(AsyncApiSchema)] = AsyncApiSchemaDeserializer.LoadSchema,
39+
[typeof(AsyncApiSchemaPayload)] = AsyncApiV2Deserializer.LoadPayload, // #ToFix how do we get the schemaFormat?!
3940
[typeof(AsyncApiSecurityRequirement)] = AsyncApiV2Deserializer.LoadSecurityRequirement,
4041
[typeof(AsyncApiSecurityScheme)] = AsyncApiV2Deserializer.LoadSecurityScheme,
4142
[typeof(AsyncApiServer)] = AsyncApiV2Deserializer.LoadServer,
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Copyright (c) The LEGO Group. All rights reserved.
2+
3+
namespace LEGO.AsyncAPI.Models
4+
{
5+
using System;
6+
using LEGO.AsyncAPI.Models.Interfaces;
7+
using LEGO.AsyncAPI.Writers;
8+
9+
public class AsyncApiAvroSchemaPayload : IAsyncApiMessagePayload
10+
{
11+
public void SerializeV2(IAsyncApiWriter writer)
12+
{
13+
throw new NotImplementedException();
14+
}
15+
}
16+
}

src/LEGO.AsyncAPI/Models/AsyncApiMessage.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public class AsyncApiMessage : IAsyncApiExtensible, IAsyncApiReferenceable, IAsy
2525
/// <summary>
2626
/// definition of the message payload. It can be of any type but defaults to Schema object. It must match the schema format, including encoding type - e.g Avro should be inlined as either a YAML or JSON object NOT a string to be parsed as YAML or JSON.
2727
/// </summary>
28-
public AsyncApiSchema Payload { get; set; }
28+
public IAsyncApiMessagePayload Payload { get; set; }
2929

3030
/// <summary>
3131
/// definition of the correlation ID used for message tracing or matching.
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
// Copyright (c) The LEGO Group. All rights reserved.
2+
3+
namespace LEGO.AsyncAPI.Models
4+
{
5+
using System.Collections.Generic;
6+
using System.Runtime.CompilerServices;
7+
using LEGO.AsyncAPI.Models.Interfaces;
8+
using LEGO.AsyncAPI.Writers;
9+
10+
public class AsyncApiSchemaPayload : IAsyncApiMessagePayload, IAsyncApiReferenceable
11+
{
12+
private readonly AsyncApiSchema schema;
13+
14+
public AsyncApiSchemaPayload()
15+
{
16+
this.schema = new AsyncApiSchema();
17+
}
18+
19+
public AsyncApiSchemaPayload(AsyncApiSchema schema)
20+
{
21+
this.schema = schema;
22+
}
23+
24+
public string Title { get => this.schema.Title; set => this.schema.Title = value; }
25+
26+
public SchemaType? Type { get => this.schema.Type; set => this.schema.Type = value; }
27+
28+
public string Format { get => this.schema.Format; set => this.schema.Format = value; }
29+
30+
public string Description { get => this.schema.Description; set => this.schema.Description = value; }
31+
32+
public double? Maximum { get => this.schema.Maximum; set => this.schema.Maximum = value; }
33+
34+
public bool? ExclusiveMaximum { get => this.schema.ExclusiveMaximum; set => this.schema.ExclusiveMaximum = value; }
35+
36+
public double? Minimum { get => this.schema.Minimum; set => this.schema.Minimum = value; }
37+
38+
public bool? ExclusiveMinimum { get => this.schema.ExclusiveMinimum; set => this.schema.ExclusiveMinimum = value; }
39+
40+
public int? MaxLength { get => this.schema.MaxLength; set => this.schema.MaxLength = value; }
41+
42+
public int? MinLength { get => this.schema.MinLength; set => this.schema.MinLength = value; }
43+
44+
public string Pattern { get => this.schema.Pattern; set => this.schema.Pattern = value; }
45+
46+
public double? MultipleOf { get => this.schema.MultipleOf; set => this.schema.MultipleOf = value; }
47+
48+
public AsyncApiAny Default { get => this.schema.Default; set => this.schema.Default = value; }
49+
50+
public bool ReadOnly { get => this.schema.ReadOnly; set => this.schema.ReadOnly = value; }
51+
52+
public bool WriteOnly { get => this.schema.WriteOnly; set => this.schema.WriteOnly = value; }
53+
54+
public IList<AsyncApiSchema> AllOf { get => this.schema.AllOf; set => this.schema.AllOf = value; }
55+
56+
public IList<AsyncApiSchema> OneOf { get => this.schema.OneOf; set => this.schema.OneOf = value; }
57+
58+
public IList<AsyncApiSchema> AnyOf { get => this.schema.AnyOf; set => this.schema.AnyOf = value; }
59+
60+
public AsyncApiSchema Not { get => this.schema.Not; set => this.schema.Not = value; }
61+
62+
public AsyncApiSchema Contains { get => this.schema.Contains; set => this.schema.Contains = value; }
63+
64+
public AsyncApiSchema If { get => this.schema.If; set => this.schema.If = value; }
65+
66+
public AsyncApiSchema Then { get => this.schema.Then; set => this.schema.Then = value; }
67+
68+
public AsyncApiSchema Else { get => this.schema.Else; set => this.schema.Else = value; }
69+
70+
public ISet<string> Required { get => this.schema.Required; set => this.schema.Required = value; }
71+
72+
public AsyncApiSchema Items { get => this.schema.Items; set => this.schema.Items = value; }
73+
74+
public AsyncApiSchema AdditionalItems { get => this.schema.AdditionalItems; set => this.schema.AdditionalItems = value; }
75+
76+
public int? MaxItems { get => this.schema.MaxItems; set => this.schema.MaxItems = value; }
77+
78+
public int? MinItems { get => this.schema.MinItems; set => this.schema.MinItems = value; }
79+
80+
public bool? UniqueItems { get => this.schema.UniqueItems; set => this.schema.UniqueItems = value; }
81+
82+
public IDictionary<string, AsyncApiSchema> Properties { get => this.schema.Properties; set => this.schema.Properties = value; }
83+
84+
public int? MaxProperties { get => this.schema.MaxProperties; set => this.schema.MaxProperties = value; }
85+
86+
public int? MinProperties { get => this.schema.MinProperties; set => this.schema.MinProperties = value; }
87+
88+
public IDictionary<string, AsyncApiSchema> PatternProperties { get => this.schema.PatternProperties; set => this.schema.PatternProperties = value; }
89+
90+
public AsyncApiSchema PropertyNames { get => this.schema.PropertyNames; set => this.schema.PropertyNames = value; }
91+
92+
public string Discriminator { get => this.schema.Discriminator; set => this.schema.Discriminator = value; }
93+
94+
public IList<AsyncApiAny> Enum { get => this.schema.Enum; set => this.schema.Enum = value; }
95+
96+
public IList<AsyncApiAny> Examples { get => this.schema.Examples; set => this.schema.Examples = value; }
97+
98+
public AsyncApiAny Const { get => this.schema.Const; set => this.schema.Const = value; }
99+
100+
public bool Nullable { get => this.schema.Nullable; set => this.schema.Nullable = value; }
101+
102+
public AsyncApiExternalDocumentation ExternalDocs { get => this.schema.ExternalDocs; set => this.schema.ExternalDocs = value; }
103+
104+
public bool Deprecated { get => this.schema.Deprecated; set => this.schema.Deprecated = value; }
105+
106+
public bool UnresolvedReference { get => this.schema.UnresolvedReference; set => this.schema.UnresolvedReference = value; }
107+
108+
public AsyncApiReference Reference { get => this.schema.Reference; set => this.schema.Reference = value; }
109+
110+
public IDictionary<string, IAsyncApiExtension> Extensions { get => this.schema.Extensions; set => this.schema.Extensions = value; }
111+
112+
public AsyncApiSchema AdditionalProperties { get => this.schema.AdditionalProperties; set => this.schema.AdditionalProperties = value; }
113+
114+
public static implicit operator AsyncApiSchema(AsyncApiSchemaPayload payload) => payload.schema;
115+
116+
public static implicit operator AsyncApiSchemaPayload(AsyncApiSchema schema) => new AsyncApiSchemaPayload(schema);
117+
118+
public void SerializeV2(IAsyncApiWriter writer)
119+
{
120+
this.schema.SerializeV2(writer);
121+
}
122+
123+
public void SerializeV2WithoutReference(IAsyncApiWriter writer)
124+
{
125+
this.schema.SerializeV2WithoutReference(writer);
126+
}
127+
}
128+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Copyright (c) The LEGO Group. All rights reserved.
2+
3+
namespace LEGO.AsyncAPI.Models.Interfaces
4+
{
5+
public interface IAsyncApiMessagePayload : IAsyncApiSerializable
6+
{
7+
}
8+
}

0 commit comments

Comments
 (0)