String

The String field generates a random string of various types and lengths.

Schema

fields:
  - name: Words
    type: String
    args:
      subtype: Words
      range:
        start: 0
        end: 10
    null_probability: 0.5
  - name: Paragraph
    type: String
    args:
      subtype:
      range:
        start: 1
        end: 3
    constraints:
      - type: IfNull
        name: Name

Ouput

WordsParagraph
quo repellat qui voluptatem dolor.
perspiciatis sapiente aut voluptatibus molestias qui a placeat.
dicta animi distinctio est.
consequuntur fugit praesentium vero.
natus omnis reiciendis officia.
quia sequi esse qui.
est animi voluptas deleniti id.
sint quia cumque eum.
illo incidunt quo adipisci recusandae.
temporibus molestiae rerum culpa.
perspiciatis voluptas qui
sint illum itaque totam

Arguments

NameTypeDescriptionDefault
subtypestringThe type of string to generate. One of Words, Sentences, Paragraphs.Words
range.startRangeThe minimum length of 'things' to generate.1
range.endRangeThe maximum length of 'things' to generate.2

Field arguments

NameTypeDescriptionDefault Value
null_probabilityfloatThe probability that the field will be null.0.0
constraintslistA list of constraints to apply to the field.[]

Supported constraints

NameDescription
IfNullThe value must only be non-null if another field is null.