Skip to content

Commit

Permalink
Merge pull request #158 from Pakisan/1.0.0-EAP-3-SNAPSHOT
Browse files Browse the repository at this point in the history
1.0.0-eap-3-snapshot
  • Loading branch information
Pakisan authored Feb 26, 2024
2 parents ae89db0 + 77472da commit de12b3b
Show file tree
Hide file tree
Showing 1,015 changed files with 144,300 additions and 11,454 deletions.
30 changes: 29 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,27 @@ Hints:
- [Springwolf Core](https://github.com/springwolf/springwolf-core) - Automated documentation for async APIs built with Spring Boot
- [AsyncAPI Quarkus](https://github.com/quarkiverse/quarkus-asyncapi) - Generates AsyncAPIRegistry and configuration classes for Quarkus

## Known open specifications to check compatibility with:
- [x] [adeo-kafka-request-reply-asyncapi.yml](https://github.com/asyncapi/spec/blob/master/examples/adeo-kafka-request-reply-asyncapi.yml)
- [x] [anyof-asyncapi.yml](https://github.com/asyncapi/spec/blob/master/examples/anyof-asyncapi.yml)
- [x] [application-headers-asyncapi.yml](https://github.com/asyncapi/spec/blob/master/examples/application-headers-asyncapi.yml)
- [x] [correlation-id-asyncapi.yml](https://github.com/asyncapi/spec/blob/master/examples/correlation-id-asyncapi.yml)
- [x] [gitter-streaming-asyncapi.yml](https://github.com/asyncapi/spec/blob/master/examples/gitter-streaming-asyncapi.yml)
- [x] [kraken-websocket-request-reply-message-filter-in-reply-asyncapi.yml](https://github.com/asyncapi/spec/blob/master/examples/kraken-websocket-request-reply-message-filter-in-reply-asyncapi.yml)
- [x] [kraken-websocket-request-reply-multiple-channels-asyncapi.yml](https://github.com/asyncapi/spec/blob/master/examples/kraken-websocket-request-reply-multiple-channels-asyncapi.yml)
- [x] [mercure-asyncapi.yml](https://github.com/asyncapi/spec/blob/master/examples/mercure-asyncapi.yml)
- [x] [not-asyncapi.yml](https://github.com/asyncapi/spec/blob/master/examples/not-asyncapi.yml)
- [x] [oneof-asyncapi.yml](https://github.com/asyncapi/spec/blob/master/examples/oneof-asyncapi.yml)
- [x] [operation-security-asyncapi.yml](https://github.com/asyncapi/spec/blob/master/examples/operation-security-asyncapi.yml)
- [x] [rpc-client-asyncapi.yml](https://github.com/asyncapi/spec/blob/master/examples/rpc-client-asyncapi.yml)
- [x] [rpc-server-asyncapi.yml](https://github.com/asyncapi/spec/blob/master/examples/rpc-server-asyncapi.yml)
- [x] [simple-asyncapi.yml](https://github.com/asyncapi/spec/blob/master/examples/simple-asyncapi.yml)
- [x] [slack-rtm-asyncapi.yml](https://github.com/asyncapi/spec/blob/master/examples/slack-rtm-asyncapi.yml)
- [x] [streetlights-kafka-asyncapi.yml](https://github.com/asyncapi/spec/blob/master/examples/streetlights-kafka-asyncapi.yml)
- [x] [streetlights-mqtt-asyncapi.yml](https://github.com/asyncapi/spec/blob/master/examples/streetlights-mqtt-asyncapi.yml)
- [x] [streetlights-operation-security-asyncapi.yml](https://github.com/asyncapi/spec/blob/master/examples/streetlights-operation-security-asyncapi.yml)
- [x] [websocket-gemini-asyncapi.yml](https://github.com/asyncapi/spec/blob/master/examples/websocket-gemini-asyncapi.yml)

## Contributors section

### Build
Expand All @@ -30,7 +51,14 @@ Hints:

If you are using SDKMAN! use [env](https://sdkman.io/usage#env) to prepare environment
```shell
sdk env
sdk env install
```

### Install locally

Each build is GPG signed. To avoid this, and to not configure GPG locally, you can use this command:
```shell
mvn clean install -Dgpg.skip
```

### Publish new release
Expand Down
2 changes: 1 addition & 1 deletion asyncapi-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ which allows to use it in null-safety languages like `kotlin` without extra head
<dependency>
<groupId>com.asyncapi</groupId>
<artifactId>asyncapi-core</artifactId>
<version>1.0.0-EAP</version>
<version>1.0.0-EAP-2</version>
</dependency>
```

Expand Down
7 changes: 6 additions & 1 deletion asyncapi-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>asyncapi</artifactId>
<groupId>com.asyncapi</groupId>
<version>1.0.0-EAP-2</version>
<version>1.0.0-EAP-3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down Expand Up @@ -51,6 +51,11 @@
<artifactId>jackson-dataformat-yaml</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>2.0.1.Final</version>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package com.asyncapi.v2._6_0.model;
package com.asyncapi.v2;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.jetbrains.annotations.NotNull;

Expand All @@ -23,7 +22,6 @@
* @author Pavel Bodiachevskii
*/
@Data
@EqualsAndHashCode
@NoArgsConstructor
@AllArgsConstructor
public class Reference {
Expand All @@ -35,6 +33,6 @@ public class Reference {
*/
@NotNull
@JsonProperty(value = "$ref")
private String ref;
private String ref = "";

}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.asyncapi.v2._0_0.jackson.model.channel;

import com.asyncapi.v2._0_0.model.Reference;
import com.asyncapi.v2.Reference;
import com.asyncapi.v2._0_0.model.channel.Parameter;
import com.asyncapi.v2.jackson.MapOfReferencesOrObjectsDeserializer;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.asyncapi.v2._0_0.jackson.model.channel.message;

import com.asyncapi.v2._0_0.model.Reference;
import com.asyncapi.v2.Reference;
import com.asyncapi.v2._0_0.model.channel.message.CorrelationId;
import com.asyncapi.v2.jackson.ReferenceOrObjectDeserializer;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.asyncapi.v2._0_0.jackson.model.channel.message;

import com.asyncapi.v2._0_0.model.Reference;
import com.asyncapi.v2.Reference;
import com.asyncapi.v2.schema.Schema;
import com.asyncapi.v2.jackson.ReferenceOrObjectDeserializer;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.asyncapi.v2._0_0.jackson.model.channel.message;

import com.asyncapi.v2._0_0.model.Reference;
import com.asyncapi.v2.Reference;
import com.asyncapi.v2._0_0.model.channel.message.MessageTrait;
import com.asyncapi.v2.jackson.ListOfReferencesOrObjectsDeserializer;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.asyncapi.v2._0_0.jackson.model.channel.operation;

import com.asyncapi.v2._0_0.model.Reference;
import com.asyncapi.v2.Reference;
import com.asyncapi.v2._0_0.model.channel.message.Message;
import com.asyncapi.v2.jackson.ReferenceOrObjectDeserializer;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.asyncapi.v2._0_0.jackson.model.channel.operation;

import com.asyncapi.v2._0_0.model.Reference;
import com.asyncapi.v2.Reference;
import com.asyncapi.v2._0_0.model.channel.operation.OperationTrait;
import com.asyncapi.v2.jackson.ListOfReferencesOrObjectsDeserializer;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.asyncapi.v2._0_0.jackson.model.component;

import com.asyncapi.v2._0_0.model.Reference;
import com.asyncapi.v2.Reference;
import com.asyncapi.v2._0_0.model.channel.message.Message;
import com.asyncapi.v2.jackson.MapOfReferencesOrObjectsDeserializer;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.asyncapi.v2._0_0.jackson.model.component;

import com.asyncapi.v2._0_0.model.Reference;
import com.asyncapi.v2.Reference;
import com.asyncapi.v2._0_0.model.channel.Parameter;
import com.asyncapi.v2.jackson.MapOfReferencesOrObjectsDeserializer;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.asyncapi.v2._0_0.jackson.model.component;

import com.asyncapi.v2._0_0.model.Reference;
import com.asyncapi.v2.Reference;
import com.asyncapi.v2.schema.Schema;
import com.asyncapi.v2.jackson.MapOfReferencesOrObjectsDeserializer;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.asyncapi.v2._0_0.jackson.model.component;

import com.asyncapi.v2._0_0.model.Reference;
import com.asyncapi.v2.Reference;
import com.asyncapi.v2.jackson.MapOfReferencesOrObjectsDeserializer;
import com.asyncapi.v2.security_scheme.SecurityScheme;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

Expand All @@ -33,25 +34,26 @@ public class AsyncAPI extends ExtendableObject {

/**
* Required.
*
* <p>
* Specifies the AsyncAPI Specification version being used.
* It can be used by tooling Specifications and clients to interpret the version.
* The structure shall be major.minor.patch, where patch versions must be compatible
* with the existing major.minor tooling.
*
* <p>
* Typically patch versions will be introduced to address errors in the documentation,
* and tooling should typically be compatible with the corresponding major.minor (1.0.*).
* Patch versions will correspond to patches of this document.
*/
@NotNull
private String asyncapi = "2.0.0";
@Builder.Default
private final String asyncapi = "2.0.0";

/**
* Identifier of the application the AsyncAPI document is defining.
*
* <p>
* This field represents a unique universal identifier of the application the AsyncAPI document is defining.
* It must conform to the URI format, according to RFC3986.
*
* <p>
* It is RECOMMENDED to use a URN to globally and uniquely identify the application during long periods of time,
* even after it becomes unavailable or ceases to exist.
*/
Expand All @@ -62,19 +64,20 @@ public class AsyncAPI extends ExtendableObject {
* A string representing the default content type to use when encoding/decoding a message's payload.
* The value MUST be a specific media type (e.g. application/json).
* This value MUST be used by schema parsers when the contentType property is omitted.
*
* <p>
* In case a message can't be encoded/decoded using this value, schema parsers MUST use their default content type.
*/
@Nullable
private String defaultContentType;

/**
* Required.
*
* <p>
* Provides metadata about the API. The metadata can be used by the clients if needed.
*/
@NotNull
private Info info;
@Builder.Default
private Info info = new Info();

/**
* Provides connection details of servers.
Expand All @@ -84,15 +87,16 @@ public class AsyncAPI extends ExtendableObject {

/**
* Required.
*
* <p>
* The available channels and messages for the API.
*
* <p>
* Holds the relative paths to the individual channel and their operations. Channel paths are relative to servers.
*
* <p>
* Channels are also known as "topics", "routing keys", "event types" or "paths".
*/
@NotNull
private Map<String, ChannelItem> channels;
@Builder.Default
private Map<String, ChannelItem> channels = new HashMap<>();

/**
* An element to hold various schemas for the specification.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ public class ExternalDocumentation extends ExtendableObject {

/**
* Required.
*
* <p>
* The URL for the target documentation. Value MUST be in the format of a URL.
*/
@NotNull
private String url;
@Builder.Default
private String url = "";

}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ public class Tag extends ExtendableObject {
* Required. The name of the tag.
*/
@NotNull
private String name;
@Builder.Default
private String name = "";

/**
* A short description for the tag. CommonMark syntax can be used for rich text representation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.asyncapi.v2.ExtendableObject;
import com.asyncapi.v2._0_0.jackson.model.channel.ChannelParametersDeserializer;
import com.asyncapi.v2._0_0.model.Reference;
import com.asyncapi.v2.Reference;
import com.asyncapi.v2._0_0.model.channel.operation.Operation;
import com.asyncapi.v2.binding.channel.ChannelBinding;
import com.asyncapi.v2.jackson.binding.channel.ChannelBindingsDeserializer;
Expand Down Expand Up @@ -64,9 +64,9 @@ public class ChannelItem extends ExtendableObject {
/**
* A map of the parameters included in the channel name.
* It SHOULD be present only when using channels with expressions (as defined by RFC 6570 section 2.2).
*
* <p>
* This map MUST contain all the parameters used in the parent channel name.
*
* <p>
* MUST BE:
* <ul>
* <li>{@link Reference}</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class Parameter extends ExtendableObject {

/**
* A runtime expression that specifies the location of the parameter value.
*
* <p>
* Even when a definition for the target field exists, it MUST NOT be used to validate this parameter but,
* instead, the schema property MUST be used.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ public class CorrelationId extends ExtendableObject {

/**
* REQUIRED.
*
* <p>
* A runtime expression that specifies the location of the correlation ID.
*/
@NotNull
private String location;
@Builder.Default
private String location = "";

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import com.asyncapi.v2._0_0.jackson.model.channel.message.MessagePayloadDeserializer;
import com.asyncapi.v2._0_0.jackson.model.channel.message.MessageTraitsDeserializer;
import com.asyncapi.v2._0_0.model.ExternalDocumentation;
import com.asyncapi.v2._0_0.model.Reference;
import com.asyncapi.v2.Reference;
import com.asyncapi.v2._0_0.model.Tag;
import com.asyncapi.v2.schema.Schema;
import com.asyncapi.v2.binding.message.MessageBinding;
Expand Down Expand Up @@ -40,7 +40,7 @@ public class Message extends ExtendableObject {
/**
* Schema definition of the application headers. Schema MUST be of type "object".
* It MUST NOT define the protocol headers.
*
* <p>
* MUST BE:
* <ul>
* <li>{@link Schema}</li>
Expand All @@ -53,7 +53,7 @@ public class Message extends ExtendableObject {

/**
* Definition of the message payload. It can be of any type but defaults to Schema object.
*
* <p>
* WILL BE:
* <ul>
* <li>{@link Schema}</li>
Expand All @@ -66,7 +66,7 @@ public class Message extends ExtendableObject {

/**
* Definition of the correlation ID used for message tracing or matching.
*
* <p>
* MUST BE:
* <ul>
* {@link CorrelationId}
Expand All @@ -82,7 +82,7 @@ public class Message extends ExtendableObject {
* A string containing the name of the schema format used to define the message payload. If omitted,
* implementations should parse the payload as a Schema object. Check out the supported schema formats
* table for more information. Custom values are allowed but their implementation is OPTIONAL.
*
* <p>
* A custom value MUST NOT refer to one of the schema formats listed in the table.
*/
@Nullable
Expand Down Expand Up @@ -161,7 +161,7 @@ public class Message extends ExtendableObject {
/**
* A list of traits to apply to the message object. Traits MUST be merged into the message object using the JSON
* Merge Patch algorithm in the same order they are defined here. The resulting object MUST be a valid Message
*
* <p>
* MUST BE:
* <ul>
* <li>{@link Reference}</li>
Expand Down
Loading

0 comments on commit de12b3b

Please sign in to comment.