Start from a real example
Take a representative JSON payload rather than the smallest possible sample. The better your example, the more useful the generated types will be.
{
"id": 1,
"name": "Ada",
"active": true
}Generate the TypeScript
That payload can become:
export type Root = {
id: number;
name: string;
active: boolean;
};Review edge cases
If arrays mix multiple shapes, or if optional properties are missing from the sample, you may need to refine the generated output by hand.