grantila / grantila/suretype

Is it possible to create an agnostic version of extractJsonSchema() (and it's utilities)

Open
#29 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
505
Forks
8
PR merge metrics
No merged PRs in 30d

Description

I was wondering about a use-case I have typescript and I want to generate JSON-schema (without creating `suretype` types).

If there can be a utility function (ie: `tsToJsonSchema()`) that can be passed a typescript string and it generates a JSON schema. All utilities in this library rely on the `CoreValidator` or `Validator` _type_ - is there a possible path for building a function that can accomplish this?

> Note: [typescript-to-json-schema](https://www.npmjs.com/package/typescript-json-schema) is a great tool but it's SLOW and IMO convoluted for solving this problem.

Any ideas or thoughts on this?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.