From 8bb9a44889977304ce2d7f7a1da621040b7daf7a Mon Sep 17 00:00:00 2001 From: Michael Edgar Date: Wed, 17 Jan 2024 07:29:53 -0500 Subject: [PATCH] Deprecate `spi` module and contents Signed-off-by: Michael Edgar --- 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, 22 insertions(+), 10 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/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..8ab4eeaad 100644
--- a/spi/pom.xml
+++ b/spi/pom.xml
@@ -25,7 +25,13 @@
 
     microprofile-openapi-spi
     MicroProfile OpenAPI SPI
-    MicroProfile OpenAPI SPI :: 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.
+    
 
     
         
@@ -37,6 +43,4 @@
             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 bef662e52..c67414f3d 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,7 +31,11 @@
  * 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 01cc8df45..2560ea61e 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,7 +13,11 @@
 
 /**
  * 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; \ No newline at end of file +package org.eclipse.microprofile.openapi.spi;