QuickType: https://app.quicktype.io/
**Product Response: **
{
"id": 1,
"title": "new title",
"price": 10001,
"description": "new description",
"category": {
"id": 5,
"name": "Others",
"image": "https://api.lorem.space/image?w=640&h=480&r=9682"
},
"images": [
""
],
"categoryId": 1
}
Output:
export interface Product {
id: number;
title: string;
price: number;
description: string;
category: Category;
images: string[];
categoryId: number;
}
export interface Category {
id: number;
name: string;
image: string;
}
¿Quieres ver más aportes, preguntas y respuestas de la comunidad?
o inicia sesión.