来源资料待手动核验
项目简介
ABAP OpenAPI Client and Server generator in ABAP
ABAP OpenAPI Client and Server generator in ABAP
ABAP OpenAPI is an OpenAPI generator tool designed to create API clients, ICF server handlers, and ICF server implementation stubs from OpenAPI documents.
It is possible to generate the objects using different processes:
| Feature | | | --- | --- | | OpenAPI File Types | JSON | | OpenAPI Versions | v2\, v3 | | ABAP Versions | v702 and up | | Object Creation | one 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 ZCLOAPIJSON, suggest copying the implementation to a local class in the generated global class
NodeJS 16+
Unit Tests: npm test Intergration Tests: npm run integrationtest
You can try out the generation using Swagger's Petstore 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>