What are the z/OS Connect Gradle plug-ins?
The z/OS Connect API provider Gradle plug-in and the z/OS Connect API requester Gradle plug-in are used to build OpenAPI 3.0 specification API and API requester projects.
zosConnect-3.0 Applies to zosConnect-3.0.
- The API provider Gradle plug-in builds OpenAPI 3.0 specification APIs.
- The API requester Gradle plug-in builds OpenAPI 2.0 and OpenAPI 3.0 specification API requesters.
By including a simple build.gradle file, the Gradle plug-in is automatically retrieved from Maven
Central repository and the Gradle plug-in Portal
and stored locally. Each z/OS Connect
Gradle plug-in has a version that evolves as new
features and fixes are released. To help ensure compatibility and access to the latest functions,
it's important to keep your build.gradle files updated with the most recent Gradle plug-in versions, as documented in the Release notes.
z/OS Connect API provider Gradle plug-in
The z/OS Connect Designer user interface invokes the z/OS Connect API provider Gradle plug-in to process an OpenAPI 2.0 document or an OpenAPI 3.0 document, associated data mappings, and COBOL or PL/I language structures. This process generates a web archive (WAR) file that encapsulates the API implementation logic. The WAR file is then deployed to a z/OS Connect Server where it acts as the runtime application responsible for handling API requests.
When an API call is received, the z/OS application parses the request, transforms the data as defined in the mappings, and calls the z/OS Asset to get or update the business data.
The build.gradle file for the API provider should resemble the following
example, where version refers to the version of the API provider
Gradle plug-in you are using.
plugins {
id 'com.ibm.zosconnect.gradle' version '1.4.8'
}
repositories {
maven {
url '/templates/gradleLibs/'
}
mavenCentral()
}
For more information about z/OS ConnectAPI provider Gradle plug-in, see Developing APIs with "API-first".
z/OS Connect API requester Gradle plug-in
The z/OS Connect
API requester
Gradle plug-in is invoked directly through the
Gradle command line. It processes an OpenAPI 2.0 document or an OpenAPI 3.0 document by using a set of options that are
defined in an options.yaml file. When used, the Gradle plug-in generates a web archive
(WAR) file along with COBOL or PL/I language structures that are used by z/OS
application that calls the API.
The resulting WAR file is deployed to a z/OS Connect Server, enabling it to handle requests to the specific API described in the OpenAPI document. These requests originate from CICS, IMS, or other z/OS applications, and are routed through the z/OS Connect Host API. Once received, the WAR file application processes the request, invokes the appropriate API endpoint, and returns the response to the calling application.
build.gradle file for the API requester should resemble the following example,
where version refers to the version of the API requester
Gradle plug-in you are using.
plugins {
id 'com.ibm.zosconnect.requester' version '1.2.2'
}
repositories {
maven {
url '/templates/gradleLibs/'
}
mavenCentral()
} For more information about z/OS ConnectAPI requester Gradle plug-in, see Developing an API requester