docs: add frontend API validation guide#134
Conversation
There was a problem hiding this comment.
Thanks for the updates. I re-reviewed the latest branch and the requested response-shape fixes look good now.
The validation guide now correctly documents the raw backend response shapes and clearly separates them from the frontend-normalized shapes for:
- GET /api/score
- GET /api/scans
- GET /api/drift
- GET /api/findings/:id/playbook
This makes the doc much more useful for future contributors because it explains both what the backend actually returns and what the frontend normalizers expose to components.
Also confirming the base-branch point: this PR targets dev. The larger 36-file diff only appears when comparing the branch against main, because dev already contains additional changes. Against the actual PR base, the diff is clean and limited to the validation docs.
For the scope of issue #132, this is a solid introductory validation framework. It documents the current state, known gaps, setup requirements, and follow-up validation work without trying to solve everything in one PR.
CI is green on the updated commit. Looks good to me.
d3cf9f6 to
c96ada0
Compare
Summary
Closes #132.
Adds frontend/API validation documentation for OpenShield covering the React/Vite frontend, Flask API endpoints, JWT behaviour, CORS/error handling, live mode setup, and frontend-to-backend data flow.
Changes
docs/validation/FRONTEND_API_TESTING.mddocs/validation/TEST_RESULTS.mdVITE_API_URLand JWT token handlingValidation Results
npm install: Passnpm run lint: Failed — 65 lint errors, mostly unused React importsnpm run build: Passnpm run dev: Pass — Vite starts on localhost:5173pytest: Failed —DATABASE_URLnot configured for PostgreSQL-backed testsKey Findings
api/app.pyfrontend/API_ENDPOINTS.txtappears outdated in areas including port references, AI endpoint paths, demo/live mode description, and endpoint statusDATABASE_URLSecurity
No secrets, JWT values, Azure credentials, database credentials,
.envfiles, or local environment files were committed.