tuliocll / vscode-data-mock-generator

Generate mock data with your structure

Home Page:https://marketplace.visualstudio.com/items?itemName=tuliocll.vscode-data-mock-generator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vscode Mock Data Generator

Generate mocks from your data structure in JSON format to speed up your tests and development!

How to use

You can choose two ways to mock generation:

🖱️ Creating a object schema (js like)

Create a object with your keys and types directly in your editor:

{
    id: number,
    name: name,
    description: string
}

Then select the object, open the command palette and type: Generate Mock Data and hit enter, type the size and the magic is done 🪄.

⌨️ Typing schema on command pallete:

Open the command palette and type: Generate Mock Data.

EG: `id:number,name:name,avatar:image,city

On the input and put the keys of the object that you want:

You can type the keys using colon character .

Types

Type Description
image Return a string with an image URL
string Return a paragraph
number Return a random int
name Return a string with a random name

TODO

  • Improve validators
  • Create new types
  • Add more mocks
  • Improve "type system" to make easy for add new types
  • Put mocked data on json files

Enjoy!

About

Generate mock data with your structure

https://marketplace.visualstudio.com/items?itemName=tuliocll.vscode-data-mock-generator


Languages

Language:TypeScript 100.0%