{
 "openapi": "3.1.0",
 "info": {
  "title": "Airffic Inspection API",
  "version": "1.0.0",
  "description": "Read-only API for the Airffic Inspection drone-inspection guide (Japanese/English): 24 asset types, 15 operating environments, technology chapters, case studies, frequently cited papers, national drone regulations and curated country sources, plus GSD / coverage / cost calculators. No authentication. Respect reviewScope: only full_text means the source body was read. Country lists are curated selections, not readership rankings."
 },
 "servers": [
  {
   "url": "https://inspection.airfficworld.com"
  }
 ],
 "paths": {
  "/v1/search": {
   "get": {
    "operationId": "searchGuide",
    "summary": "Search the whole guide",
    "parameters": [
     {
      "name": "q",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string",
       "description": "Keywords in Japanese or English"
      }
     },
     {
      "name": "lang",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "enum": [
        "ja",
        "en"
       ],
       "default": "en"
      }
     },
     {
      "name": "type",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "enum": [
        "asset",
        "environment",
        "chapter",
        "case",
        "paper",
        "regulation",
        "country-source"
       ]
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 50,
       "default": 10
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Ranked results with page URLs",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "404": {
      "description": "Unknown id (the error lists valid ids)",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     }
    }
   }
  },
  "/v1/assets": {
   "get": {
    "operationId": "listAssets",
    "summary": "List the 24 inspected asset types",
    "responses": {
     "200": {
      "description": "Asset list",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "404": {
      "description": "Unknown id (the error lists valid ids)",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     }
    }
   }
  },
  "/v1/assets/{id}": {
   "get": {
    "operationId": "getAsset",
    "summary": "Full guide for one asset type",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "enum": [
        "bridge",
        "expressway",
        "tunnel",
        "slope-levee",
        "dam",
        "sewer",
        "utility-tunnel",
        "condominium",
        "building",
        "chimney",
        "power-line",
        "transmission-tower",
        "telecom-tower",
        "solar",
        "wind-turbine",
        "plant",
        "piping",
        "storage-tank",
        "boiler",
        "mine",
        "pipeline",
        "railway",
        "port",
        "ship"
       ]
      }
     },
     {
      "name": "lang",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "enum": [
        "ja",
        "en"
       ],
       "default": "en"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Asset guide",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "404": {
      "description": "Unknown id (the error lists valid ids)",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     }
    }
   }
  },
  "/v1/environments": {
   "get": {
    "operationId": "listEnvironments",
    "summary": "List the 15 operating environments",
    "responses": {
     "200": {
      "description": "Environment list",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "404": {
      "description": "Unknown id (the error lists valid ids)",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     }
    }
   }
  },
  "/v1/environments/{id}": {
   "get": {
    "operationId": "getEnvironment",
    "summary": "Guide for one operating environment",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "enum": [
        "gnss-denied",
        "confined",
        "dark",
        "height",
        "wind",
        "magnetic",
        "emi",
        "water",
        "dust",
        "heat",
        "cold",
        "explosive",
        "radiation",
        "toxic-gas",
        "urban"
       ]
      }
     },
     {
      "name": "lang",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "enum": [
        "ja",
        "en"
       ],
       "default": "en"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Environment guide",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "404": {
      "description": "Unknown id (the error lists valid ids)",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     }
    }
   }
  },
  "/v1/cases": {
   "get": {
    "operationId": "listCases",
    "summary": "Documented drone inspection case studies",
    "parameters": [
     {
      "name": "asset",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "enum": [
        "bridge",
        "expressway",
        "tunnel",
        "slope-levee",
        "dam",
        "sewer",
        "utility-tunnel",
        "condominium",
        "building",
        "chimney",
        "power-line",
        "transmission-tower",
        "telecom-tower",
        "solar",
        "wind-turbine",
        "plant",
        "piping",
        "storage-tank",
        "boiler",
        "mine",
        "pipeline",
        "railway",
        "port",
        "ship"
       ]
      }
     },
     {
      "name": "country",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "ISO 3166-1 alpha-2"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "default": 50
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Cases",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "404": {
      "description": "Unknown id (the error lists valid ids)",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     }
    }
   }
  },
  "/v1/papers": {
   "get": {
    "operationId": "listPapers",
    "summary": "Frequently cited papers",
    "parameters": [
     {
      "name": "topic",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Topic filter"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Papers",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "404": {
      "description": "Unknown id (the error lists valid ids)",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     }
    }
   }
  },
  "/v1/regulations/{country}": {
   "get": {
    "operationId": "getRegulation",
    "summary": "Drone rules relevant to inspection for one country",
    "parameters": [
     {
      "name": "country",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "enum": [
        "JP",
        "KR",
        "CN",
        "IN",
        "SG",
        "VN",
        "TH",
        "ID",
        "AU",
        "NZ",
        "US",
        "CA",
        "MX",
        "BR",
        "CL",
        "AR",
        "GB",
        "DE",
        "FR",
        "ES",
        "IT",
        "NL",
        "CH",
        "SE",
        "NO",
        "DK",
        "AE",
        "SA",
        "ZA",
        "IL"
       ]
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Regulation entry",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "404": {
      "description": "Unknown id (the error lists valid ids)",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     }
    }
   }
  },
  "/v1/countries/{country}/sources": {
   "get": {
    "operationId": "listCountrySources",
    "summary": "Curated influential sources on drone inspection in one country",
    "parameters": [
     {
      "name": "country",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "enum": [
        "JP",
        "KR",
        "CN",
        "IN",
        "SG",
        "VN",
        "TH",
        "ID",
        "AU",
        "NZ",
        "US",
        "CA",
        "MX",
        "BR",
        "CL",
        "AR",
        "GB",
        "DE",
        "FR",
        "ES",
        "IT",
        "NL",
        "CH",
        "SE",
        "NO",
        "DK",
        "AE",
        "SA",
        "ZA",
        "IL"
       ]
      }
     },
     {
      "name": "asset",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "enum": [
        "bridge",
        "expressway",
        "tunnel",
        "slope-levee",
        "dam",
        "sewer",
        "utility-tunnel",
        "condominium",
        "building",
        "chimney",
        "power-line",
        "transmission-tower",
        "telecom-tower",
        "solar",
        "wind-turbine",
        "plant",
        "piping",
        "storage-tank",
        "boiler",
        "mine",
        "pipeline",
        "railway",
        "port",
        "ship"
       ]
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "default": 30
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Country sources",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "404": {
      "description": "Unknown id (the error lists valid ids)",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     }
    }
   }
  },
  "/v1/calc/gsd": {
   "post": {
    "operationId": "calcGsd",
    "summary": "Ground sampling distance, footprint, motion blur",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "sensorWidthMm",
         "focalLengthMm",
         "imageWidthPx",
         "distanceM"
        ],
        "properties": {
         "sensorWidthMm": {
          "type": "number",
          "description": "Sensor width (mm)"
         },
         "focalLengthMm": {
          "type": "number",
          "description": "Focal length (mm)"
         },
         "imageWidthPx": {
          "type": "number",
          "description": "Image width (px)"
         },
         "imageHeightPx": {
          "type": "number",
          "description": "Image height (px)"
         },
         "distanceM": {
          "type": "number",
          "description": "Distance to surface (m)"
         },
         "speedMps": {
          "type": "number",
          "description": "Speed (m/s)"
         },
         "shutterS": {
          "type": "number",
          "description": "Shutter time (s)"
         },
         "targetGsdMm": {
          "type": "number",
          "description": "Target GSD (mm/px)"
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "GSD result",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "404": {
      "description": "Unknown id (the error lists valid ids)",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     }
    }
   }
  },
  "/v1/calc/coverage": {
   "post": {
    "operationId": "calcCoverage",
    "summary": "Images and minutes to grid-photograph a surface",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "surfaceWidthM",
         "surfaceHeightM",
         "footprintWidthM",
         "footprintHeightM"
        ],
        "properties": {
         "surfaceWidthM": {
          "type": "number",
          "description": "m"
         },
         "surfaceHeightM": {
          "type": "number",
          "description": "m"
         },
         "footprintWidthM": {
          "type": "number",
          "description": "m"
         },
         "footprintHeightM": {
          "type": "number",
          "description": "m"
         },
         "frontOverlap": {
          "type": "number",
          "description": "0–0.95"
         },
         "sideOverlap": {
          "type": "number",
          "description": "0–0.95"
         },
         "secondsPerImage": {
          "type": "number",
          "description": "s"
         },
         "transitionSPerLine": {
          "type": "number",
          "description": "s"
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Coverage result",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "404": {
      "description": "Unknown id (the error lists valid ids)",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     }
    }
   }
  },
  "/v1/calc/cost": {
   "post": {
    "operationId": "calcCost",
    "summary": "Compare conventional vs drone-assisted cost from your inputs",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "conventional",
         "drone"
        ],
        "properties": {
         "conventional": {
          "type": "object",
          "additionalProperties": {
           "type": "number"
          }
         },
         "drone": {
          "type": "object",
          "additionalProperties": {
           "type": "number"
          }
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Cost comparison",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "404": {
      "description": "Unknown id (the error lists valid ids)",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     }
    }
   }
  }
 }
}