Skip to content

Commit fd873d0

Browse files
authored
fix(bindings): remove pulsar binding (#70)
1 parent 827f824 commit fd873d0

File tree

8 files changed

+2
-265
lines changed

8 files changed

+2
-265
lines changed

src/LEGO.AsyncAPI.Readers/AsyncApiChannelBindingDeserializer.cs

-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ internal static IChannelBinding LoadChannelBinding(ParseNode node)
4242
{
4343
case BindingType.Kafka:
4444
return LoadBinding("ChannelBinding", property.Value, kafkaChannelBindingFixedFields);
45-
case BindingType.Pulsar:
46-
return LoadBinding("ChannelBinding", property.Value, pulsarChannelBindingFixedFields);
4745
case BindingType.Websockets:
4846
return LoadBinding("ChannelBinding", property.Value, webSocketsChannelBindingFixedFields);
4947
default:

src/LEGO.AsyncAPI.Readers/AsyncApiServerBindingDeserializer.cs

-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ internal static IServerBinding LoadServerBinding(ParseNode node)
4242
{
4343
case BindingType.Kafka:
4444
return LoadBinding("ServerBinding", property.Value, kafkaServerBindingFixedFields);
45-
case BindingType.Pulsar:
46-
return LoadBinding("ServerBinding", property.Value, pulsarServerBindingFixedFields);
4745
default:
4846
throw new System.Exception("ServerBinding not found");
4947
}

src/LEGO.AsyncAPI.Readers/Bindings/AsyncApiPulsarBindingsDeserializer.cs

-40
This file was deleted.

src/LEGO.AsyncAPI/Models/Bindings/BindingType.cs

-3
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,5 @@ public enum BindingType
1414

1515
[Display("websockets")]
1616
Websockets,
17-
18-
[Display("pulsar")]
19-
Pulsar,
2017
}
2118
}

src/LEGO.AsyncAPI/Models/Bindings/Pulsar/PulsarChannelBinding.cs

-90
This file was deleted.

src/LEGO.AsyncAPI/Models/Bindings/Pulsar/PulsarServerBinding.cs

-66
This file was deleted.

src/LEGO.AsyncAPI/Models/Bindings/Pulsar/RetentionDefinition.cs

-28
This file was deleted.

test/LEGO.AsyncAPI.Tests/AsyncApiDocumentTests.cs

+2-34
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
using LEGO.AsyncAPI.Models.Bindings;
1111
using LEGO.AsyncAPI.Models.Bindings.Http;
1212
using LEGO.AsyncAPI.Models.Bindings.Kafka;
13-
using LEGO.AsyncAPI.Models.Bindings.Pulsar;
1413
using LEGO.AsyncAPI.Models.Interfaces;
1514
using LEGO.AsyncAPI.Readers;
1615
using LEGO.AsyncAPI.Writers;
@@ -463,9 +462,6 @@ public void Serialize_WithBindings_Serializes()
463462
url: example.com
464463
protocol: pulsar+ssl
465464
description: test description
466-
bindings:
467-
pulsar:
468-
tenant: contoso
469465
channels:
470466
testChannel:
471467
publish:
@@ -480,14 +476,8 @@ public void Serialize_WithBindings_Serializes()
480476
bindings:
481477
kafka:
482478
partitions: 2
483-
replicas: 1
484-
pulsar:
485-
persistence: persistent
486-
compaction: 9223372036854775807
487-
retention:
488-
time: 4
489-
size: 1
490-
deduplication: true";
479+
replicas: 1";
480+
491481
var doc = new AsyncApiDocument();
492482
doc.Info = new AsyncApiInfo()
493483
{
@@ -498,15 +488,6 @@ public void Serialize_WithBindings_Serializes()
498488
Description = "test description",
499489
Protocol = "pulsar+ssl",
500490
Url = "example.com",
501-
Bindings = new AsyncApiBindings<IServerBinding>
502-
{
503-
{
504-
new PulsarServerBinding
505-
{
506-
Tenant = "contoso",
507-
}
508-
},
509-
}
510491
});
511492
doc.Channels.Add("testChannel",
512493
new AsyncApiChannel
@@ -520,19 +501,6 @@ public void Serialize_WithBindings_Serializes()
520501
Replicas = 1,
521502
}
522503
},
523-
{
524-
new PulsarChannelBinding
525-
{
526-
Compaction = long.MaxValue,
527-
Deduplication = true,
528-
Persistence = "persistent",
529-
Retention = new RetentionDefinition()
530-
{
531-
Time = 4,
532-
Size = 1,
533-
},
534-
}
535-
},
536504
},
537505
Publish = new AsyncApiOperation
538506
{

0 commit comments

Comments
 (0)