mmkal / mmkal/trpc-cli

overridable toJsonSchema function

Open
#142 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
373
Forks
13
PR merge metrics
No merged PRs in 30d

Description

Right now trpc-cli handles conversion to json schema. But to support other more niche validation libraries, as well as to allow customising json schema output, it'd be good to be able to pass in a toJsonSchema function. Note: should probably keep track of https://github.com/standard-schema/standard-schema/issues/21 when considering the function signature, but maybe this function doesn't need options at all - it can just use whatever library and whatever options internally.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the current trpc-cli JSON Schema conversion entry point and reviewing standard-schema issue #21 for possible function-signature constraints. Define how callers would provide a custom toJsonSchema function and verify that custom validation libraries and schema options can be supported without breaking existing conversion behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.