npm: json-server
Posts
-> /schemas/posts.ts
Users
-> /schemas/users.ts
Todos
-> /schemas/todos.ts
Posts
-> /db/posts.json
Users
-> /db/users.json
Todos
-> /db/todos.json
plugin vscode: Past JSON as Code
- Select a part of json file
{
"userId": 1,
"id": 1,
"title": "delectus aut autem",
"completed": false
}
-
Selec from command tool > Open quicktype for JSON Schema
-
That will create a new interface schema.