openapi: "3.0.3"
info:
  title: "User profiles API"
  version: "1.0.0"
  description: "The bio check constraint rejects a blank string, which is the classic case of a required field that a generator fills with an empty string. The locale check allows two to five characters, which covers en, en-GB and de-CH. The avatar_url is nullable, so the invalid instance here is a malformed URL rather than a missing field. The email uniqueness means the fixture has to de-duplicate, which changes the row count."
paths: {}
x-domain-id: "prob_profiles"
x-dialect: "postgres"
components:
  schemas:
    users:
      type: "object"
      x-primary-key: "id"
      required: ["id", "email", "display_name", "locale", "created_at"]
      properties:
        id:
          type: "string"
          format: "uuid"
        email:
          type: "string"
          format: "email"
          x-unique: true
        display_name:
          type: "string"
        bio:
          type: "string"
          pattern: ".*\\S.*"
          nullable: true
        avatar_url:
          type: "string"
          format: "uri"
          nullable: true
        locale:
          type: "string"
          minLength: 2
          maxLength: 5
        created_at:
          type: "string"
          format: "date-time"
