Skip to content

Commit 7d39747

Browse files
authored
refactor: rename to AsyncApiJsonSchema to remove ambiguity (#205)
1 parent 3663254 commit 7d39747

34 files changed

+205
-205
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class HttpMessageBinding : MessageBinding<HttpMessageBinding>
1616
/// <summary>
1717
/// A Schema object containing the definitions for HTTP-specific headers. This schema MUST be of type object and have a properties key.
1818
/// </summary>
19-
public AsyncApiSchema Headers { get; set; }
19+
public AsyncApiJsonSchema Headers { get; set; }
2020

2121
/// <summary>
2222
/// Serialize to AsyncAPI V2 document without using reference.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public enum HttpOperationType
3636
/// <summary>
3737
/// A Schema object containing the definitions for each query parameter. This schema MUST be of type object and have a properties key.
3838
/// </summary>
39-
public AsyncApiSchema Query { get; set; }
39+
public AsyncApiJsonSchema Query { get; set; }
4040

4141
/// <summary>
4242
/// Serialize to AsyncAPI V2 document without using reference.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class KafkaMessageBinding : MessageBinding<KafkaMessageBinding>
1616
/// <summary>
1717
/// The message key. NOTE: You can also use the <a href="https://www.asyncapi.com/docs/reference/specification/v2.4.0#referenceObject">reference object</a> way.
1818
/// </summary>
19-
public AsyncApiSchema Key { get; set; }
19+
public AsyncApiJsonSchema Key { get; set; }
2020

2121
/// <summary>
2222
/// If a Schema Registry is used when performing this operation, tells where the id of schema is stored (e.g. header or payload).

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ public class KafkaOperationBinding : OperationBinding<KafkaOperationBinding>
1616
/// <summary>
1717
/// Id of the consumer group.
1818
/// </summary>
19-
public AsyncApiSchema GroupId { get; set; }
19+
public AsyncApiJsonSchema GroupId { get; set; }
2020

2121
/// <summary>
2222
/// Id of the consumer inside a consumer group.
2323
/// </summary>
24-
public AsyncApiSchema ClientId { get; set; }
24+
public AsyncApiJsonSchema ClientId { get; set; }
2525

2626
public override string BindingKey => "kafka";
2727

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public class MQTTMessageBinding : MessageBinding<MQTTMessageBinding>
2222
/// <summary>
2323
/// Correlation Data is used to identify the request the response message is for.
2424
/// </summary>
25-
public AsyncApiSchema CorrelationData { get; set; }
25+
public AsyncApiJsonSchema CorrelationData { get; set; }
2626

2727
/// <summary>
2828
/// String describing the content type of the message payload.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ public class WebSocketsChannelBinding : ChannelBinding<WebSocketsChannelBinding>
1818
/// <summary>
1919
/// A Schema object containing the definitions for each query parameter. This schema MUST be of type 'object' and have a 'properties' key.
2020
/// </summary>
21-
public AsyncApiSchema Query { get; set; }
21+
public AsyncApiJsonSchema Query { get; set; }
2222

2323
/// <summary>
2424
/// A Schema object containing the definitions of the HTTP headers to use when establishing the connection. This schma MUST be of type 'object' and have a 'properties' key.
2525
/// </summary>
26-
public AsyncApiSchema Headers { get; set; }
26+
public AsyncApiJsonSchema Headers { get; set; }
2727

2828
public override string BindingKey => "websockets";
2929

src/LEGO.AsyncAPI.Readers/AsyncApiExternalReferenceResolver.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public override void Visit(AsyncApiMessage message)
9393
switch (message.Payload)
9494
{
9595
case AsyncApiJsonSchemaPayload json:
96-
this.ResolveObject<AsyncApiSchema>(message.Payload as AsyncApiJsonSchemaPayload, r => message.Payload = new AsyncApiJsonSchemaPayload(r));
96+
this.ResolveObject<AsyncApiJsonSchema>(message.Payload as AsyncApiJsonSchemaPayload, r => message.Payload = new AsyncApiJsonSchemaPayload(r));
9797
break;
9898
case AsyncApiAvroSchemaPayload avro:
9999
// ToFix: this might not resolve correctly.
@@ -153,7 +153,7 @@ public override void Visit(AsyncApiParameter parameter)
153153
/// <summary>
154154
/// Resolve all references used in a schema.
155155
/// </summary>
156-
public override void Visit(AsyncApiSchema schema)
156+
public override void Visit(AsyncApiJsonSchema schema)
157157
{
158158
this.ResolveObject(schema.Items, r => schema.Items = r);
159159
this.ResolveList(schema.OneOf);

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ internal class AnyFieldMapParameter<T>
1010
public AnyFieldMapParameter(
1111
Func<T, AsyncApiAny> propertyGetter,
1212
Action<T, AsyncApiAny> propertySetter,
13-
Func<T, AsyncApiSchema> schemaGetter)
13+
Func<T, AsyncApiJsonSchema> schemaGetter)
1414
{
1515
this.PropertyGetter = propertyGetter;
1616
this.PropertySetter = propertySetter;
@@ -21,6 +21,6 @@ public AnyFieldMapParameter(
2121

2222
public Action<T, AsyncApiAny> PropertySetter { get; }
2323

24-
public Func<T, AsyncApiSchema> SchemaGetter { get; }
24+
public Func<T, AsyncApiJsonSchema> SchemaGetter { get; }
2525
}
2626
}

src/LEGO.AsyncAPI.Readers/ParseNodes/AnyListFieldMapParameter{T}.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ internal class AnyListFieldMapParameter<T>
1111
public AnyListFieldMapParameter(
1212
Func<T, IList<AsyncApiAny>> propertyGetter,
1313
Action<T, IList<AsyncApiAny>> propertySetter,
14-
Func<T, AsyncApiSchema> schemaGetter)
14+
Func<T, AsyncApiJsonSchema> schemaGetter)
1515
{
1616
this.PropertyGetter = propertyGetter;
1717
this.PropertySetter = propertySetter;
@@ -22,6 +22,6 @@ public AnyListFieldMapParameter(
2222

2323
public Action<T, IList<AsyncApiAny>> PropertySetter { get; }
2424

25-
public Func<T, AsyncApiSchema> SchemaGetter { get; }
25+
public Func<T, AsyncApiJsonSchema> SchemaGetter { get; }
2626
}
2727
}

src/LEGO.AsyncAPI.Readers/ParseNodes/AnyMapFieldMapParameter{T,U}.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public AnyMapFieldMapParameter(
1212
Func<T, IDictionary<string, U>> propertyMapGetter,
1313
Func<U, AsyncApiAny> propertyGetter,
1414
Action<U, AsyncApiAny> propertySetter,
15-
Func<T, AsyncApiSchema> schemaGetter)
15+
Func<T, AsyncApiJsonSchema> schemaGetter)
1616
{
1717
this.PropertyMapGetter = propertyMapGetter;
1818
this.PropertyGetter = propertyGetter;
@@ -26,6 +26,6 @@ public AnyMapFieldMapParameter(
2626

2727
public Action<U, AsyncApiAny> PropertySetter { get; }
2828

29-
public Func<T, AsyncApiSchema> SchemaGetter { get; }
29+
public Func<T, AsyncApiJsonSchema> SchemaGetter { get; }
3030
}
3131
}

0 commit comments

Comments
 (0)