Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Product Catalog Example

This is Example 1 from the Basic Examples documentation - a simple product catalog with CRUD operations.

Features

  • Product and Category entities
  • Navigation between Products and Categories
  • Full CRUD support
  • Filtering and expansion

Running the Example

  1. Install dependencies (from the workspace root):

    pnpm install
  2. Start the mockserver:

    cd samples/product-catalog
    npx ui5 serve
  3. 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'"

Project Structure

product-catalog/
├── webapp/
│   └── localService/
│       ├── metadata.xml
│       └── data/
│           ├── Products.json
│           └── Categories.json
└── ui5.yaml

Documentation

For more details, see the Basic Examples documentation.