MicroProfile 7.1 and updates to its component specifications in 25.0.0.7-beta
This beta release introduces support for MicroProfile 7.1, which updates two component specifications: MicroProfile Telemetry and MicroProfile OpenAPI.
The Open Liberty 25.0.0.7-beta includes the following beta features (along with all GA features):
See also previous Open Liberty beta blog posts.
MicroProfile 7.1
MicroProfile 7.1 (MP 7.1
) is a minor release, which has the following MicroProfile component specifications and works with Jakarta EE 10 Core Profile:
In this release, MicroProfile Telemetry 2.1 and MicroProfile OpenAPI 4.1 have updates while the other five specifications remain unchanged.
To enable MicroProfile 7.1, add the following feature to your server.xml
:
<featureManager>
<feature>microProfile-7.1</feature>
</featureManager>
MicroProfile Telemetry 2.1
MicroProfile Telemetry 2.1(mpTelemetry-2.1
) provides developers with updated Open Telemetry technology. The feature now uses OpenTelemetry v1.48.0, which was updated from v1.39.0. The previously exposed experimental APIs are now stable.
<featureManager>
<feature>mpTelemetry-2.1</feature>
</featureManager>
To use the OpenTelemetry API, it is no longer required to add the apiTypeVisibility="+third-party"
attribute to the classloader
element of the server.xml. This also means that it is now possible to deploy an application that uses the OpenTelemetry API by dropping it into the dropins directory.
For more information about MicroProfile Telemetry, see the following links:
MicroProfile OpenAPI 4.1
OpenAPI is a standardized way of documenting REST APIs in a JSON or YAML format. MicroProfile OpenAPI helps to generate and serve OpenAPI documentation for REST applications that are built by using JAX-RS or Jakarta restfulWS. This can be useful for developers to test out the API during development, or for people who use API in production.
To use the new MicroProfile OpenAPI 4.1 feature, first add the feature to your server.xml
:
<featureManager>
<feature>mpOpenAPI-4.1</feature>
</featureManager>
Next, deploy any REST application. Then, in a web browser, go to /openapi
on the Liberty server to view the YAML OpenAPI document, or go to /openapi/ui
for a user interface to browse through the documentation. To enhance the documentation, use annotations in code to add things like textual descriptions to each method. The annotations are available as a maven dependency:
<dependency>
<groupId>org.eclipse.microprofile.openapi</groupId>
<artifactId>microprofile-openapi-api</artifactId>
<version>4.1</version>
<scope>provided</scope>
</dependency>
MicroProfile OpenAPI 4.1 is a small release which adds:
-
The ability to set the
jsonSchemaDialect
field on the OpenAPI object using the model API -
New methods
hasExtension
andgetExtension
onExtensible
in the model API
More information about MicroProfile OpenAPI can be found in
-
the Open Liberty guide
-
the Open Liberty documentation
-
the javadoc
-
the specification
Try it now
To try out these features, update your build tools to pull the Open Liberty All Beta Features package instead of the main release. The beta works with Java SE 21, Java SE 17, Java SE 11, and Java SE 8.
If you’re using Maven, you can install the All Beta Features package using:
<plugin>
<groupId>io.openliberty.tools</groupId>
<artifactId>liberty-maven-plugin</artifactId>
<version>3.11.4</version>
<configuration>
<runtimeArtifact>
<groupId>io.openliberty.beta</groupId>
<artifactId>openliberty-runtime</artifactId>
<version>25.0.0.7-beta</version>
<type>zip</type>
</runtimeArtifact>
</configuration>
</plugin>
You must also add dependencies to your pom.xml file for the beta version of the APIs that are associated with the beta features that you want to try. For example, the following block adds dependencies for two example beta APIs:
<dependency>
<groupId>org.example.spec</groupId>
<artifactId>exampleApi</artifactId>
<version>7.0</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>example.platform</groupId>
<artifactId>example.example-api</artifactId>
<version>11.0.0</version>
<scope>provided</scope>
</dependency>
Or for Gradle:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'io.openliberty.tools:liberty-gradle-plugin:3.9.4'
}
}
apply plugin: 'liberty'
dependencies {
libertyRuntime group: 'io.openliberty.beta', name: 'openliberty-runtime', version: '[25.0.0.7-beta,)'
}
Or if you’re using container images:
FROM icr.io/appcafe/open-liberty:beta
Or take a look at our Downloads page.
If you’re using IntelliJ IDEA, Visual Studio Code or Eclipse IDE, you can also take advantage of our open source Liberty developer tools to enable effective development, testing, debugging and application management all from within your IDE.
For more information on using a beta release, refer to the Installing Open Liberty beta releases documentation.
We welcome your feedback
Let us know what you think on our mailing list. If you hit a problem, post a question on StackOverflow. If you hit a bug, please raise an issue.