json-schema-to-ts
json-schema-to-ts copied to clipboard
Getting `unknown` as result type
Hi, I'm trying to parse the JSON schema from this JSON file: https://github.com/jsonresume/resume-schema/blob/master/schema.json
Anyway, when doing so, I just get unknown
as the result type.
This is my code:
import type { FromSchema, JSONSchema } from 'json-schema-to-ts';
import resumeSchema from 'resume-schema/schema.json';
const schema = resumeSchema as const;
export type ResumeSchema = FromSchema<typeof schema>;
Would you mind guiding me on what I'm doing wrong? Thanks in advance!
Yup, it's all there: https://github.com/ThomasAribart/json-schema-to-ts/blob/main/documentation/FAQs/does-json-schema-to-ts-work-on-json-file-schemas.md