openapi: "3.0.3"
info:
  title: "Preferences API with nullable fields"
  version: "1.0.0"
  description: "This fixture separates four combinations: required and not nullable, required and nullable, optional and not nullable, optional and nullable. The nickname and timezone columns are nullable, so omitting them is valid while sending an empty string is a different thing. The locale column is required with a length check, so it can be null only if the constraint is dropped. The marketing flag is an integer constrained to zero or one, which gives a fourth type to test."
paths: {}
x-domain-id: "prob_nulls"
x-dialect: "postgres"
components:
  schemas:
    users:
      type: "object"
      x-primary-key: "id"
      required: ["id", "email", "display_name", "locale", "marketing"]
      properties:
        id:
          type: "string"
          format: "uuid"
        email:
          type: "string"
          format: "email"
          x-unique: true
        display_name:
          type: "string"
        nickname:
          type: "string"
          nullable: true
        locale:
          type: "string"
          minLength: 2
          maxLength: 5
        timezone:
          type: "string"
          nullable: true
        marketing:
          type: "integer"
          minimum: 0
          maximum: 1
