$ yarn install
# development
$ yarn run start
# watch mode
$ yarn run start:dev
# production mode
$ yarn run start:prod
# unit tests
$ yarn run test
# e2e tests
$ yarn run test:e2e
# test coverage
$ yarn run test:cov
- Download the EDMX file for odata service like business partner service in the SAP Business Accelerator Hub.
- Copy the EDMX file into the
service-specifications
folder. - Add options for odata service in
options-per-service.json
file in theservice-specifications
folder like the following content:
{
"service-specifications/API_BUSINESS_PARTNER.edmx": {
"directoryName": "business-partner-service",
"basePath": "/sap/opu/odata/sap/API_BUSINESS_PARTNER",
"packageName": "business-partner-service"
}
}
- Generate the odata service.
npx generate-odata-client --input service-specifications --outputDir services --optionsPerService service-specifications/options-per-service.json --overwrite
The generated client library is in services/business-partner-service
, you can use it in services.
Next, you will create a service that will be responsible for fetching the business partners. To create a service class business-partner.service.ts
, execute:
nest g service business-partner
Add client library to the service.
Create a controller for providing business partner api:
nest g controller business-partner
Nest is MIT licensed.