openapi: "3.0.3"
info:
  title: "Customer records API"
  version: "1.0.0"
  description: "The whole fixture is one table, so the only interesting constraint is the unique email. The country check constraint rejects full country names, which hosted generators often produce. A hosted generator sends the schema definition off the machine, which is the point of comparison on this page. The signup_date column is a timestamp and must be written in a form Postgres accepts without an explicit cast."
paths: {}
x-domain-id: "mockaroo_crm"
x-dialect: "postgres"
components:
  schemas:
    customers:
      type: "object"
      x-primary-key: "id"
      required: ["id", "first_name", "last_name", "email", "country", "signup_date"]
      properties:
        id:
          type: "string"
          format: "uuid"
        first_name:
          type: "string"
        last_name:
          type: "string"
        email:
          type: "string"
          format: "email"
          x-unique: true
        country:
          type: "string"
          minLength: 2
          maxLength: 2
        signup_date:
          type: "string"
          format: "date-time"
