Coming soon in Payara Platform Community 5.2020.3 Release: OpenAPI Refactor

Payara

 

The Payara Platform 5.2020.3 release (coming soon!) introduces major refactoring and architectural changes to the underlying implementation of MicroProfile OpenAPI 1.1.2.

The goal of the OpenAPI specification is to provide a standard format for documenting REST API services which is extremely useful, as it follows a standard and it can be used in a range of tools such as those provided by the Swagger suite. These let you do all sorts of things such as design, edit, and test a REST API documented by an OpenAPI document.

While MicroProfile OpenAPI has been covered in the previous blogs, some important changes will be introduced in this coming release that we will be covering here.

Multi Document Definition Support

An OpenAPI document looks similar to the following for a deployed application:

openapi: 3.0.0

info:

  title: Deployed Resources

  version: 1.0.0

servers:

– url: http://jGauravGupta:8080/school-app

  description: Default Server.

– url: https://jGauravGupta:8181/school-app

  description: Default Server.

paths:

  /resources/student:

    get:

      operationId: info

      responses:

        default:

          content:

            ‘*/*’:

              schema:

                type: object

          description: Get the student information

components: {}

Since 5.2020.3 Payara Platform will support merging of the multiple documents fetched from the deployment of multiple applications to the Payara Server.

The following OpenAPI document is merged document definition of two deployed application named school-app & office-app with the respective REST endpoint /resources/student & /resources/employee:

openapi: 3.0.0

info:

  title: Deployed Resources

  version: 1.0.0

Servers:

– url: http://jGauravGupta:8080/school-app

  description: Default Server.

– url: https://jGauravGupta:8181/school-app

  description: Default Server.

– url: http://jGauravGupta:8080/office-app

  description: Default Server.

– url: https://jGauravGupta:8181/office-app

  description: Default Server.

paths:

  /resources/student:

    get:

      operationId: info

      responses:

        default:

          content:

            ‘*/*’:

              schema:

                type: object

          description: Get the student information

  /resources/employee:

    get:

      operationId: info

      responses:

        default:

          content:

            ‘*/*’:

              schema:

                type: object

          description: Get the employee information
components: {}

 

As you may notice, servers and paths property contain the value of the OpenAPI document of both the applications.

Document Processing Improvements

The MicroProfile OpenAPI implementation of the Payara Platform is rewritten using the HK2 Class Model and ASM API that simplifies the implementation, leads to performance improvement of the OpenAPI annotation processor and produces faster results.

OpenAPI Scanner for Packaged Archive

The OpenAPI can also be configured through the MicroProfile Config API. By default, the scanner is disabled for packaged archives. By enabling the MP Config property “mp.openapi.scan.lib”, OpenAPI implementation includes and scan the packaged jar files inside the WAR file (WEB-INFlib) for OpenAPI metadata processing.

 

Watch this space for the new Payara Platform Community Edition release coming soon!  Don’t miss the announcement and subscribe to the Blog via a simple form at the top of this page.

 

Comments (0)

Post a comment

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

Payara needs the contact information you provide to us to contact you about our products and services. You may unsubscribe from these communications at any time. For information on how to unsubscribe, as well as our privacy practices and commitment to protecting your privacy, please review our Legal & Privacy Policy.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Related Posts

Azul Java App Stack 4 minutes
News

Azul Acquires Payara, Strengthening Leadership in Enterprise Java Solutions

Strategic acquisition bolsters Azul’s Java platform with complementary products, deep Java expertise and accelerated go-to-market capabilities SUNNYVALE, Calif., and MALVERN, […]

End of Life and End of Support Software 3 minutes
Migration

End-of-Life Technology: How to Drive Innovation Without Compromising Stability

When legacy systems approach end-of-life (EOL), enterprise IT teams typically face the choice of moving forward at all costs […]

Payara promotional graphic for Jakarta Data, featuring and illustrated server stack labeled Core, Web, Full Platform. 3 minutes
Community

Jakarta Data Makes Persistence a Breeze 

Working with enterprise Java databases can sometimes feel like swimming upstream. Jakarta EE 11’s Jakarta Data helps developers glide […]