feat: input validation hardening + /version and /help endpoints#27
Open
kumaakh wants to merge 18 commits into
Open
feat: input validation hardening + /version and /help endpoints#27kumaakh wants to merge 18 commits into
kumaakh wants to merge 18 commits into
Conversation
added 18 commits
May 17, 2026 00:33
Covers input validation hardening, GET /version endpoint, and GET /help endpoint across two phases with verify checkpoints.
Plan passes all 13 review criteria. Validation hardening is correctly prioritized as riskiest-first, phases are cohesive, and the plan aligns with requirements.md intent.
All tasks complete (T1.1, T1.2, T2.1, T2.2, T2.3). 40/40 tests pass. Issues 1, 2, 3 fully addressed. No regressions or security concerns.
…curacy)
docs/api-enhancements.md incorrectly documents validation error response as
array of strings; actual shape is array of {field, message} objects. Also
flags misleading requestBody? on GET /api/notes in the help example.
Both prior findings addressed: error body shape corrected to {field, message}
objects, and spurious requestBody removed from GET /api/notes example.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
validateCreateInputandvalidateUpdateInputnow reject empty/whitespace-onlycontentand empty/whitespace-only tag values with clear error messages ({"errors": [{"field": "...", "message": "..."}]}).{"name": "fleet-e2e-toy", "version": "1.0.0"}— version sourced dynamically frompackage.jsonviaresolveJsonModule.routesarray describing all 8 API endpoints (method, path, description).docs/api-enhancements.mdcaptures architecture decisions, API contracts, and trade-offs for long-term reference.Test plan
npm test— 40/40 tests pass (was 33; +7 new integration tests)GET /versionreturns 200 with{"name": "fleet-e2e-toy", "version": "1.0.0"}GET /helpreturns 200 withroutesarray of 8 entries each havingmethod,path,descriptionPOST /api/noteswith empty/whitespacecontentreturns 400POST /api/noteswith empty/whitespace tag values returns 400PUT /api/notes/:idwith empty/whitespacecontentreturns 400Branch
e2e-s1.2-25981185129/api-enhancements→main