REST API with IBM App Connect with OpenAPI 3.0
REST API with IBM App Connect with OpenAPI3.0 is a way of describing HTTP-based Applications, which are typically RESTful APIs. An open API definition comes in the form of a YAML or JSON file that describes the inputs and outputs of an API. OpenAPI specification can also contain information Such as host, authorization, and other details needed by consumers and producers.
Comparisons between Open API2.0 and Open API 3.0:
● YAML as the primary format: OpenAPI 2.0 used JSON as the primary format, while OpenAPI 3.0 uses YAML as the primary format. YAML is a more human-readable format than JSON, which can make it easier to read and write API specifications.
● Improved schema support: OpenAPI 3.0 has improved schema support compared to OpenAPI 2.0. It supports more data types and features
● Modularization: OpenAPI 3.0 introduces a modular approach to defining API specifications, which allows users to break up larger specifications into smaller, more manageable parts. This can make it easier to maintain and reuse API specifications.
● Security enhancements: OpenAPI 3.0 provides better support for security, including the ability to define multiple security schemes for an API and to specify which security schemes apply to which API operations.
● Changes to parameter definitions: OpenAPI 3.0 introduces changes to the way that parameters are defined, including the ability to define headers and cookies as parameters, and the ability to specify parameter location as part of the parameter definition.
Open API 3.0 specification in IBM App connect:
We need to create a REST API that can perform multiple operations in it. by default, we get the REST API base URL. Then switch to open API editor to create sub-flows for the operations and also we can add the error handler’s sub-flows. We can do the improved schema validation and it is possible to send parameters as query parameters and Headers.
We can test the API by giving a URL as below, which consists of IP, Port, and the base path and path of the method
Here, the REST API is developed the give the response as the same request.