{
  "openapi": "3.1.0",
  "info": {
    "title": "Industrial Machine Monitoring API",
    "version": "1.0"
  },
  "paths": {
    "/machine-reports/{reportId}": {
      "get": {
        "responses": {
          "200": {
            "description": "Machine report",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MachineReport"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "MachineReport": {
        "required": [
          "id",
          "date",
          "machineId",
          "condition"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "[a-z]{3}-[0-9]{10}"
          },
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "condition": {
            "required": [
              "conditionComment",
              "conditionStatus"
            ],
            "properties": {
              "conditionComment": {
                "type": "string"
              },
              "conditionStatus": {
                "type": "string",
                "enum": [
                  "green",
                  "orange",
                  "red"
                ]
              }
            }
          },
          "machineId": {
            "type": "integer"
          },
          "status": {
            "type": "string",
            "enum": [
              "running",
              "stopped",
              "maintenance"
            ]
          },
          "temperature": {
            "type": "number",
            "description": "Farhenheit."
          },
          "pressure": {
            "type": "number",
            "description": "Kilopascals."
          }
        }
      }
    }
  }
}