Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
geert-janklaps
Active Contributor
1,611
With SAP NetWeaver Gateway, you can make data from your SAP systems accessible and available for mobile devices and tablets. Developing APIs is easy. Getting them validated by the business is another story, however. After all, an API does not have a GUI. How do you tackle that?

In this blog, I will discuss a few frequently used solutions. You know them for sure: SAP NetWeaver Gateway Client, Postman collections and OpenAPI (previously known as Swagger) documentation. Each of them has specific advantages. Yet, they all have one limitation in common: none of them combines documentation and testing of SAP NetWeaver Gateway services. TheValueChain comes up with a solution. Let’s take a closer look.

SAP NetWeaver Gateway Client


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:

  • This is an SAP standard solution

  • Automatic CSRF token handling for modifying requests

  • Automatic retrieval of supported entity sets

  • All available URI options can easily be selected from the main menu


It has a few drawbacks, however:

  • This is a quite technical approach: each basic scenario needs to be prepared by the developer

  • The needs to understand the OData metadata to create his own requests for cases that were not prepared by the developer

  • It’s a test tool only, not a documentation tool


Postman collections


Postman is another great tool to test REST APIs. Each API call can be grouped into a Postman collection for usage by the functional analyst or user. Collections can be shared in teams, but the number of requests is limited to 20 in the free version.

Postman doesn’t provide a standard, automatic way to handle CSRF tokens for modifying requests, although it can be semi-automated by setting up a Postman environment and test cases on the CSRF token request. The user needs to execute the CSRF token request manually before any modifying request.


Postman’s benefits:

  • It’s more intuitive than SAP NetWeaver Gateway Client

  • An easy grouping of requests into collections and folders


But it has disadvantages as well:

  • No automatic CSRF token handling

  • Request sharing is limited in the free version

  • This is a test tool only, not a documentation tool


OpenAPI documentation


One of 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:

  • It’s a great universal way of describing a REST service;

  • It provides interactive documentation;

  • You can import it into several API management tools, including SAP Cloud Platform API Management, Azure API Management, …


Unfortunately, the testing functionality is not working . There is no standard way to handle CSRF tokens for modifying requests.

TheValueChain’s solution: embedded Swagger UI


In brief, none of these solutions can serve both as documentation and testing/validation tool in case of SAP NetWeaver Gateway services. The tool that comes closest is OpenAPI documentation combined with Swagger UI.

At TheValueChain, we are not thrown off balance that easily. What did we do to overcome the limitations? It’s simple: we have created an embedded Swagger UI solution in SAP. Our tool lists all activated OData services (both V2 and V4 are supported), automatically transforms the OData metadata into OpenAPI JSON format and displays it in Swagger UI. Your functional analyst and users can generate interactive documentation and start testing and validating the APIs.




Working with the embedded Swagger UI solution will bring you many advantages:

  • You can generate interactive (testable) documentation from OData Metadata (V2 and V4 supported)

  • It provides entity data model diagrams, a visual representation of the data and its relationships provided by the API

  • Automatic CSRF handling for modifying requests

  • No need for technical documentation

  • It will force developers to correctly configure the SAP Gateway Project in regard to enabled functionality

  • It can be used to both test and document standard SAP OData services

  • It follows the industry standards for documenting API’s


Does this solution cover all needs? Nothing is perfect. But one thing is certain: this solution will be a big step forward for your API documentation and testing approach!

What are you waiting for?


Are you struggling with documenting, testing, and validating your SAP NetWeaver Gateway projects? Do you want API documentation to be generated for you instead of doing all the manual work? Feel free to contact us!
Labels in this area