This provides a simle OData endpoint of the SAP SalesOrders API with support for simple operations to add and retrieve SalesOrders. This is for purely testing purposes in integration projects.
To deploy either clone and build the docker image yourself, or just click this button to deploy directly to Google Cloud Run.
To run locally using GO:
go run orderservice.go
To build and run locally using docker:
docker build -t local/sap-orders-mock .
docker run -p 8080:8080 local/sap-orders-mock
To test on Cloud Run, call this endpoint:
curl [YOUR_CLOUDRUN_ENDPOINT]/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrder
To test locally, call this endpoint:
curl http://localhost:8080/sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrder
You should get a lot of SalesOrders returned. You can also POST new records to the endpoint, which will be persisted in memory until the Cloud Run instance is scaled down.