Use the SAP Cloud SDK for JavaScript / TypeScript to reduce development effort when building applications on SAP Business Technology Platform that communicate with SAP solutions and services such as SAP S/4HANA Cloud, SAP SuccessFactors, and many others.
Apache License 2.0
161
stars
51
forks
source link
Could not convert OpenAPI specification to OpenAPI version 3. (Patchable) schema type must not be an array #4335
See error
Could not convert OpenAPI specification to OpenAPI version 3. (Patchable) schema type must not be an array
The issue occurs for .edmx, .json and .yaml
Expected behavior
Client should be successfuly generated.
Used Versions:
node version via node -v
npm version via npm -v
SAP Cloud SDK version you used as dependency
Impact / Priority
Affected development phase: Getting Started, Development
Additional context
When doing the same with cds import it is working fine. And as cds is using the cloud sdk, I would expect that this should also work?!
The steps from the docs are so simple, that I really don't know what I could have done wrong.
Describe the bug
Generating an oData Client fails for SF API Specifications.
To Reproduce Steps to reproduce the behavior:
Set up ... Following the docs here: https://sap.github.io/cloud-sdk/docs/js/features/openapi/generate-client![grafik](https://github.com/SAP/cloud-sdk-js/assets/35531968/5527fbbf-0d0e-4e36-b181-bc344eb7a38c)
npm install -D @sap-cloud-sdk/openapi-generator
Downloaded PLTUserManagement.json file from api hub and uploaded it to my BAS folder:Execute ...
npx openapi-generator -i srv/resources/api-specs/PLTUserManagement.json -o srv/resources/api-clients/ --verbose
See error
Could not convert OpenAPI specification to OpenAPI version 3. (Patchable) schema type must not be an array
The issue occurs for .edmx, .json and .yamlExpected behavior Client should be successfuly generated.
Used Versions:
node -v
npm -v
Impact / Priority
Affected development phase: Getting Started, Development
Additional context When doing the same with
cds import
it is working fine. And as cds is using the cloud sdk, I would expect that this should also work?! The steps from the docs are so simple, that I really don't know what I could have done wrong.Thanks for any help! Regards Nico