This is Example 1 from the Basic Examples documentation - a simple product catalog with CRUD operations.
- Product and Category entities
- Navigation between Products and Categories
- Full CRUD support
- Filtering and expansion
-
Install dependencies (from the workspace root):
pnpm install
-
Start the mockserver:
cd samples/product-catalog npx ui5 serve -
Test the service:
# Read Products curl http://localhost:8080/sap/opu/odata/sap/PRODUCTS_SRV/Products # Read Single Product with Category curl "http://localhost:8080/sap/opu/odata/sap/PRODUCTS_SRV/Products('HT-1000')?\$expand=Category" # Filter Products by Category curl "http://localhost:8080/sap/opu/odata/sap/PRODUCTS_SRV/Products?\$filter=CategoryID eq 'NB'"
product-catalog/
├── webapp/
│ └── localService/
│ ├── metadata.xml
│ └── data/
│ ├── Products.json
│ └── Categories.json
└── ui5.yaml
For more details, see the Basic Examples documentation.