浏览代码

fixing openapi

Medowar 1 月之前
父节点
当前提交
5d43ffb85c
共有 3 个文件被更改,包括 3 次插入1 次删除
  1. 1 0
      api-docs/.htaccess
  2. 1 0
      index.php
  3. 1 1
      openapi.yaml

+ 1 - 0
api-docs/.htaccess

@@ -0,0 +1 @@
+DirectoryIndex index.html

+ 1 - 0
index.php

@@ -44,6 +44,7 @@ header('Content-Type: text/html; charset=UTF-8');
             <div class="hero__actions">
                 <a class="button button--primary" href="<?= htmlspecialchars(app_url('/admin/'), ENT_QUOTES) ?>">Adminpanel</a>
                 <a class="button button--ghost" href="<?= htmlspecialchars(app_url('/api/v1/status.php'), ENT_QUOTES) ?>" target="_blank" rel="noreferrer">Status JSON</a>
+                <a class="button button--ghost" href="<?= htmlspecialchars(app_url('/api-docs/'), ENT_QUOTES) ?>" target="_blank" rel="noreferrer">OpenAPI/Swagger</a>
             </div>
         </header>
 

+ 1 - 1
openapi.yaml

@@ -246,7 +246,7 @@ paths:
                             state: ok
                             measured_at: '2026-04-15T19:20:00+00:00'
                             updated_at: '2026-04-15T19:20:02+00:00'
-                          alert_below_units: 2
+                            alert_below_units: 2
                     alerts:
                       - id: alert_680004979d8512.07480974
                         created_at: '2026-04-15T19:20:02+00:00'