{
 "openapi": "3.1.0",
 "info": {
  "title": "FixedQR QR Code API",
  "version": "0.1.0",
  "description": "Generate static QR codes (never expire). Free tier: no key, 60 requests/minute per IP.",
  "contact": {
   "email": "hello@fixedqr.com"
  }
 },
 "servers": [
  {
   "url": "https://fixedqr.com"
  }
 ],
 "paths": {
  "/api/v1/qr": {
   "get": {
    "operationId": "generateQrGet",
    "summary": "Generate a QR code",
    "parameters": [
     {
      "name": "type",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "url",
        "text",
        "wifi",
        "vcard"
       ],
       "default": "url"
      }
     },
     {
      "name": "data",
      "in": "query",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "ssid",
      "in": "query",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "password",
      "in": "query",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "encryption",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "WPA",
        "WEP",
        "nopass"
       ]
      }
     },
     {
      "name": "hidden",
      "in": "query",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "first_name",
      "in": "query",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "last_name",
      "in": "query",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "phone",
      "in": "query",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "email",
      "in": "query",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "org",
      "in": "query",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "url",
      "in": "query",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "format",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "png",
        "svg"
       ],
       "default": "png"
      }
     },
     {
      "name": "size",
      "in": "query",
      "schema": {
       "type": "integer",
       "default": 512
      }
     },
     {
      "name": "fg",
      "in": "query",
      "schema": {
       "type": "string",
       "default": "#000000"
      }
     },
     {
      "name": "bg",
      "in": "query",
      "schema": {
       "type": "string",
       "default": "#ffffff"
      }
     },
     {
      "name": "ec",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "L",
        "M",
        "Q",
        "H"
       ],
       "default": "M"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "QR image",
      "content": {
       "image/png": {},
       "image/svg+xml": {}
      }
     },
     "400": {
      "$ref": "#/components/responses/Error"
     },
     "429": {
      "$ref": "#/components/responses/Error"
     }
    }
   },
   "post": {
    "operationId": "generateQrPost",
    "summary": "Generate a QR code (JSON body)",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "type": {
          "type": "string",
          "enum": [
           "url",
           "text",
           "wifi",
           "vcard"
          ],
          "default": "url"
         },
         "data": {
          "type": "string"
         },
         "ssid": {
          "type": "string"
         },
         "password": {
          "type": "string"
         },
         "encryption": {
          "type": "string",
          "enum": [
           "WPA",
           "WEP",
           "nopass"
          ]
         },
         "hidden": {
          "type": "boolean"
         },
         "first_name": {
          "type": "string"
         },
         "last_name": {
          "type": "string"
         },
         "phone": {
          "type": "string"
         },
         "email": {
          "type": "string"
         },
         "org": {
          "type": "string"
         },
         "url": {
          "type": "string"
         },
         "format": {
          "type": "string",
          "enum": [
           "png",
           "svg"
          ],
          "default": "png"
         },
         "size": {
          "type": "integer",
          "default": 512
         },
         "fg": {
          "type": "string",
          "default": "#000000"
         },
         "bg": {
          "type": "string",
          "default": "#ffffff"
         },
         "ec": {
          "type": "string",
          "enum": [
           "L",
           "M",
           "Q",
           "H"
          ],
          "default": "M"
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "QR image",
      "content": {
       "image/png": {},
       "image/svg+xml": {}
      }
     },
     "400": {
      "$ref": "#/components/responses/Error"
     },
     "429": {
      "$ref": "#/components/responses/Error"
     }
    }
   }
  }
 },
 "components": {
  "responses": {
   "Error": {
    "description": "Error",
    "content": {
     "application/json": {
      "schema": {
       "type": "object",
       "properties": {
        "error": {
         "type": "string"
        },
        "message": {
         "type": "string"
        }
       }
      }
     }
    }
   }
  },
  "securitySchemes": {
   "apiKey": {
    "type": "http",
    "scheme": "bearer",
    "description": "Optional. Paid API keys (coming soon)."
   }
  }
 }
}