784 B
784 B
Add a new DB2 REST endpoint to the project. For the given endpoint:
-
Models: Create/update structs in
src/models/- Raw struct with
#[serde(rename = "UPPERCASE")]fields - Normalized struct with idiomatic Rust names
From<Raw>impl that trims strings and handles defaults
- Raw struct with
-
Service method: Add to
src/api/services.rs- Typed method on
OpusrServices - Correct positional parameters (P1, P2, ...)
- Map raw response to normalized types
- Typed method on
-
CLI command: Add subcommand variant to
src/config/settings.rs- Implement handler in
main.rs - Support both JSON and table output
- Implement handler in
-
Tests: Write tests in
tests/- Mock server with
wiremock - Test success, empty result, error cases
- Mock server with
-
Run
/qa-cycleto validate everything