openapi: "3.0.3"
info:
  title: "Format keyword fixture"
  version: "1.0.0"
  description: "The format table on this page maps nine format keywords to Postgres types. The ip column is the case where a plain inet type is not enough and a check constraint is needed as well. The token column is the case where a length check is the real constraint and the text type says nothing. The duration_ms column is an integer with a non-negative check, which is a format-independent constraint."
paths: {}
x-domain-id: "spec_format"
x-dialect: "postgres"
components:
  schemas:
    events:
      type: "object"
      x-primary-key: "id"
      required: ["id", "occurred_at", "actor", "email", "url", "ip", "duration_ms", "token"]
      properties:
        id:
          type: "string"
          format: "uuid"
        occurred_at:
          type: "string"
          format: "date-time"
        actor:
          type: "string"
          format: "uuid"
        email:
          type: "string"
          format: "email"
        url:
          type: "string"
          format: "uri"
        ip:
          type: "string"
          pattern: "^\\d{1,3}(\\.\\d{1,3}){3}$"
        duration_ms:
          type: "integer"
          minimum: 0
        token:
          type: "string"
          minLength: 16
