Mobile Foundation adapters are used to perform any necessary server-side logic, and to transfer and retrieve information from back-end systems to client applications and cloud services.
Generate an adapter from its OpenAPI specification
Auto-generation of an adapter from its OpenAPI specification (Swagger Specification) helps in expediting application development. Mobile Foundation user can now focus on the application logic instead of creating the Mobile Foundation adapter, which connects the application to the desired back-end service.
Note: This feature is available only in DevKit.
To use this feature, the OpenAPI specification (.json or .yaml) for the microservice (or the desired back-end service) should be available. The adapter generation feature is made available by an extension adapter called Microservice Connector, also referred to as Microservice Adapter Generator, which is available for download from the Download Center on Mobile Foundation Console.
Note: As a prerequisite, configure the JAVA_HOME variable to point to the installed JDK folder.
Download the Microservice Adapter Generator adapter and deploy it to Mobile Foundation server. The deployed adapter will now be listed under Extensions, in the navigation pane.
Clicking the Microservice Adapter Generator will launch the page, where the user can provide the OpenAPI Specification (.json or .yaml) file and can choose to generate the adapter from the provided OpenAPI specification.
After the adapter is generated it will be automatically downloaded to the browser. The user is then required to deploy the generated adapter, for use in their apps. Selecting the option Include adapter source will download the adapter source code and generated adapter as a zip file. User can modify the generated adapter source code, rebuild and deploy the adapter.
The adapter generator depends on the accuracy of the OpenAPI specification JSON. If the specification is incomplete or incorrect, the generation may fail or may result in the generation of adapter APIs that do not match the APIs of the back-end microservices.
To learn more, read the blog post Auto Generate Adapters for Microservices and backend systems from its OpenAPI Specification.
Inclusive terminology note: The Mobile First Platform team is making changes to support the IBM® initiative to replace racially biased and other discriminatory language in our code and content with more inclusive language. While IBM values the use of inclusive language, terms that are outside of IBM's direct influence are sometimes required for the sake of maintaining user understanding. As other industry leaders join IBM in embracing the use of inclusive language, IBM will continue to update the documentation to reflect those changes.