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

TypeScript template for fastify-openapi-glue cli? #581

Open
hongkongkiwi opened this issue May 17, 2024 · 1 comment
Open

TypeScript template for fastify-openapi-glue cli? #581

hongkongkiwi opened this issue May 17, 2024 · 1 comment

Comments

@hongkongkiwi
Copy link

Hi there,

Thanks for the great project! It's great to be able to make the OpenAPI specs the source of truth.

Is it possible to add a typescript template to the fastify-openapi-glue generator?

@seriousme
Copy link
Owner

Hi,

last time I checked (few years ago) there was no stable way to generate Typescript types from OpenApi types.
The generator itself allows for extra templating (see https://github.com/seriousme/fastify-openapi-glue/tree/master/lib/templates). If you have ideas on how to template the types (without resorting to too much magic) then I'm happy to look into that.

There are plans to add Type annotations to Javascript (https://github.com/tc39/proposal-type-annotations), so I was hoping to piggyback on that one.

Kind regards,
Hans

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

No branches or pull requests

2 participants