datagenDocsDocsExamplesExamplesDemoDemoDownloadsDownloads
GitHubGitHub (opens in a new tab)
  • Introduction
  • Generators
    • array
    • object
    • integer
    • number
    • string
    • bool
    • counter
    • anyOf
    • flatten
    • plugin
    • reference
    • file
    • include
  • Plugins
    • Creating plugins
    • Default Plugins
      • openaddresses-plugin
      • progress-plugin
      • upload-plugin
      • sql-plugin
    • Node.js plugins
      • Creating node.js plugins
      • Using node.js plugins
    • Using plugins
  • Transformers
    • filter
    • filterNonNull
    • randomRemove
    • removeAll
    • regexFilter
    • sort
    • toUpperCase
    • toLowerCase
    • toString
    • chooseFromArray
    • plugin
  • Packages
    • @datagen-rs/cli
    • @datagen-rs/node
    • @datagen-rs/types
    • datagen-rs-cli
    • datagen-rs
    • datagen-rs-node-runner
  • Additional Features
    • Environment Variables
  • Docker
  • Options

On This Page

  • Example
Question? Give us feedback → (opens in a new tab)Edit this page
Docs
Generators
object

object

In order to generate an object, you can use the object generator, which has the following input:

  • properties: An object containing the properties of the object

Example

Generate an object with two properties:

{
  "type": "object",
  "properties": {
    "field1": {
      "type": "string",
      "value": "test"
    },
    "field2": {
      "type": "string",
      "value": "test"
    }
  }
}
arrayinteger

MIT 2024 © MarkusJx.