Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DO NOT MERGE: POC using json-schema-to-typescript library #702

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

LeighFinegold
Copy link
Member

@LeighFinegold LeighFinegold commented Dec 24, 2024

This PR contains the early proof-of-concept (PoC) work with model generation #701

Lessons learned will be attached to issue rather than PR.

@LeighFinegold LeighFinegold requested a review from a team as a code owner December 24, 2024 13:58
Copy link

linux-foundation-easycla bot commented Dec 24, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

@LeighFinegold LeighFinegold changed the title WIP: POC using json-schema-to-typescript library DO NOTE MERGE: POC using json-schema-to-typescript library Dec 24, 2024
@LeighFinegold LeighFinegold changed the title DO NOTE MERGE: POC using json-schema-to-typescript library DO NOT MERGE: POC using json-schema-to-typescript library Dec 24, 2024
@@ -0,0 +1,162 @@
export type Metadata = {
Copy link
Member Author

@LeighFinegold LeighFinegold Dec 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These file souldn't be checked in, but doing so for folks to review and see output

@@ -0,0 +1,6 @@
/**
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The library seems to have a bug whereby just defs alone in a file will not generate any definitions. It will generate definitions via a schema which is why core.d.ts has flow definition generated.

export type Metadata = {
[k: string]: unknown;
}[];
export type Metadata1 = {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should MetaData be a general concept which is leveraged by flow.json and core.json to prevent this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Explore Options for CALM Schema to TypeScript Generation - Library Evaluation
1 participant