fix(#2): add /add endpoint returning 201 Created - #5
fix(#2): add /add endpoint returning 201 Created#5fullsend-ai-coder[bot] wants to merge 1 commit into
Conversation
The /add endpoint was missing from the application. Added a POST
/add endpoint that accepts JSON with "a" and "b" numeric fields,
returns their sum as {"result": <sum>} with HTTP 201 Created
status. Includes input validation for missing fields and
non-numeric types (returns 400).
Added tests covering the happy path, missing fields, and invalid
type inputs.
Closes #2
ReviewFindingsMedium
Low
|
The /add endpoint was missing from the application. Added a POST /add endpoint that accepts JSON with "a" and "b" numeric fields, returns their sum as {"result": } with HTTP 201 Created status. Includes input validation for missing fields and non-numeric types (returns 400).
Added tests covering the happy path, missing fields, and invalid type inputs.
Closes #2
Post-script verification
agent/2-add-endpoint-201)47f7f1511df8ad7036c082d9b2179085cd9ec107..HEAD)