{
 "openapi": "3.1.0",
 "info": {
  "title": "The Framing Project mirror check",
  "version": "1",
  "description": "Read only. Checks a custom mirror spec against what The Framing Project (Sydney) makes, prices it in AUD including GST (indicative), and returns a link that opens our mirror studio set up with it. It never orders, quotes or contacts anyone. Guide: https://www.theframingproject.com.au/mirror-guide"
 },
 "servers": [
  {
   "url": "https://www.theframingproject.com.au"
  }
 ],
 "paths": {
  "/mirror-check": {
   "get": {
    "operationId": "checkMirror",
    "summary": "Check and price a custom mirror spec",
    "parameters": [
     {
      "name": "type",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string",
       "enum": [
        "frameless",
        "metal",
        "suspended",
        "timber"
       ]
      }
     },
     {
      "name": "shape",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string",
       "enum": [
        "arch",
        "circle",
        "half-arch",
        "organic",
        "oval",
        "pill",
        "radius-corner",
        "rectangle",
        "round",
        "square",
        "top-radius"
       ]
      }
     },
     {
      "name": "w",
      "in": "query",
      "required": true,
      "description": "Overall width, mm",
      "schema": {
       "type": "integer",
       "minimum": 100,
       "maximum": 3000
      }
     },
     {
      "name": "h",
      "in": "query",
      "required": true,
      "description": "Overall height, mm",
      "schema": {
       "type": "integer",
       "minimum": 100,
       "maximum": 3000
      }
     },
     {
      "name": "round",
      "in": "query",
      "description": "Where the curve sits: arch or top-radius top/right/bottom/left; half-arch top-right/bottom-right/bottom-left/top-left",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "organic",
      "in": "query",
      "description": "Named outline, for shape=organic",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "turn",
      "in": "query",
      "description": "Clockwise degrees instead of round (organic: 0 or 180)",
      "schema": {
       "type": "integer",
       "enum": [
        0,
        90,
        180,
        270
       ]
      }
     },
     {
      "name": "flip",
      "in": "query",
      "description": "Mirror image, organic only",
      "schema": {
       "type": "integer",
       "enum": [
        0,
        1
       ]
      }
     },
     {
      "name": "tint",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "acid-wash",
        "bronze",
        "gray",
        "grey",
        "rustic",
        "silver"
       ]
      }
     },
     {
      "name": "edge",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "polished",
        "bevelled"
       ]
      }
     },
     {
      "name": "qty",
      "in": "query",
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 20
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Priced, with links"
     },
     "400": {
      "description": "A field is wrong; errors name it and what is allowed"
     }
    }
   }
  },
  "/mirror-check/preview.jpg": {
   "get": {
    "operationId": "previewMirror",
    "summary": "A drawn picture of the spec",
    "parameters": [
     {
      "name": "type",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string",
       "enum": [
        "frameless",
        "metal",
        "suspended",
        "timber"
       ]
      }
     },
     {
      "name": "shape",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string",
       "enum": [
        "arch",
        "circle",
        "half-arch",
        "organic",
        "oval",
        "pill",
        "radius-corner",
        "rectangle",
        "round",
        "square",
        "top-radius"
       ]
      }
     },
     {
      "name": "w",
      "in": "query",
      "required": true,
      "description": "Overall width, mm",
      "schema": {
       "type": "integer",
       "minimum": 100,
       "maximum": 3000
      }
     },
     {
      "name": "h",
      "in": "query",
      "required": true,
      "description": "Overall height, mm",
      "schema": {
       "type": "integer",
       "minimum": 100,
       "maximum": 3000
      }
     },
     {
      "name": "round",
      "in": "query",
      "description": "Where the curve sits: arch or top-radius top/right/bottom/left; half-arch top-right/bottom-right/bottom-left/top-left",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "organic",
      "in": "query",
      "description": "Named outline, for shape=organic",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "turn",
      "in": "query",
      "description": "Clockwise degrees instead of round (organic: 0 or 180)",
      "schema": {
       "type": "integer",
       "enum": [
        0,
        90,
        180,
        270
       ]
      }
     },
     {
      "name": "flip",
      "in": "query",
      "description": "Mirror image, organic only",
      "schema": {
       "type": "integer",
       "enum": [
        0,
        1
       ]
      }
     },
     {
      "name": "tint",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "acid-wash",
        "bronze",
        "gray",
        "grey",
        "rustic",
        "silver"
       ]
      }
     },
     {
      "name": "edge",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "polished",
        "bevelled"
       ]
      }
     },
     {
      "name": "qty",
      "in": "query",
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 20
      }
     }
    ],
    "responses": {
     "200": {
      "description": "JPEG",
      "content": {
       "image/jpeg": {}
      }
     }
    }
   }
  }
 }
}