{
  "openapi": "3.0.9",
  "info": {
    "title": "TransStop API",
    "version": "2026-01-30-28c2ff3",
    "description": "API voor het omzetten van een STOP-regeling (ZIP met regeling + afbeeldingen) naar een bewerkbaar DOCX-bestand.\n\n## Release Notes\n\n**2025-01-09-1**\n- Fix: Geneste lijstnummering (Romeinse cijfers I., II., III.) correct weergeven\n\n**2025-10-30-1**\n- Initiële release"
  },
  "servers": [
    {
      "url": "http://giskit-word-api.elk.solutions",
      "description": "Production server"
    }
  ],
  "paths": {
    "/stop2docx": {
      "post": {
        "summary": "Converteer STOP-regeling ZIP naar DOCX",
        "description": "Ontvangt een ZIP-bestand met een regelingversie volgens de STOP-standaard (inclusief afbeeldingen) en retourneert een DOCX-bestand.\n\nVereist een geldige `X-API-Key` header.",
        "operationId": "stop2docx",
        "security": [
          { "apiKeyAuth": [] }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/zip": {
              "schema": {
                "type": "string",
                "format": "binary",
                "description": "ZIP-bestand met de RegelingVersie en bijbehorende middelen (afbeeldingen e.d.) volgens de STOP-standaard."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "DOCX-bestand met de geconverteerde regeling.",
            "headers": {
              "Content-Disposition": {
                "description": "Bestandsnaam van de download.",
                "schema": {
                  "type": "string",
                  "example": "attachment; filename=\"regeling.docx\""
                }
              }
            },
            "content": {
              "application/vnd.openxmlformats-officedocument.wordprocessingml.document": {
                "schema": {
                  "type": "string",
                  "format": "binary",
                  "description": "Het gegenereerde DOCX-bestand."
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige request (bijv. geen bestand geüpload).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Geen of ongeldige API-key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "missingApiKey": {
                    "summary": "Ontbrekende of ongeldige API-key",
                    "value": {
                      "status": 403,
                      "message": "Forbidden: missing or invalid API-key"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Input kon niet verwerkt worden (bijv. geen geldige STOP-versie, ontbrekende resources of technische fout tijdens conversie).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalidZip": {
                    "summary": "Ongeldige STOP-ZIP",
                    "value": {
                      "status": 422,
                      "message": "Input ZIP is not a valid STOP-regeling package",
                      "details": [
                        "manifest.xml ontbreekt",
                        "Afbeelding 'kaart1.png' niet gevonden"
                      ]
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Interne serverfout tijdens conversie.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "Voeg de header `X-API-Key: &lt;jouw-sleutel&gt;` toe aan elke request."
      }
    },
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "required": ["status", "message"],
        "properties": {
          "status": {
            "type": "integer",
            "description": "HTTP-statuscode"
          },
          "message": {
            "type": "string",
            "description": "Beschrijving van de fout."
          },
          "details": {
            "type": "array",
            "items": { "type": "string" },
            "description": "Optionele lijst met specifieke problemen die gevonden zijn."
          }
        }
      }
    }
  }
}