openapi: "3.0.3"
info:
  title: "Issue tracker fixture for a drift-check walkthrough"
  version: "1.0.0"
  description: "The issue number is strictly positive and unique per project, which is the constraint the drift check reports on. The labels column is a comma separated list, so a label containing a comma breaks it. The state enum has two members and the closed one is what makes a fixture look finished. The project key is unique and is what the drift check groups by."
paths: {}
x-domain-id: "tut_issues"
x-dialect: "postgres"
components:
  schemas:
    projects:
      type: "object"
      x-primary-key: "id"
      required: ["id", "key", "name"]
      properties:
        id:
          type: "string"
          format: "uuid"
        key:
          type: "string"
          x-unique: true
        name:
          type: "string"
    issues:
      type: "object"
      x-primary-key: "id"
      required: ["id", "project_id", "number", "title", "state", "labels"]
      properties:
        id:
          type: "string"
          format: "uuid"
        project_id:
          $ref: "#/components/schemas/projects"
        number:
          type: "integer"
          minimum: 1
        title:
          type: "string"
        state:
          type: "string"
          enum: ["open", "closed"]
        labels:
          type: "string"
