GeneratorGeneratortypeCreates a project, a component or configuration once, when you run it, rather than taking part in every build.See every one →What this type is →independently maintainedindependently maintainedoriginPublished by one person or a small company outside SAP. Says nothing about quality; the readings say that.See every one →

abap-openapi

Generates ABAP client classes and ICF server stubs from an OpenAPI v3 document, one self-contained global class and interface per definition, through a web client, a Node.js command line or ABAP itself.

Turning an OpenAPI document into working ABAP code otherwise means writing the client class or the ICF server handler by hand. abap-openapi generates one self-contained global class and interface per OpenAPI definition, covering OpenAPI v3 documents (v2 only after converting to v3) for ABAP v702 and up, generated through a web client, a Node.js command line, or from ABAP itself. The generated code depends on ZCL_OAPI_JSON, which the README suggests copying into a local class rather than keeping as a shared dependency.

Facts

Last pushLicenceMIT

Where it sits

Lives in
Provides
OpenAPIABAPOpenAPIcapabilityHanding a description of the service to clients and tools — an API portal, a code generator, a partner who wants a contract before they write anything.

Who is behind it

abap-openapiabap-openapiOrganisationMaintains this
In the atlas: maintains 1
@abap-openapi
maintaineraxelmohnenPersonContributes to this
In the atlas: contributes to 4
@axelmohnen
Jens SchwarzPersonContributes to this
In the atlas: contributes to 4
@BlackmanCC
Colby HemondPersonContributes to this
In the atlas: contributes to 2
@colbyhemond
Francisco MilánPersonContributes to this
In the atlas: contributes to 5
@francisco-milan
Gregor WolfPersonContributes to this
In the atlas: maintains 17, contributes to 59, wrote 2
@gregorwolf
Lars HvamPersonContributes to this
In the atlas: maintains 13, contributes to 92, wrote 1
@larshp
FabianPersonContributes to this
In the atlas: maintains 1, contributes to 3
@OberstVonGatow
Mike PokrakaPersonContributes to this
In the atlas: maintains 1, contributes to 11
@pokrakam
SamiPersonContributes to this
In the atlas: contributes to 2
@samibouge
9 contributors

What it declares

Every artifact

Type
Generator
Origin
Independently maintained
Runtime
Node.js

As a generator

Generates
Code or test data
Run with
Its own command
Distributed through
npm

Connections2

README

quoted from abap-openapi/abap-openapi under MIT, read
abap-openapi/abap-openapi/README.mdOn GitHub

ABAP OpenAPI Client & Server Generator

ABAP OpenAPI is an OpenAPI generator tool designed to create API clients, ICF server handlers, and ICF server implementation stubs from OpenAPI documents.

Generate

It is possible to generate the objects using different processes:

  • Generate via our web client
  • Generate via command line (NodeJS)
  • Generate via ABAP

Features

Feature
OpenAPI File TypesJSON
OpenAPI Versionsv2*, v3
Object Creationone self-contained global class & interface per OpenAPI definition

* OpenAPI v2 is currently only capable by converting the v2 file to a v3 file. This can be done manually using the Swagger Editor, or programmatically using Swagger Converter

NOTE: generated code currently uses ZCL_OAPI_JSON, suggest copying the implementation to a local class in the generated global class

Use Cases

API Creator
  • Write the OpenAPI document for your API so that you can generate the ICF handler and Server Implementation boilerplate
  • Use the OpenAPI document to create automatic documentation for your API
API User
  • Use any OpenAPI document to create the client class to consume external APIs

Building/Developing

Prerequisites

NodeJS 16+

Setup
  • clone this repository
  • run npm install
Testing

Unit Tests: npm test Intergration Tests: npm run integration_test

You can try out the generation using Swagger's Petstore Example:

  • Just run npm run petstore
  • The output files will be generated in ./test_v1/generated/

Example

#!/usr/bin/env bash

rm -rf abap-openapi
git clone --depth=1 https://github.com/abap-openapi/abap-openapi
rm -rf abap-openapi/.git
cd abap-openapi
npm ci
npm run transpile
rm ../src/api/*.abap
node test_v2/index.mjs <filename> ../src/api <name>
MIT, read
OpenAPI
  1. ABAP OpenAPI UISwagger UI for SAP NetWeaver Gateway services
  2. ABAP-SwaggerExposes ABAP class methods as REST services with Swagger UI

Details

Sources3
Added by handdiscovered herechecked
github.com/abap-openapi/abap-openapitree, pushes, contributors, CIchecked
README.mdquoted, and what the entry declareschecked

Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.

Compatibility and provenance
runtimesnode
discovered viaAdded by hand
first seen in the atlas
ecosystem and domainabap, protocols-and-apis
abaplint
issues under its own abaplint configuration0
lines10,874
statements7,460
objects142
files290
analysed, main
abaplint version2.120.84
Contributors9
History in the atlas1
  1. First seen.
For your agent
Ref
artifact:abap-openapi-abap-openapi
JSON
/artifacts/abap-openapi-abap-openapi.json
MCP
Connecting an agent