Here’s the latest WebSphere Liberty beta and WebSphere Developer Tools (WDT).

Thanks to your support for our regular beta programme, we are able to release new Liberty features every few months. Most recently, in December.

Look out for more betas over the coming months.

Get it now! Give feedback on dWAnswers

What’s in the WebSphere Liberty beta for January?

  • Liberty now supports Cross-Origin Resource Sharing (CORS) The long awaited support for CORS is here! You can now configure all aspects of the CORS spec right into server.xml, for any application deployed on Liberty.
    • Here’s a sample configuration:
      <cors domain="/sampleApp/path"
                 allowedMethods="GET, DELETE, POST"
                 allowedHeaders="Accept, MyRequestHeader1"
                 maxAge="3600" />
  • Updates to REST API Discovery
    • YAML support The Liberty REST API Discovery framework now interchangeably supports both JSON and YAML formats. You can provide either format and query either format; it all merges and renders perfectly! This means you can now:
      • Provide Liberty with your swagger.json OR swagger.yaml document inside <webModule>/META-INF.
      • Use and accept header of application/yaml when querying GET /ibm/api/docs and you’ll be returned the aggregated Swagger 2.0 document in YAML format.
      • Continue to use the /ibm/api/explorer as before, regardless of whether some documents are being provided as JSON and other as YAML.
    • Stub merging
      • You can now provide a swagger.json or swagger.yaml document inside <webModule>/META-INF/stub and Liberty’s REST API Discovery framework will automatically merge those contents with any JAX-RS annotations that we find. This is useful for the scenarios where your web module has regular servlets (non JAX-RS) that you want to document in addition to any JAX-RS endpoints.
      • You can also use this methodology to augment your existing annotations with extra information such as security constraints.
      • The “Swagger REST API documentation file” wizard has been modified to support creation of a swagger.json file on the stub directory:

      • WDT (the Eclipse tools) warns you if your project contains both a top-level and a stub swagger.json file. In such a scenario, the top-level documents takes precedence. The validator ensures that you know this:

      • WDT also warns you if you’re using Swagger annotations but there’s no swagger.json file on the stub directory:


      • When a project with a swagger.json file on the META-INF/stub directory is deployed to the server, the apiDiscovery-1.0 feature is automatically added (previously it was only added if the file was at META-INF directly, now it’s added in both cases).
    • Validation support
      • WDT detects certain scenarios from the Swagger specification to help ensure that you’re developing valid swagger.json files. One such scenario is the detection of missing, required elements. In the following case, the license object requires a name, which is missing:

      • There’s also validation for the Parameter object and these are just a few of the scenarios we validate:
        • Defined path parameter names must show up in the Path Item URI. For example, the pathId1 name must appear as a variable in the Path Item object URI "/putPath/{pathId}":

        • Appropriate fields are used for body parameters i.e. use of ‘type’ in a body parameter will result in an error.
        • Either the use of multiple body parameters or the use of formData and body parameter will result in an error.
    • Performance enhancements to collective view
      • We have improved the load-time performance of the collective-wide UI explorer (/ibm/api/collective/explorer) so now you can browse your collective services much faster!
      • There are also two new query parameters available for /ibm/api/collective/docs related to performance: showDuplicates which enables documentation of duplicate APIs (false by default, for compact docs), and showTagsOnly, which retrieves only the tags of the collective members (false by default).
    • Context root requests If your web module provides either swagger.json or swagger.yaml from its context root, you no longer have to write any configuration inside server.xml for it.
      • During startup of the web module, the REST API Discovery framework will check if <webModule_contextRoot>/swagger.json or <webModule_contextRoot>/swagger.yaml are available and will automatically expose that Swagger 2.0 document. This is useful for applications that have a pre-generated Swagger 2.0 already exposed from its context root as don’t need any extra configuration.
      • Any web module in Liberty that is providing Swagger 2.0 documentation through any means (i.e. annotations, pre-generated, stub merging, etc) can now directly reach the documentation by invoking <webModule_contextRoot>/swagger.json or <webModule_contextRoot>/swagger.yaml.
      • Except in cases where the application has explicitly blocked access to it, the REST API Discovery framework auto-detects this request from the web container and automatically responds with the Swagger 2.0 document.
    • Collective explorer Last beta, we announced the new /ibm/api/collective/docs endpoint. This beta we have its visual counterpart available, /ibm/api/collective/explorer!
      • It is very similar to /ibm/api/explorer, except that this endpoint is only available in the Liberty Collective Controller. It will also show all REST APIs that are available from any of the members of that Liberty Collective.
      • The filter box for the collective UI also has been enhance to allow filtering based on Collective Member ID (a comma-separated tuple of the member’s hostName, URL-encoded wlp/usr path, and serverName).
    • Websocket subscription You can now subscribe to receive real-time updates on the REST APIs of a Liberty server.
      • This means that you can instantly know if a new application has been deployed with new REST endpoints, or if an existing set of endpoints has been dynamically removed. Simply subscribe to the /ibm/api/docs/subscription endpoint and you’ll receive a WebSocket URL which you can open and listen for updates.
      • You can also subscribe for collective-wide notifications, by calling /ibm/api/collective/docs/subscription on the collective controller.
    • Advanced JAX-RS scenarios We updated our JAX-RS 1.1 and 2.0 support to handle multiple URL mappings and different deployment scenarios, such as auto-generated or explicitly defined servlets. Now your annotations will be transformed into Swagger 2.0 documentations even in these advanced scenarios.
    • Proper WAB support The Liberty REST API Discovery framework now properly scans OSGi Web Application Bundles (WABs) for Swagger related content (annotations or pre-generated), just like any other deployed web modules.
  • Security

What’s already in there?

The December 2015 beta included support for Web Services Atomic Transactions, OSGi in Java EE 7 technologies, and updates to REST API discovery.

Take a look at the previous beta announcements for a full list of stuff added since the V8.5.5.6 release in June 2015:

Get it now! Give feedback on dWAnswers

1 comment on"Beta: WebSphere Liberty and tools (January 2016)"

  1. […] next few Beta releases after Liberty v8.5.5.8 packed a lot more good stuff! Let’s go through some of […]

Join The Discussion

Your email address will not be published. Required fields are marked *