From 90673aaaeee1438143074eed057e82b4e6ac2049 Mon Sep 17 00:00:00 2001 From: Pavel Bodiachevskii Date: Sat, 20 Apr 2024 15:59:32 +0400 Subject: [PATCH] fix: JavaDoc --- .../asyncapi/v3/schema/AsyncAPISchema.java | 17 ++-- .../com/asyncapi/v3/schema/JsonSchema.java | 6 +- .../schema/avro/v1/_9_0/AvroSchemaUnion.java | 8 +- .../schema/openapi/v3/_0_0/OpenAPISchema.java | 94 +++++++++---------- .../openapi/v3/_0_0/properties/XML.java | 2 +- 5 files changed, 60 insertions(+), 67 deletions(-) diff --git a/asyncapi-core/src/main/java/com/asyncapi/v3/schema/AsyncAPISchema.java b/asyncapi-core/src/main/java/com/asyncapi/v3/schema/AsyncAPISchema.java index 2ef8c200..888b5994 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/v3/schema/AsyncAPISchema.java +++ b/asyncapi-core/src/main/java/com/asyncapi/v3/schema/AsyncAPISchema.java @@ -26,8 +26,8 @@ *

* The empty schema (which allows any instance to validate) MAY be represented by the boolean value true * and a schema which allows no instance to validate MAY be represented by the boolean value false. - *

- *

+ *
+ *
* Further information about the properties can be found in JSON Schema Core and JSON Schema Validation. *

* Unless stated otherwise, the property definitions follow the JSON Schema specification as referenced here. @@ -37,7 +37,7 @@ * @author Pavel Bodiachevskii * @version 3.0.0 * @see Schema Object - * @see Multi Format Schema Object + * @see Multi Format Schema Object */ @Data @Builder @@ -449,10 +449,7 @@ Validation Keywords for Numeric Instances (number and integer) public Map patternProperties; /** - * This property has been overwritten by AsyncAPI Specification - maybe boolean value - *

- *

- * The value of "additionalProperties" MUST be a valid JSON Schema. + * The value of "additionalProperties" MUST be a valid JSON Schema or boolean *

* This keyword determines how child instances validate for objects, and does not directly validate the immediate * instance itself. @@ -477,9 +474,9 @@ Validation Keywords for Numeric Instances (number and integer) * draft, we proposed dropping the keyword altogether, or dropping one of its forms, but we received feedback in support of * keeping it. See issues #442 and #528 at https://github.com/json-schema-org/json-schema-spec/issues for further discussion. * Further feedback is encouraged. - *

- *

- *

+ *
+ *
+ *
* This keyword specifies rules that are evaluated if the instance is an object and contains a certain property. *

* This keyword's value MUST be an object. Each property specifies a dependency. Each dependency value MUST be an array diff --git a/asyncapi-core/src/main/java/com/asyncapi/v3/schema/JsonSchema.java b/asyncapi-core/src/main/java/com/asyncapi/v3/schema/JsonSchema.java index 4feb3dbe..71eba2b0 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/v3/schema/JsonSchema.java +++ b/asyncapi-core/src/main/java/com/asyncapi/v3/schema/JsonSchema.java @@ -457,9 +457,9 @@ Validation Keywords for Numeric Instances (number and integer) * draft, we proposed dropping the keyword altogether, or dropping one of its forms, but we received feedback in support of * keeping it. See issues #442 and #528 at https://github.com/json-schema-org/json-schema-spec/issues for further discussion. * Further feedback is encouraged. - *

- *

- *

+ *
+ *
+ *
* This keyword specifies rules that are evaluated if the instance is an object and contains a certain property. *

* This keyword's value MUST be an object. Each property specifies a dependency. Each dependency value MUST be an array diff --git a/asyncapi-core/src/main/java/com/asyncapi/v3/schema/avro/v1/_9_0/AvroSchemaUnion.java b/asyncapi-core/src/main/java/com/asyncapi/v3/schema/avro/v1/_9_0/AvroSchemaUnion.java index f21e6ec5..671a4645 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/v3/schema/avro/v1/_9_0/AvroSchemaUnion.java +++ b/asyncapi-core/src/main/java/com/asyncapi/v3/schema/avro/v1/_9_0/AvroSchemaUnion.java @@ -13,15 +13,15 @@ * Unions, as mentioned above, are represented using JSON arrays. *

* For example, ["null", "string"] declares a schema which may be either a null or string. - *

- *

+ *
+ *
* Note that when a default value is specified for a record field whose type is a union, * the type of the default value must match the first element of the union. *

* Thus, for unions containing "null", the "null" is usually listed first, * since the default value of such unions is typically null. - *

- *

+ *
+ *
* Unions may not contain more than one schema with the same type, except for the named types record, fixed and enum. *

* For example, unions containing two array types or two map types are not permitted, but two types with different names are permitted. diff --git a/asyncapi-core/src/main/java/com/asyncapi/v3/schema/openapi/v3/_0_0/OpenAPISchema.java b/asyncapi-core/src/main/java/com/asyncapi/v3/schema/openapi/v3/_0_0/OpenAPISchema.java index 4620d686..97f365d3 100644 --- a/asyncapi-core/src/main/java/com/asyncapi/v3/schema/openapi/v3/_0_0/OpenAPISchema.java +++ b/asyncapi-core/src/main/java/com/asyncapi/v3/schema/openapi/v3/_0_0/OpenAPISchema.java @@ -109,30 +109,28 @@ public class OpenAPISchema extends Extensions { /** * The word “exclusive” in {@link #exclusiveMinimum} and {@link #exclusiveMaximum} means the corresponding boundary is excluded: - *

-     *     
-     *         
-     *             
-     *             
-     *         
-     *         
-     *             
-     *         
-     *             
-     *         
-     *             
-     *         
-     *             
-     *     
KeywordDescription
exclusiveMinimum: false or not included - * value ≥ minimum - *
exclusiveMinimum: true - * value > minimum - *
exclusiveMaximum: false or not included - * value ≤ maximum - *
exclusiveMaximum: true - * value < maximum - *
- *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
KeywordDescription
exclusiveMinimum: false or not includedvalue ≥ minimum
exclusiveMinimum: truevalue > minimum
exclusiveMaximum: false or not includedvalue ≤ maximum
exclusiveMaximum: truevalue < maximum
* * @see range */ @@ -168,30 +166,28 @@ public class OpenAPISchema extends Extensions { /** * The word “exclusive” in {@link #exclusiveMinimum} and {@link #exclusiveMaximum} means the corresponding boundary is excluded: - *
-     *     
-     *         
-     *             
-     *             
-     *         
-     *         
-     *             
-     *         
-     *             
-     *         
-     *             
-     *         
-     *             
-     *     
KeywordDescription
exclusiveMinimum: false or not included - * value ≥ minimum - *
exclusiveMinimum: true - * value > minimum - *
exclusiveMaximum: false or not included - * value ≤ maximum - *
exclusiveMaximum: true - * value < maximum - *
- *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
KeywordDescription
exclusiveMinimum: false or not includedvalue ≥ minimum
exclusiveMinimum: truevalue > minimum
exclusiveMaximum: false or not includedvalue ≤ maximum
exclusiveMaximum: truevalue < maximum
* * @see range */ @@ -839,7 +835,7 @@ public class OpenAPISchema extends Extensions { * } * * — is represented in the following way in JSON and XML: - *
+ *
* JSON *
{@code
      * {
diff --git a/asyncapi-core/src/main/java/com/asyncapi/v3/schema/openapi/v3/_0_0/properties/XML.java b/asyncapi-core/src/main/java/com/asyncapi/v3/schema/openapi/v3/_0_0/properties/XML.java
index 539b26d0..7739011f 100644
--- a/asyncapi-core/src/main/java/com/asyncapi/v3/schema/openapi/v3/_0_0/properties/XML.java
+++ b/asyncapi-core/src/main/java/com/asyncapi/v3/schema/openapi/v3/_0_0/properties/XML.java
@@ -46,7 +46,7 @@ public class XML extends Extensions {
     public String namespace;
 
     /**
-     * The prefix to be used for the {@link #getName()}.
+     * The prefix to be used for the {@link #name}.
      *
      * @see XML Fixed Fields: prefix
      */