feat: add CategorySchema validator with tests and examples (#1)#3
Conversation
|
Closes #1 Changes
How to verify locally1. Clone the repogit clone https://github.com/YOUR_USERNAME/Contracts.git 2. Install dependenciesnpm install 3. Run testsnpm test Expected test output✔ valid capture event passes tests 11 | pass 11 | fail 0 Manual usage exampleimport { validateCategorySchema } from "@memact/contracts" // Valid input // Invalid input |
|
Hey @Kunall7890, first of all, great work on this CategorySchema validator! It's been successfully merged here. We noticed that the SSoC leaderboard crawler only scans the main Memact/Context repository, which means contributions on Memact/Contracts aren't being tracked automatically on the leaderboard. To make sure you get full credit and points on the leaderboard with virtually zero extra load on your end:
Let me know if you are up for this, and we will set up the issue/branch for you! |
|
Hi @Kunall7890 👋 I noticed that you have successfully contributed and merged this PR, but your handle is currently not showing up on the official SSoC 2026 leaderboard. Please reach out to the SSoC mentors/admins to ensure your registration is correctly linked so you receive your points. Thanks for your contribution! |
|
Hi @Kunall7890 👋 I noticed that this PR has been merged, but there is no corresponding dummy PR created in the main Context repository (Memact/Context) referencing this work. For SSoC26 tracking, please make sure to open a dummy PR in Memact/Context so your merged contribution can be verified and counted on the leaderboard. Thank you! |
|
No corresponding dummy PR was found in Memact/Context. Please create one referencing |
Closes #1
What this adds
src/contracts/category-schema.v0.mjs— CategorySchema validatorexamples/category-schema.v0.json— valid example JSONtest/contracts.test.mjssrc/index.mjsSchema fields
id,name,version,schema_versiondescription,contextFields,exampleInputs,normalizedOutputShape,wikiTemplates,permissionSuggestions,safetyNotesTests
node --test passes — 11 tests, 0 failures