Skip to content

Commit

Permalink
feat: upgrade to 2.6.0 (#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
VisualBean authored Feb 7, 2023
1 parent 14f522e commit 91a6184
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ internal static partial class AsyncApiV2Deserializer
{
private static FixedFieldMap<AsyncApiDocument> asyncApiFixedFields = new()
{
{ "asyncapi", (a, n) => { a.Asyncapi = "2.5.0"; } },
{ "asyncapi", (a, n) => { a.Asyncapi = "2.6.0"; } },
{ "id", (a, n) => a.Id = n.GetScalarValue() },
{ "info", (a, n) => a.Info = LoadInfo(n) },
{ "servers", (a, n) => a.Servers = n.CreateMap(LoadServer) },
Expand Down
2 changes: 1 addition & 1 deletion src/LEGO.AsyncAPI/Models/AsyncApiDocument.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public void SerializeV2(IAsyncApiWriter writer)
writer.WriteStartObject();

// asyncApi
writer.WriteRequiredProperty(AsyncApiConstants.AsyncApi, "2.5.0");
writer.WriteRequiredProperty(AsyncApiConstants.AsyncApi, "2.6.0");

// info
writer.WriteRequiredObject(AsyncApiConstants.Info, this.Info, (w, i) => i.SerializeV2(w));
Expand Down
6 changes: 3 additions & 3 deletions test/LEGO.AsyncAPI.Tests/AsyncApiDocumentV2Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public void AsyncApiDocument_WithStreetLightsExample_SerializesAndDeserializes()
{
// Arrange
var expected =
@"asyncapi: '2.5.0'
@"asyncapi: '2.6.0'
info:
title: Streetlights Kafka API
version: 1.0.0
Expand Down Expand Up @@ -699,7 +699,7 @@ public void AsyncApiDocument_WithStreetLightsExample_SerializesAndDeserializes()
public void SerializeV2_WithFullSpec_Serializes()
{
var expected =
@"asyncapi: '2.5.0'
@"asyncapi: '2.6.0'
info:
title: apiTitle
version: apiVersion
Expand Down Expand Up @@ -1129,7 +1129,7 @@ public void SerializeV2_WithFullSpec_Serializes()
[Test]
public void Serializev2_WithBindings_Serializes()
{
var expected = @"asyncapi: '2.5.0'
var expected = @"asyncapi: '2.6.0'
info:
description: test description
servers:
Expand Down

0 comments on commit 91a6184

Please sign in to comment.