Skip to content

feat: add and support json schemas - #3

Merged
franklinkim merged 1 commit into
mainfrom
feature/json-schemas
Jun 25, 2026
Merged

feat: add and support json schemas#3
franklinkim merged 1 commit into
mainfrom
feature/json-schemas

Conversation

@franklinkim

Copy link
Copy Markdown
Member

Description

Add JSON Schemas for NATS and Temporal migration files, and support an object body form ({"$schema": ..., "ops": [...]}) so editors can validate and autocomplete migrations inline.

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 💥 Breaking change
  • 📝 Documentation
  • ♻️ Refactoring
  • 🏃‍➡️ Performance
  • ✅ Tests
  • 🔐 Security
  • 🔧 Build/CI

Changes

  • Add migration.schema.json for both database/nats and database/temporal, describing every op kind.
  • run.go (both drivers) accepts an object body {"$schema", "ops": [...]} in addition to the existing top-level array.
  • Add make schema target validating example migrations against the schemas; wire it into make check.
  • Pin jsonschema tool in .mise.toml.
  • Convert example migrations to the object form with $schema references.
  • Document the object form in database/nats/doc.go and database/temporal/README.md.

Checklist

  • My code adheres to the coding and style guidelines of the project.
  • I have performed a self-review of my own code.
  • I have commented on my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.

@franklinkim
franklinkim merged commit b8668c8 into main Jun 25, 2026
5 of 6 checks passed
@franklinkim
franklinkim deleted the feature/json-schemas branch June 25, 2026 09:23
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