HATS Finds A RESTful ‘Swagger’
November 13, 2017 Alex Woodie
IBM i shops will gain access to new API tooling on Thursday, when IBM ships a new release of its Rational Host Access Transformation Services (HATS) software that supports Swagger, a popular open-source specification for designing, generating, documenting, and consuming REST-based APIs.
APIs built using the Representational State Transfer (REST) protocol have become the primary way that companies expose their applications and data in a programmatic way. By defining one’s application program interfaces (APIs) in the RESTful style – as opposed to, say, the older, XML-heavy Simple Object Application Protocol (SOAP) style – companies can join in, and partake of, a community that’s populated by millions of other application publishers who have also built RESTful extensions to their systems.
One of the most popular frameworks to emerge for working with RESTful APIs is Swagger. Originally developed in 2011 by Tony Tam, the technical co-founder of the dictionary website Wordnik, Swagger initially provided automated documentation of APIs that already existed, as well as generation of a client SDKs (software development kits). As more people adopted Swagger, the open source community added new capabilities until Swagger became a full framework, replete with an array of tools to help developers publish and consume RESTful APIs.
In 2015, Tam’s commercial venture backing Swagger, Boston-based SmartBear Software, in conjunction with The Linux Foundation, created the Open API Initiative (OAI) to create standard specifications, dubbed OpenAPI Specification (OAS), to ensure the compatibility and reusability of RESTful APIs. Among the founding members of the OAI were Apigee, Intuit, Microsoft, and IBM.
While there are other RESTful frameworks in use, such as API Blueprint and RESTful API Modeling Language (or RAML), Swagger has grown the fastest and is arguably in a stronger position, according to industry watchers. The Swagger software, which is distributed under and Apache 2.0 license, is downloaded 100,000 times per day, according to its Wikipedia entry.
So, what do developers get with Swagger? For starters, the free software includes an editor that lets them create new APIs or edit existing ones using the OAS/Swagger definitions, which describe how the client should consume the API, i.e. which HTTP methods to call on which URL, which input documents to send, which status code to expect, etc. (The older SOAP method encapsulated this request-and-response structure data within the Web Services Description Language [WSDSL] documents, so in a way Swagger is to REST what WSDSL is to SOAP.)
Swagger software also lets developers turn those OAS/Swagger definitions into actual server-side and client-side code in more than 40 languages, including Java, JavaScript, Perl, Python, PHP, Node.js, ASP.net, Go (see Fig. B). (Sorry, no RPG or COBOL generation, as if that were possible or desirable, which isn’t clear.) Swagger also generates interactive documentation for these APIs to help folks on the receiving end of the API better know exactly how it works.
So what does this have to do with IBM i? Well, with the upcoming release of Rational HATS for 5250 Applications on i version 9.6, IBM has included support for Swagger.
Rational HATS, you will remember, is a rules-based screen transformation engine that turns 5250 and 3270 screens into graphical user interfaces (GUIs), including HTML Web clients and Java or Notes-based rich clients (i.e. run directly on Windows or other PC OSes, not the Web browser).
While the creation of screens is the main use of HATS, the software can also transform 5250 and 3270 datastreams into APIs that are published and consumed without the use of screens.
So, by supporting Swagger with the first release of the HATS product in two years, IBM is providing its customers with a bounty of useful functionality for working with RESTful APIs, and overcoming some of the limitations with the RESTful method. This is good news for IBM, and great news for IBM i and System z customers who are wondering how they can merge onto the API superhighway and transform their operations for the new digital landscape.
HATS version 9.6 doesn’t bring a whole lot more. IBM has done some work to more fully integrate Swagger files into System z via the z/OS Connect Enterprise Edition (EE), which makes using HATS APIs easier and more flexible. There are also some HTML rendering enhancements, improvements to default templates, and support for the latest Rational development tooling.
HATS version 9.6 ships on November 16. For more information, see IBM’s announcement letter.
RELATED STORIES
One IBM i Route Into the API Economy
HATS Now Hooked Into BlueMix Cloud
IBM Updates HATS to Support Rational 9 Tools