Spaces:
Sleeping
Sleeping
|
Download examples/hf-generated/erp/design.md from dellweb3/VibeCoding: direct link, hf CLI and curl.
- Browser
- Download file 737 Bytes
-
https://huggingface.co/spaces/dellweb3/VibeCoding/resolve/main/examples/hf-generated/erp/design.md
- Command line
-
hf download hf://spaces/dellweb3/VibeCoding/examples/hf-generated/erp/design.md
-
curl -L -o design.md https://huggingface.co/spaces/dellweb3/VibeCoding/resolve/main/examples/hf-generated/erp/design.md
737 Bytes
Java17 HttpServer on 8080. GET /health returns {"status":"ok"}. GET /api/purchase/quote validates query params (quantity, unitPrice, department) strictly: no duplicates/extras, format checks (int 1-10000, decimal >0 <=1e6 with max 2 decimals, dept regex), returning 400 INVALID_INPUT on failure. Rejects non-GET with 405. Requires 'Authorization: Bearer demo-sales' header; missing/invalid gives 401 UNAUTHORIZED. If authenticated as sales but department param is not 'sales', returns 403 FORBIDDEN. Computes total using BigDecimal, sets scale to 2 HALF_UP. Approval level based on total: <10k SELF, >=10k & <100k MANAGER, >=100k DIRECTOR. Returns JSON {total, approval, department}. Unknown paths return 404 NOT_FOUND. No external deps.