From c9a166100761ceda9dcaee258cd0a14d0a39b41b Mon Sep 17 00:00:00 2001 From: Michael Edgar Date: Fri, 19 Jan 2024 17:57:51 -0500 Subject: [PATCH 1/2] Revert "Deprecate `spi` module and contents" This reverts commit 8bb9a44889977304ce2d7f7a1da621040b7daf7a. --- api/pom.xml | 2 +- .../openapi/annotations/responses/APIResponse.java | 8 ++++---- spi/pom.xml | 10 +++------- .../microprofile/openapi/spi/OASFactoryResolver.java | 4 ---- .../eclipse/microprofile/openapi/spi/package-info.java | 8 ++------ 5 files changed, 10 insertions(+), 22 deletions(-) diff --git a/api/pom.xml b/api/pom.xml index 466875d4f..bf7ed9351 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -25,7 +25,7 @@ microprofile-openapi-api MicroProfile OpenAPI API - MicroProfile OpenAPI :: API + MicroProfile OpenAPI API :: API diff --git a/api/src/main/java/org/eclipse/microprofile/openapi/annotations/responses/APIResponse.java b/api/src/main/java/org/eclipse/microprofile/openapi/annotations/responses/APIResponse.java index 6f6660362..bd65ccfd8 100644 --- a/api/src/main/java/org/eclipse/microprofile/openapi/annotations/responses/APIResponse.java +++ b/api/src/main/java/org/eclipse/microprofile/openapi/annotations/responses/APIResponse.java @@ -46,14 +46,14 @@ * } * *

- * When this annotation is applied to a Jakarta REST resource class, the response is added to the responses defined in - * all OpenAPI operations which correspond to a method on that class. If an operation already has a response with the + * When this annotation is applied to a Jakarta REST resource class, the response is added to the responses defined in all + * OpenAPI operations which correspond to a method on that class. If an operation already has a response with the * specified responseCode the response is not added to that operation. * *

* When this annotation is applied to an ExceptionMapper class or toResponse method, it allows - * developers to describe the API response that will be added to a generated OpenAPI operation based on a Jakarta REST - * method that declares an Exception of the type handled by the ExceptionMapper. + * developers to describe the API response that will be added to a generated OpenAPI operation based on a Jakarta REST method + * that declares an Exception of the type handled by the ExceptionMapper. * *

  * @Provider
diff --git a/spi/pom.xml b/spi/pom.xml
index 8ab4eeaad..c9e7e8657 100644
--- a/spi/pom.xml
+++ b/spi/pom.xml
@@ -25,13 +25,7 @@
 
     microprofile-openapi-spi
     MicroProfile OpenAPI SPI
-    
-        MicroProfile OpenAPI :: SPI
-
-        This module is deprecated and will be removed in a future release of MicroProfile
-        OpenAPI. The functionality offered by this module is available in the microprofile-openapi-api
-        module which should be used instead.
-    
+    MicroProfile OpenAPI SPI :: SPI
 
     
         
@@ -43,4 +37,6 @@
             microprofile-openapi-api
         
     
+
+    
 
diff --git a/spi/src/main/java/org/eclipse/microprofile/openapi/spi/OASFactoryResolver.java b/spi/src/main/java/org/eclipse/microprofile/openapi/spi/OASFactoryResolver.java
index c67414f3d..bef662e52 100644
--- a/spi/src/main/java/org/eclipse/microprofile/openapi/spi/OASFactoryResolver.java
+++ b/spi/src/main/java/org/eclipse/microprofile/openapi/spi/OASFactoryResolver.java
@@ -31,11 +31,7 @@
  * Service provider for OASFactoryResolver. The implementation registers itself via the {@link java.util.ServiceLoader}
  * mechanism or by manually setting their implementation using the setInstance method.
  *
- * @deprecated the OASFactoryResolver available in module
- *             {@code org.eclipse.microprofile.openapi:microprofile-openapi-api} should be used instead of this version
- *             which will be removed in a future major release.
  */
-@Deprecated(forRemoval = true)
 public abstract class OASFactoryResolver {
 
     private static volatile OASFactoryResolver instance = null;
diff --git a/spi/src/main/java/org/eclipse/microprofile/openapi/spi/package-info.java b/spi/src/main/java/org/eclipse/microprofile/openapi/spi/package-info.java
index 2560ea61e..01cc8df45 100644
--- a/spi/src/main/java/org/eclipse/microprofile/openapi/spi/package-info.java
+++ b/spi/src/main/java/org/eclipse/microprofile/openapi/spi/package-info.java
@@ -13,11 +13,7 @@
 
 /**
  * Service provider interface which allows vendors to set their implementations of OASFactoryResolver.
- * 

- * The {@code org.eclipse.microprofile.openapi.spi} package available in module - * {@code org.eclipse.microprofile.openapi:microprofile-openapi-api} should be used instead of this version which will - * be removed in a future major release. */ -@Deprecated(forRemoval = true) + @org.osgi.annotation.versioning.Version("1.0") -package org.eclipse.microprofile.openapi.spi; +package org.eclipse.microprofile.openapi.spi; \ No newline at end of file From 8545f2fd507b28aee2b74074d9329359f58a351c Mon Sep 17 00:00:00 2001 From: Michael Edgar Date: Tue, 23 Jan 2024 14:48:02 -0500 Subject: [PATCH 2/2] Declare use of OASFactoryResolver in module-info Signed-off-by: Michael Edgar --- api/pom.xml | 2 +- api/src/main/java/module-info.java | 3 +++ .../openapi/annotations/responses/APIResponse.java | 8 ++++---- spi/pom.xml | 4 ++-- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/api/pom.xml b/api/pom.xml index bf7ed9351..466875d4f 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -25,7 +25,7 @@ microprofile-openapi-api MicroProfile OpenAPI API - MicroProfile OpenAPI API :: API + MicroProfile OpenAPI :: API diff --git a/api/src/main/java/module-info.java b/api/src/main/java/module-info.java index e107c72ca..cf6617b97 100644 --- a/api/src/main/java/module-info.java +++ b/api/src/main/java/module-info.java @@ -17,6 +17,7 @@ * A set of Java interfaces, annotations, and programming models which allow Java developers to natively produce OpenAPI * documents from Jakarta RESTful Web Services applications. */ +@SuppressWarnings("module") // silence warning about unstable name `osgi.annotation` module org.eclipse.microprofile.openapi { exports org.eclipse.microprofile.openapi; @@ -47,6 +48,8 @@ exports org.eclipse.microprofile.openapi.models.tags; exports org.eclipse.microprofile.openapi.spi; + uses org.eclipse.microprofile.openapi.spi.OASFactoryResolver; + // Required for compilation, not used at runtime requires static osgi.annotation; diff --git a/api/src/main/java/org/eclipse/microprofile/openapi/annotations/responses/APIResponse.java b/api/src/main/java/org/eclipse/microprofile/openapi/annotations/responses/APIResponse.java index bd65ccfd8..6f6660362 100644 --- a/api/src/main/java/org/eclipse/microprofile/openapi/annotations/responses/APIResponse.java +++ b/api/src/main/java/org/eclipse/microprofile/openapi/annotations/responses/APIResponse.java @@ -46,14 +46,14 @@ * } *

*

- * When this annotation is applied to a Jakarta REST resource class, the response is added to the responses defined in all - * OpenAPI operations which correspond to a method on that class. If an operation already has a response with the + * When this annotation is applied to a Jakarta REST resource class, the response is added to the responses defined in + * all OpenAPI operations which correspond to a method on that class. If an operation already has a response with the * specified responseCode the response is not added to that operation. * *

* When this annotation is applied to an ExceptionMapper class or toResponse method, it allows - * developers to describe the API response that will be added to a generated OpenAPI operation based on a Jakarta REST method - * that declares an Exception of the type handled by the ExceptionMapper. + * developers to describe the API response that will be added to a generated OpenAPI operation based on a Jakarta REST + * method that declares an Exception of the type handled by the ExceptionMapper. * *

  * @Provider
diff --git a/spi/pom.xml b/spi/pom.xml
index c9e7e8657..3d7f7a158 100644
--- a/spi/pom.xml
+++ b/spi/pom.xml
@@ -25,7 +25,7 @@
 
     microprofile-openapi-spi
     MicroProfile OpenAPI SPI
-    MicroProfile OpenAPI SPI :: SPI
+    MicroProfile OpenAPI :: SPI
 
     
         
@@ -38,5 +38,5 @@
         
     
 
-    
+