Skip to content

Commit

Permalink
Merge pull request #596 from MikeEdgar/spi-module
Browse files Browse the repository at this point in the history
Revert SPI module deprecation, declare use of OASFactoryResolver in module-info
  • Loading branch information
Azquelt authored Jan 24, 2024
2 parents db59529 + 8545f2f commit cb664fe
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 17 deletions.
3 changes: 3 additions & 0 deletions api/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;

Expand Down
10 changes: 3 additions & 7 deletions spi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,7 @@

<artifactId>microprofile-openapi-spi</artifactId>
<name>MicroProfile OpenAPI SPI</name>
<description>
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.
</description>
<description>MicroProfile OpenAPI :: SPI</description>

<dependencies>
<dependency>
Expand All @@ -43,4 +37,6 @@
<artifactId>microprofile-openapi-api</artifactId>
</dependency>
</dependencies>


</project>
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@

/**
* Service provider interface which allows vendors to set their implementations of OASFactoryResolver.
* <p>
* 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;

0 comments on commit cb664fe

Please sign in to comment.