diff --git a/asyncapi-core/src/main/java/com/asyncapi/v2/_6_0/model/AsyncAPI.java b/asyncapi-core/src/main/java/com/asyncapi/v2/_6_0/model/AsyncAPI.java index 2aa12586..86157fa8 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/v2/_6_0/model/AsyncAPI.java +++ b/asyncapi-core/src/main/java/com/asyncapi/v2/_6_0/model/AsyncAPI.java @@ -4,7 +4,7 @@ import com.asyncapi.v2.model.Tag; import com.asyncapi.v2.model.channel.ChannelItem; import com.asyncapi.v2.model.component.Components; -import com.asyncapi.v2.model.info.Info; +import com.asyncapi.v2._6_0.model.info.Info; import com.asyncapi.v2.model.server.Server; import lombok.*; diff --git a/asyncapi-core/src/main/java/com/asyncapi/v2/_6_0/model/info/Contact.java b/asyncapi-core/src/main/java/com/asyncapi/v2/_6_0/model/info/Contact.java new file mode 100644 index 00000000..b795fdf4 --- /dev/null +++ b/asyncapi-core/src/main/java/com/asyncapi/v2/_6_0/model/info/Contact.java @@ -0,0 +1,41 @@ +package com.asyncapi.v2._6_0.model.info; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import javax.annotation.CheckForNull; + +/** + * Contact information for the exposed API. + * + * @version 2.6.0 + * @see Contact + * @author Pavel Bodiachevskii + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class Contact { + + /** + * The identifying name of the contact person/organization. + */ + @CheckForNull + private String name; + + /** + * The URL pointing to the contact information. MUST be in the format of a URL. + */ + @CheckForNull + private String url; + + /** + * The email address of the contact person/organization. MUST be in the format of an email address. + */ + @CheckForNull + private String email; + +} diff --git a/asyncapi-core/src/main/java/com/asyncapi/v2/_6_0/model/info/Info.java b/asyncapi-core/src/main/java/com/asyncapi/v2/_6_0/model/info/Info.java new file mode 100644 index 00000000..b8a4d1af --- /dev/null +++ b/asyncapi-core/src/main/java/com/asyncapi/v2/_6_0/model/info/Info.java @@ -0,0 +1,63 @@ +package com.asyncapi.v2._6_0.model.info; + +import lombok.*; + +import javax.annotation.CheckForNull; +import javax.annotation.Nonnull; + +/** + * The object provides metadata about the API. The metadata can be used by the clients if needed. + * + * @version 2.6.0 + * @see Info + * @author Pavel Bodiachevskii + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class Info { + + /** + * Required. + *

+ * The title of the application. + */ + @Nonnull + @NonNull + private String title; + + /** + * Required. + *

+ * Provides the version of the application API (not to be confused with the specification version). + */ + @Nonnull + @NonNull + private String version; + + /** + * A short description of the application. CommonMark syntax can be used for rich text representation. + */ + @CheckForNull + private String description; + + /** + * A URL to the Terms of Service for the API. MUST be in the format of a URL. + */ + @CheckForNull + private String termsOfService; + + /** + * The contact information for the exposed API. + */ + @CheckForNull + private Contact contact; + + /** + * The license information for the exposed API. + */ + @CheckForNull + private License license; + +} diff --git a/asyncapi-core/src/main/java/com/asyncapi/v2/_6_0/model/info/License.java b/asyncapi-core/src/main/java/com/asyncapi/v2/_6_0/model/info/License.java new file mode 100644 index 00000000..5ed936a5 --- /dev/null +++ b/asyncapi-core/src/main/java/com/asyncapi/v2/_6_0/model/info/License.java @@ -0,0 +1,34 @@ +package com.asyncapi.v2._6_0.model.info; + +import lombok.*; + +import javax.annotation.CheckForNull; +import javax.annotation.Nonnull; + +/** + * License information for the exposed API. + * + * @version 2.6.0 + * @see License + * @author Pavel Bodiachevskii + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class License { + + /** + * Required. The license name used for the API. + */ + @Nonnull + @NonNull + private String name; + + /** + * A URL to the license used for the API. MUST be in the format of a URL. + */ + @CheckForNull + private String url; + +}