Fake.REST logo
Fake.REST
Topics
Getting started
Dynamic templating
Scripting

Name

Name namespace contains methods that generate random person related data.

Template definitions

{{name.firstName()}} - Generates randomly the First Name, e.g. "John".


{{name.lastName()}} - Generates randomly the Last Name, e.g. "Dow".


{{name.jobArea()}} - Generates randomly the Job Area, e.g. "Program".


{{name.jobDescriptor()}} - Generates randomly the Job Descriptor, e.g. "Global", "Principal" etc.


{{name.jobTitle()}} - Generates randomly the Job Title, e.g. "National Integration Agent".


{{name.jobType()}} - Generates randomly the Job Type, e.g. "Facilitator".


{{name.prefix()}} - Generates randomly the persons prefix, e.g. "Dr.".


{{name.suffix()}} - Generates randomly the persons suffix, e.g. "Jr.".


{{name.title()}} - Generates randomly the title, e.g. "Direct Usability Executive".


The example of a template usage:

{
  "somePerson": {
    "firstName": "{{name.firstName()}}",
    "lastName": "{{name.lastName()}}",
    "jobArea": "{{name.jobArea()}}",
    "jobDescriptor": "{{name.jobDescriptor()}}",
    "jobTitle": "{{name.jobTitle()}}",
    "jobType": "{{name.jobType()}}",
    "prefix": "{{name.prefix()}}",
    "suffix": "{{name.suffix()}}",
    "title": "{{name.title()}}"
  }
}