Skip to content

Add schema validation to Cursorless api boundary #983

@pokey

Description

@pokey

For all places where the Cursorless extension ingests data from the outside world, we should validate against a schema. Here are a few such places:

  • Cursorless command arguments (both primary cursorless.command action and others, eg experimental keyboard)
  • Custom snippets (and built-in snippets)
  • Settings
  • other places?

We'd like to define these schemas using zod. This library will automatically allow Typescript to infer types. We can start by using ts-to-zod to generate initial schema

For custom snippets and settings, we can look into automatically generating json schema using zod-to-json-schema so that we have a single source of truth

Metadata

Metadata

Assignees

No one assigned

    Labels

    code qualityImprovements to code quality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions