From 27c463cc44873d59693584d0486b67b7130898f5 Mon Sep 17 00:00:00 2001 From: Andrew Rouse Date: Tue, 19 Apr 2022 17:20:56 +0100 Subject: [PATCH] Auto-reformat changes from #525 I forgot to allow the auto-formatter to run before submitting that PR --- .../annotations/OpenAPIDefinition.java | 4 ++-- .../security/SecurityRequirements.java | 4 ++-- .../security/SecurityRequirementsSet.java | 23 +++++++++++-------- .../security/SecurityRequirementsSets.java | 21 ++++++++++------- 4 files changed, 30 insertions(+), 22 deletions(-) diff --git a/api/src/main/java/org/eclipse/microprofile/openapi/annotations/OpenAPIDefinition.java b/api/src/main/java/org/eclipse/microprofile/openapi/annotations/OpenAPIDefinition.java index 3a56ebd10..166f3eebb 100644 --- a/api/src/main/java/org/eclipse/microprofile/openapi/annotations/OpenAPIDefinition.java +++ b/api/src/main/java/org/eclipse/microprofile/openapi/annotations/OpenAPIDefinition.java @@ -69,8 +69,8 @@ /** * A declaration of which security mechanisms can be used across the API. *

- * Adding a {@code SecurityRequirement} to this array is equivalent to adding a {@code SecurityRequirementsSet} containing - * a single {@code SecurityRequirement} to {@link #securitySets()}. + * Adding a {@code SecurityRequirement} to this array is equivalent to adding a {@code SecurityRequirementsSet} + * containing a single {@code SecurityRequirement} to {@link #securitySets()}. * * @return the array of security requirements for this API */ diff --git a/api/src/main/java/org/eclipse/microprofile/openapi/annotations/security/SecurityRequirements.java b/api/src/main/java/org/eclipse/microprofile/openapi/annotations/security/SecurityRequirements.java index c69a59e17..7985f3cbb 100644 --- a/api/src/main/java/org/eclipse/microprofile/openapi/annotations/security/SecurityRequirements.java +++ b/api/src/main/java/org/eclipse/microprofile/openapi/annotations/security/SecurityRequirements.java @@ -25,8 +25,8 @@ /** * Container annotation for repeated {@link SecurityRequirement} annotations. *

- * Note that each {@code SecurityRequirement} annotation is equivalent to a {@link SecurityRequirementsSet} annotation containing only that - * annotation. + * Note that each {@code SecurityRequirement} annotation is equivalent to a {@link SecurityRequirementsSet} + * annotation containing only that annotation. * *

  * Example: 
diff --git a/api/src/main/java/org/eclipse/microprofile/openapi/annotations/security/SecurityRequirementsSet.java b/api/src/main/java/org/eclipse/microprofile/openapi/annotations/security/SecurityRequirementsSet.java
index 4cf5dab1e..af8d20f00 100644
--- a/api/src/main/java/org/eclipse/microprofile/openapi/annotations/security/SecurityRequirementsSet.java
+++ b/api/src/main/java/org/eclipse/microprofile/openapi/annotations/security/SecurityRequirementsSet.java
@@ -26,18 +26,21 @@
 import org.eclipse.microprofile.openapi.annotations.OpenAPIDefinition;
 
 /**
- * This annotation represents a set of security requirements which permit access to an operation if all of them are satisfied.
+ * This annotation represents a set of security requirements which permit access to an operation if all of them are
+ * satisfied.
  * 

- * If this annotation is applied to a method which corresponds to an operation, then the requirements will be added to that operation. + * If this annotation is applied to a method which corresponds to an operation, then the requirements will be added to + * that operation. *

- * If this annotation is applied to a class which contains methods which correspond to operations, then the requirements will be added to all - * operations corresponding to methods within that class which don't specify any other requirements. + * If this annotation is applied to a class which contains methods which correspond to operations, then the requirements + * will be added to all operations corresponding to methods within that class which don't specify any other + * requirements. *

- * Security requirements can be specified for the whole API using {@link OpenAPIDefinition#securitySets()}. Security requirements specified - * for individual operations override those specified for the whole API. + * Security requirements can be specified for the whole API using {@link OpenAPIDefinition#securitySets()}. Security + * requirements specified for individual operations override those specified for the whole API. *

- * If multiple security requirement sets are specified for an operation, then a user must satisfy all of the requirements within any one of the sets - * to access the operation. + * If multiple security requirement sets are specified for an operation, then a user must satisfy all of the + * requirements within any one of the sets to access the operation. *

* An empty security requirement set indicates that authentication is not required. *

@@ -51,8 +54,8 @@ *

* * @see SecurityRequirement - * Object + * "https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#security-requirement-object">SecurityRequirement + * Object **/ @Target({ElementType.METHOD, ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) diff --git a/api/src/main/java/org/eclipse/microprofile/openapi/annotations/security/SecurityRequirementsSets.java b/api/src/main/java/org/eclipse/microprofile/openapi/annotations/security/SecurityRequirementsSets.java index e2ff2b120..2504fe16c 100644 --- a/api/src/main/java/org/eclipse/microprofile/openapi/annotations/security/SecurityRequirementsSets.java +++ b/api/src/main/java/org/eclipse/microprofile/openapi/annotations/security/SecurityRequirementsSets.java @@ -24,18 +24,23 @@ import java.lang.annotation.Target; /** - * Represents an array of security requirement sets that apply to an operation. Only one of requirement sets needs be satisfied to access the - * operation. + * Represents an array of security requirement sets that apply to an operation. Only one of requirement sets needs be + * satisfied to access the operation. *

- * If this annotation is applied to a method which corresponds to an operation, then the requirements will be added to that operation. + * If this annotation is applied to a method which corresponds to an operation, then the requirements will be added to + * that operation. *

- * If this annotation is applied to a class which contains methods which correspond to operations, then the requirements will be added to all - * operations corresponding to methods within that class which don't specify any other requirements. + * If this annotation is applied to a class which contains methods which correspond to operations, then the requirements + * will be added to all operations corresponding to methods within that class which don't specify any other + * requirements. *

- * This annotation may be used with {@code value} set to an empty array. When applied like this to a method or class, it indicates that no security - * requirements apply to the corresponding operations. This can be used to override security requirements which are specified for the whole API. + * This annotation may be used with {@code value} set to an empty array. When applied like this to a method or class, it + * indicates that no security requirements apply to the corresponding operations. This can be used to override security + * requirements which are specified for the whole API. *

- * A {@code SecurityRequirementSets} annotation corresponds to an array of maps of security requirements in an OpenAPI document. + * A {@code SecurityRequirementSets} annotation corresponds to an array of maps of security requirements in an OpenAPI + * document. + * *

  * Example: 
  * security: