Skip to content

Field Types

FexAPI supports the following built-in field types in your schema.fexapi file.

Available Types

TypeGenerated ValueExample Output
uuidUUID v4 string"a1b2c3d4-e5f6-7890-abcd-ef1234567890"
stringRandom words (1–4)"lorem ipsum dolor"
numberRandom integer (1–10000)4827
booleantrue or falsetrue
dateISO 8601 date string"2024-03-15T10:30:00.000Z"
emailFake email address"john.smith@example.com"
urlFake URL"https://example.com/path"
nameFull person name"Jane Cooper"
phonePhone number"+1-555-123-4567"

Usage in Schema

txt
GET /users:
  id:uuid
  username:string
  email:email
  fullName:name
  age:number
  website:url
  phone:phone
  verified:boolean
  createdAt:date

Type Validation

If you use an invalid type, fexapi generate will report an error:

Unknown type "integer" in field "age". Valid types: number, string, boolean, date, uuid, email, url, name, phone

Need More Control?

For advanced data generation with specific Faker.js methods, min/max ranges, or custom logic, use YAML custom schemas instead.

Released under the MIT License.