Skip to content

v0.21.1: No orders without items

Choose a tag to compare

@jaravan jaravan released this 27 Oct 14:17
· 197 commits to main since this release

What's new

Every order has items

In 0.21.0, generated items picked their order at random, so about half the orders had none, and still showed a total with nothing behind it. No SAP document is without items. Now a set whose key holds its parent's, as SAP Gateway and RAP model them (PurchaseOrder + PurchaseOrderItem, SalesOrder + SalesOrderItem, Travel + Booking), gets 1 to 5 rows under each parent, and every order's total is the sum of its items:

  PurchaseOrderSet: 20 rows generated (no seed file)
  PurchaseOrderItemSet: 58 rows generated (no seed file)

Recipes, and examples with mock rules

  • Recipes: the commands for trying a service with curl, running it with npx and Docker (--explain and --write-data included), Docker Compose, and CI.
  • The examples show the mock rules: Northwind has a config.json that fixes its filler values, and PurchaseOrderSrv is now all generated, with rules next to its operation.

Upgrading

  • An item set without a data file gets 1 to 5 rows per parent, not --mock-rows: about three times as many rows. Tests that count generated items will see the difference.
  • With --persist, the next start regenerates the generated orders and items nothing has written to, and logs it. Sets with your writes are kept.
  • Items keyed by an ID of their own (CAP's compositions), or by two parents (Northwind's Order_Details), are still spread at random, as before.

Install

npx odata-prova@0.21.1 ./MySrv
docker run -p 3000:3000 -v "$PWD/MySrv:/models/MySrv:ro" ghcr.io/jaravan/odata-prova:0.21.1

Details: Mock data, Recipes.