Skip to content

Replace bespoke JSON schema types with existing types library #27

Done

Description

@colinjlacy

No good reason, honestly. The index signature carried over from the first version so keywords we don't model would still type-check — it wasn't a deliberate design choice. You're right on the other two: type-only deps don't affect runtime JS output, and JSONSchema7 does include $defs (and definitions), so I was wrong there.

One thing to note: because our exported types (ExtensionSchemaItem, ConditionalRule) reference it and tsconfig emits .d.ts files, @types/json-schema would go in dependencies rather than devDependencies (still zero runtime code).

I'd suggest a separate small follow-up since switching to JSONSchema7 means narrowing boolean schemas (JSONSchema7Definition) and handling the wider enum type, which would add noise to this diff. Happy to do it in this PR if you prefer though!

Originally posted by @abhinavkdeval08-design in #25 (comment)

Decision was to do it in a new PR. So...yeah, let's do it!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions