
Get in touch with the author
Want to know more?
Drop us a line and we'll be happy to catch up.
By Geert-Jan Klaps
SAP NetWeaver Gateway allows you to make SAP system data accessible on mobile devices. Creating APIs is simple, but obtaining business validation can be challenging. This is because APIs lack GUIs. In this blog, we explore three popular solutions: SAP NetWeaver Gateway Client, Postman collections and OpenAPI. Unfortunately, each has limitations, such as lacking combined documentation and testing of SAP NetWeaver Gateway services. Fortunately, TheValueChain has a solution, so let's take a closer look.
The standard way to have an API validated is to create test cases, clustered in test groups, in the SAP NetWeaver Gateway Client.
As a functional analyst, you can select a test case, manipulate the predefined request body to fit the test scenario and execute the API call.
This approach has several advantages:
It also has a few drawbacks:
It’s a test tool only, not a documentation tool
Postman is a useful tool for testing REST APIs, and API calls can be organised into collections for easy use. However, the free version limits requests to 20 and Postman does not automatically handle CSRF tokens for modifying requests. To work around this, a user can create a Postman environment and test cases for the CSRF token request, but the user must still manually execute the request before any modifying request.
Postman advantages:
Disadvantages:
One of the standards in API documentation is the OpenAPI standard. You can use it to fully describe and document the API functionalities using JSON or YAML. A tool like Swagger UI enables you to generate interactive documentation that allows users to test every functionality provided by the API.
However, there is no standard way to create a valid OpenAPI JSON or YAML file from an SAP NetWeaver Gateway service. That is why creating this type of documentation is quite cumbersome, complex and time-consuming.
OpenAPI has some powerful characteristics, such as:
Unfortunately, the testing functionality does not work because of the Cross-Origin Resource Sharing (CORS) policy. There is no standard way to handle CSRF tokens for modifying requests.
None of the solutions mentioned can serve as both documentation and testing/validation tools for SAP NetWeaver Gateway services. The closest option is OpenAPI documentation with Swagger UI.
However, at TheValueChain, we have developed a solution to overcome these limitations by creating an embedded Swagger UI in SAP. This tool supports both V2 and V4 OData services, automatically transforms metadata into OpenAPI JSON format, and allows functional analysts and users to generate interactive documentation and start testing and validating APIs.
Want to know more about our custom UI solutions?
Get in touch with the author
Drop us a line and we'll be happy to catch up.