Skip to content

feat: add nova_json_schemas plugin and replace thoas#8

Open
Taure wants to merge 1 commit intomainfrom
feat/json-schema-tests
Open

feat: add nova_json_schemas plugin and replace thoas#8
Taure wants to merge 1 commit intomainfrom
feat/json-schema-tests

Conversation

@Taure
Copy link
Collaborator

@Taure Taure commented Mar 11, 2026

Summary

  • Add nova_json_schemas as a dependency for JSON schema validation
  • Add POST /items route with JSON schema validation via extra_state
  • Add create_item.json schema requiring name (string) and quantity (integer)
  • Configure nova_json_schemas plugin in dev sys.config (with render_errors => true)
  • Replace thoas:encode/decode with OTP json:encode/decode in both test suites
  • Update rebar.config.script to preserve extra deps when overriding the nova dependency

Test plan

  • json_schema_valid — POST valid JSON, expect 201 with echoed body
  • json_schema_invalid — POST invalid JSON (wrong types, missing fields), expect 400
  • All 45 existing tests still pass

Dependencies

🤖 Generated with Claude Code

- Add nova_json_schemas as a dependency
- Add JSON schema validation test with create_item schema
- Add create_item controller endpoint with schema-validated POST route
- Configure nova_json_schemas plugin in dev sys.config
- Replace thoas:encode/decode with json:encode/decode in test suites
- Update rebar.config.script to preserve extra deps when overriding nova

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant