openapi: 3.1.0
info:
  title: Wahre Helden Wiki Reader
  version: 1.0.0
  description: Read-only access to the private Wahre Helden MediaWiki.
servers:
  - url: https://wiki-api.wahrehelden.eu
paths:
  /wiki-reader.php:
    get:
      operationId: wikiReader
      summary: Search the wiki or read a wiki page
      description: Use exactly one of page or search. Use search first when the page name is uncertain; use page when the exact page title is known.
      parameters:
        - name: page
          in: query
          required: false
          description: Exact MediaWiki page title to read.
          schema:
            type: string
        - name: search
          in: query
          required: false
          description: Search term to find relevant wiki pages.
          schema:
            type: string
      responses:
        '200':
          description: Wiki result
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid request
        '401':
          description: Authentication failed
        '404':
          description: Page not found
        '502':
          description: Wiki backend unavailable
