The following article shows how to run a yunIO service in Swagger Inspector.

Swagger Inspector is an OpenAPI design and documentation tool that allows validation of APIs and automatic creation of OpenAPI files for any end point you call. For more information on the Swagger Inspector, see Swagger Inspector Documentation.

Prerequisites in yunIO #

  1. Create a service in yunIO. The depicted example uses a Table service with the following settings:
    Table-Extraction
  2. Click copy-URL to copy the URL of the service definition or click download-file to download the service definition.
    yunio-Services

Loading a yunIO Service into Swagger Inspector #

  1. Open Swagger Inspector in your browser.
  2. Navigate to the Definition menu (1). There are 2 ways to load a yunIO service definition into the Swagger Inspector:
    • Paste the URL of the service definition into the designated input field (2).
    • Click on the upload icon to load a service definition from your hard drive (2).
  3. Click [PARSE] to analyze the service definition (3).
    Swagger-Inspector-Load-Service-1
  4. Once the service is parsed, click on either the GET or POST method of the service (4) to access authentication, headers and parameter settings.
    We recommend using the POST method with Transport Layer Security (HTTPS) to ensure data protection. Do not use the GET method to send sensible data, e.g. credentials.
    Swagger-Inspector-Load-Service-2

Tip: If you don’t have any authentication, headers, or parameters to add to the service, paste the URL of your yunIO service endpoint directly into the main URI input line. Select POST from the method drop-down list and click [Send] to execute the service.

Parameterizing the Service #

All parameters defined in yunIO are accessible in the request body of the service.
To set parameters, edit the Body, e.g. change the WHERE clause of the table extraction.
Swagger-Inspector

Note: When passing a WHERE clause to a yunIo service using the http GET method, add spaces manually, e.g., MANDT=800 and LAND1='DE' instead of MANDT=800andLAND1='DE'.

Running the Service #

Note: If the option Request credentials from callers when running services is active in the connection settings in yunIO, select Basic Authentication in the Authentication & Headers tab of Swagger Inspector and enter your SAP credentials before running the service.

After parsing the service definition, the URL of the service endpoint should be available in the main URI input line. If not, enter the URL and select the POST method. Click [Send] to execute the service.
Swagger-Inspector

The results are displayed in the Response section of Swagger Inspector. Swagger-Inspector-Results