API Mediation Layer
The home of Zowe API Mediation Layer
Following platform is required to run the API Mediation Layer:
- Oracle or IBM Java SE Development Kit 8 (http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html or https://www.ibm.com/developerworks/java/jdk/), Java 10 is not supported
Other development prerequisites
Following tools are required to build and develop API Mediation Layer:
Nodejs and npm are required to be installed globally to be able to build the API Catalog ui
Install the package manager
pnpmglobally in order to build the project:
npm add -g pnpm
npm install -g concurrently
Build all modules:
Run all service on local machine:
npm run api-layer
The API Mediation Layer uses a dummy authentication provides as a default security provider for the development purposes. To log in, use
user as username and password.
(Optional) z/OSMF Authentication
Perform the following steps to use the real authentication service:
Configure a valid z/OSMF instance using the following sample configuration
Modify gateway-service.yml with a z/OSMF configuration
apiml: security: auth: provider: zosmf zosmfServiceId: zosmfId # Replace me with the z/OSMF service id
Ensure that the z/OSMF certificate is trusted by APIML. You have two options:
Import the certificate to the APIML keystore using
scripts/apiml_cm.sh --action trustas described at Trust certificates of other services
Disable certificate validation. For more information, see Disabling certificate validation on localhost
Run unit tests
Unit tests for Java and TypeScript modules are executed as a part of the build process.
Measure code coverage
For the code coverage of all modules, run:
The code coverage for new code should be higher that 60% and should not be decreased for existing code.
The reports in HTML format are stored
build/reports/jacoco/test/html/index.html for each Java module.
For the code coverage of a single Java module (for example
You can an individual test class by:
./gradlew :discovery-service:test --tests com.ca.mfaas.discovery.staticdef.ServiceDefinitionProcessorTest
Run integration tests
Follow the instructions in Integration Tests to run integration tests.
For more information about how the certificates between APIML services are setup, see TLS Certificates for localhost.
Follow the guidelines in Contributing to add new functionality.
Local configuration of services
Follow the guidelines in Local Configuration to set local environment properties for testing on your local machine include HTTPS setup.
Also if you use IntelliJ IDEA, see learn how to configure Run Dashboard to use these local configurations.
If you use Visual Studio Code, see how to configure it to develop and debug local configurations.
Adding services that does not support API Mediation Layer natively
API Catalog UI
For more information about the UI of the Catalog see its README.