Skip to content

Latest commit

 

History

History
28 lines (22 loc) · 961 Bytes

File metadata and controls

28 lines (22 loc) · 961 Bytes

Bug Fix: ApiRequestPanel JSON Validation

Summary

Fixed critical bug where ApiRequestPanel allowed submitting malformed JSON without validation, causing API call failures.

Changes

  • ApiRequestPanel.tsx: Added real-time JSON validation with editable mode
  • ApiRequestPanel.css: Styled validation UI with error states
  • ApiRequestPanel.test.tsx: Added 17 comprehensive tests
  • Test files: Created standalone validation tests and interactive demo

Key Features

✅ Real-time JSON validation on every keystroke
✅ Inline error messages with specific syntax details
✅ Submit button auto-disabled for invalid JSON
✅ Accessibility compliant (ARIA attributes)
✅ Backward compatible (opt-in editable mode)

Test Results

  • JSON validation: 13/13 passed ✅
  • Integration tests: 8/8 passed ✅
  • TypeScript: No errors ✅

Commit

0284b16f - Pushed to main branch

Repository

https://github.com/Zarmaijemimah/AnchorKit