OpenLiberty / docs

See Open Liberty documentation on https://openliberty.io/docs/
https://openliberty.io/docs/
Other
13 stars 47 forks source link

MicroProfile 7.0 ID #7610

Open Emily-Jiang opened 2 weeks ago

Emily-Jiang commented 2 weeks ago

MicroProfile 7.0 is a major release with the current updated MicroProfile specifications:

  1. MicroProfile Telemetry 2.0
  2. MicroProfile Rest Client 4.0
  3. MicroProfile OpenAPI 3.0
  4. MicroProfile Fault Tolerance 4.1

This release has the following significant changes:

  1. removing MicroProfile Metrics 5.1 from the MicroProfile umbrella release and make it standalone.
  2. MicroProfile Telemetry 2.0 has a major release to include Logs, Metrics apart from Tracing.
  3. MicroProfile Rest Client 4.0 consumed Jakarta Restful Web Services 3.1 to support multiparts.
  4. MicroProfile OpenAPI 3.0 aligned with OpenAPI 3.1 standards.
  5. MicroProfile 7.0 works with Jakarta EE 10 as a minimum.
jim-krueger commented 1 week ago

When the MicroProfile API document is updated with a "Differences between MicroProfile 7.0 and 6.1" section, please add a "Differences between MicroProfile REST Client 4.0 and 3.0" section with the following information:

With the release of the MicroProfile REST Client 4.0 feature (mpRestClient-4.0), 
the underlying MicroProfile REST Client implementation for Open Liberty is now 
compatible with Jakartaee 10 and tolerates Jakartaee 11. 

If you update your server from a version of the 
[MicroProfile REST Client](https://openliberty.io/docs/latest/reference/feature/mpRestClient.html) 
feature prior to version 3.0, changes in API behavior might require you to update 
your application code. See 
[Differences between MicroProfile REST Client 3.0 and 2.0](https://openliberty.io/docs/latest/reference/diff/mp-41-50-diff.html#rc) 
for details.

The following sections detail changes in behavior between the mpRestClient-3.0 and 
mpRestClient-4.0 features.

Client creation without URI

Users no longer need to crate a URI themselves to create a Client instance, instead they can pass a String.

RestClientBuilder.newBuilder()
                             .baseUri("http://example.com")
                             .build(SomeClient.class)

Set HTTP Headers on a per instance basis

Users are now able set HTTP Headers on a per Client instance via the new RestClientBuilder.header(String,Object) method.

RestClientBuilder.newBuilder()
                             .baseUri(someURI or String)
                             .header("Some-Header", headerValueObj)
                             .build(SomeClient.class)