The JSON formatter's JSONPath query panel and JSON Schema validation panel are powered by two small pure modules that have no tests yet. They're a great first contribution: no UI work, just clear inputs and outputs.
Where to look
lib/jsonpath.ts (runJsonPath)
lib/jsonSchema.ts (validateSchema and SAMPLE_SCHEMA)
lib/json-utils.ts (SAMPLE_JSON, near the end of the file)
app/(tools)/json-formatter/components/ConversionPanel.tsx (how the UI uses them)
lib/__tests__/json-utils.test.ts (for the existing test style)
Acceptance criteria
Want to work on this? Comment below and I'll assign it to you. Please take one issue at a time, branch off develop, and open your PR against develop with Closes #97 in the description.
The JSON formatter's JSONPath query panel and JSON Schema validation panel are powered by two small pure modules that have no tests yet. They're a great first contribution: no UI work, just clear inputs and outputs.
Where to look
lib/jsonpath.ts(runJsonPath)lib/jsonSchema.ts(validateSchemaandSAMPLE_SCHEMA)lib/json-utils.ts(SAMPLE_JSON, near the end of the file)app/(tools)/json-formatter/components/ConversionPanel.tsx(how the UI uses them)lib/__tests__/json-utils.test.ts(for the existing test style)Acceptance criteria
lib/__tests__/jsonpath.test.ts:ok: falsewith an "Invalid JSON" message$..emailonSAMPLE_JSONreturns 2 matches (the user's email string andpreferences.notifications.email, which istrue) with matchingpaths$.user.projects[?(@.active==true)]returns only the active projectok: trueand an empty listlib/__tests__/jsonSchema.test.ts:parseErrorSAMPLE_SCHEMAvalidatesSAMPLE_JSONwith no errorsminimumorminLengthfail, withinstanceLocationandkeywordfilled in../jsonpath) and pass withnpm run testWant to work on this? Comment below and I'll assign it to you. Please take one issue at a time, branch off
develop, and open your PR againstdevelopwithCloses #97in the description.