Generator playground
Paste an OpenAPI document and see the TypeScript that generateTs writes for it. The playground runs the same generator as the Ktor plugin, compiled to JavaScript, so nothing leaves your browser.
Loading the generator...
How to use it
- Get the OpenAPI document of your API. In an app with
generateTsit is the committedfrontend/src/lib/api/openapi.json. - Paste it above.
- Read the generated
types.tsandservices.ts, and compare them with what Generated TypeScript describes.
What is different in a real project
- Only paths under the API prefix are kept, as in your app.
- The document must be JSON, which is what Ktor produces.
- In a real project the generator also adds the
LucideIcontype whenlucideis enabled andreadPublicConfig()when you setpublicConfig, so those are missing here.
See Generated TypeScript for what each file contains and how to use it, and Calling the API for how to call the result.