{
  "openapi": "3.1.1",
  "info": {
    "title": "Vragguiden Public Read API",
    "description": "Read-only API for searching and discovering wrecks on Vragguiden.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://www.vragguiden.dk/"
    }
  ],
  "paths": {
    "/api/search/results": {
      "get": {
        "tags": [
          "VragguidenBlazor"
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "visning",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/sitemap.xml": {
      "get": {
        "tags": [
          "CrawlerFiles"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/llms.txt": {
      "get": {
        "tags": [
          "CrawlerFiles"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/robots.txt": {
      "get": {
        "tags": [
          "CrawlerFiles"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ExternalLink/go/{linkId}": {
      "get": {
        "tags": [
          "ExternalLink"
        ],
        "parameters": [
          {
            "name": "linkId",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/GoogleMapsConfig/apikey": {
      "get": {
        "tags": [
          "GoogleMapsConfig"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Image/{imageId}": {
      "delete": {
        "tags": [
          "Image"
        ],
        "parameters": [
          {
            "name": "imageId",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Image/{imageId}/candelete": {
      "get": {
        "tags": [
          "Image"
        ],
        "parameters": [
          {
            "name": "imageId",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/vragguiden.kml": {
      "get": {
        "tags": [
          "Kml"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/map/all": {
      "get": {
        "tags": [
          "Map"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/map/wrecks": {
      "get": {
        "tags": [
          "Map"
        ],
        "parameters": [
          {
            "name": "lat",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
              "type": [
                "number",
                "string"
              ],
              "format": "double"
            }
          },
          {
            "name": "lng",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
              "type": [
                "number",
                "string"
              ],
              "format": "double"
            }
          },
          {
            "name": "radius",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
              "type": [
                "number",
                "string"
              ],
              "format": "double",
              "default": 50
            }
          },
          {
            "name": "focusId",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/map/pan": {
      "post": {
        "tags": [
          "Map"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PanRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PanRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PanRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/og-image": {
      "get": {
        "tags": [
          "OgImage"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/og-image/wreck/{wreckId}": {
      "get": {
        "tags": [
          "OgImage"
        ],
        "parameters": [
          {
            "name": "wreckId",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/QrCode/wreck/{wreckId}": {
      "get": {
        "tags": [
          "QrCode"
        ],
        "parameters": [
          {
            "name": "wreckId",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "size",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 400
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/QrCode/url": {
      "get": {
        "tags": [
          "QrCode"
        ],
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "size",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 400
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/QrCode/status": {
      "get": {
        "tags": [
          "QrCode"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/search/suggest": {
      "get": {
        "tags": [
          "Search"
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/StaticMap/{wreckId}": {
      "get": {
        "tags": [
          "StaticMap"
        ],
        "parameters": [
          {
            "name": "wreckId",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "zoom",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 9
            }
          },
          {
            "name": "width",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 640
            }
          },
          {
            "name": "height",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 300
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/StaticMap/{wreckId}/cached": {
      "get": {
        "tags": [
          "StaticMap"
        ],
        "parameters": [
          {
            "name": "wreckId",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/StaticMap/status": {
      "get": {
        "tags": [
          "StaticMap"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/StaticMap/cache": {
      "delete": {
        "tags": [
          "StaticMap"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Thumbnail/wreck/{imageId}.{extension}": {
      "get": {
        "tags": [
          "Thumbnail"
        ],
        "parameters": [
          {
            "name": "imageId",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "extension",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "w",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 200
            }
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 80
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Thumbnail/wreck/{imageId}.{extension}/{size}": {
      "get": {
        "tags": [
          "Thumbnail"
        ],
        "parameters": [
          {
            "name": "imageId",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "extension",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "size",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/tracking/visit": {
      "post": {
        "tags": [
          "Tracking"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VisitRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/VisitRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/VisitRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/WreckPdf/{wreckId}": {
      "get": {
        "tags": [
          "WreckPdf"
        ],
        "parameters": [
          {
            "name": "wreckId",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/wrecks/search": {
      "get": {
        "tags": [
          "WrecksV1"
        ],
        "operationId": "searchWrecks",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WreckSearchResponseDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/wrecks/autocomplete": {
      "get": {
        "tags": [
          "WrecksV1"
        ],
        "operationId": "autocompleteWrecks",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WreckAutocompleteResponseDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/wrecks/{id}": {
      "get": {
        "tags": [
          "WrecksV1"
        ],
        "operationId": "getWreckById",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WreckDetailDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/wrecks/nearby": {
      "get": {
        "tags": [
          "WrecksV1"
        ],
        "operationId": "findNearbyWrecks",
        "parameters": [
          {
            "name": "lat",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
              "type": [
                "number",
                "string"
              ],
              "format": "double"
            }
          },
          {
            "name": "lon",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
              "type": [
                "number",
                "string"
              ],
              "format": "double"
            }
          },
          {
            "name": "radiusKm",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
              "type": [
                "number",
                "string"
              ],
              "format": "double",
              "default": 25
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WreckNearbyResponseDto"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "GeoPointDto": {
        "required": [
          "lat",
          "lon"
        ],
        "type": "object",
        "properties": {
          "lat": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "lon": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "PanRequest": {
        "required": [
          "mode",
          "focusId"
        ],
        "type": "object",
        "properties": {
          "mode": {
            "type": [
              "null",
              "string"
            ]
          },
          "focusId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "VisitRequest": {
        "required": [
          "browserId"
        ],
        "type": "object",
        "properties": {
          "browserId": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "WreckAutocompleteResponseDto": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string"
          },
          "suggestions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WreckSuggestionDto"
            }
          }
        }
      },
      "WreckCardDto": {
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "name": {
            "type": "string"
          },
          "summary": {
            "type": [
              "null",
              "string"
            ]
          },
          "url": {
            "type": "string"
          },
          "position": {
            "$ref": "#/components/schemas/WreckPositionDto"
          },
          "depth": {
            "$ref": "#/components/schemas/WreckDepthDto"
          },
          "distanceKm": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "type": {
            "type": [
              "null",
              "string"
            ]
          },
          "hasImages": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "imageCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "matchReasons": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "WreckDepthDto": {
        "type": "object",
        "properties": {
          "minMeters": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "maxMeters": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "WreckDetailDto": {
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "name": {
            "type": "string"
          },
          "summary": {
            "type": [
              "null",
              "string"
            ]
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "url": {
            "type": "string"
          },
          "position": {
            "$ref": "#/components/schemas/WreckPositionDto"
          },
          "depth": {
            "$ref": "#/components/schemas/WreckDepthDto"
          },
          "distanceFromCoastKm": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "type": {
            "type": [
              "null",
              "string"
            ]
          },
          "hasImages": {
            "type": "boolean"
          },
          "imageCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "lastUpdated": {
            "type": [
              "null",
              "string"
            ]
          },
          "links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WreckLinkDto"
            }
          }
        }
      },
      "WreckLinkDto": {
        "required": [
          "rel",
          "href"
        ],
        "type": "object",
        "properties": {
          "rel": {
            "type": "string"
          },
          "href": {
            "type": "string"
          }
        }
      },
      "WreckNearbyResponseDto": {
        "type": "object",
        "properties": {
          "center": {
            "$ref": "#/components/schemas/GeoPointDto"
          },
          "radiusKm": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WreckCardDto"
            }
          }
        }
      },
      "WreckPositionDto": {
        "type": "object",
        "properties": {
          "lat": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "lon": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "datum": {
            "type": "string"
          },
          "verified": {
            "type": "boolean"
          },
          "precision": {
            "type": "string"
          }
        }
      },
      "WreckSearchResponseDto": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string"
          },
          "limit": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WreckCardDto"
            }
          }
        }
      },
      "WreckSuggestionDto": {
        "required": [
          "id",
          "name",
          "url"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "name": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "VragguidenBlazor"
    },
    {
      "name": "CrawlerFiles"
    },
    {
      "name": "ExternalLink"
    },
    {
      "name": "GoogleMapsConfig"
    },
    {
      "name": "Image"
    },
    {
      "name": "Kml"
    },
    {
      "name": "Map"
    },
    {
      "name": "OgImage"
    },
    {
      "name": "QrCode"
    },
    {
      "name": "Search"
    },
    {
      "name": "StaticMap"
    },
    {
      "name": "Thumbnail"
    },
    {
      "name": "Tracking"
    },
    {
      "name": "WreckPdf"
    },
    {
      "name": "WrecksV1"
    }
  ]
}