Revert "API: generate /api/state documentation from UI types" (#32109)

This commit is contained in:
andig 2026-07-24 11:24:23 +02:00 • committed by GitHub
parent cd9812ef14
commit 9c88523682
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
42 changed files with 3359 additions and 8732 deletions

View file

@ -1,28 +0,0 @@
import { test, expect } from "@playwright/test";
import { start, stop, baseUrl } from "./evcc";
import { validateState } from "../scripts/state-schema/validate";
test.use({ baseURL: baseUrl() });
const CONFIG = "cmd/demo.yaml";
test.beforeAll(async () => {
await start(CONFIG);
});
test.afterAll(async () => {
await stop();
});
test("/api/state matches the openapi State schema", async ({ request }) => {
// loadpoint values appear over the first update cycles, poll until stable
await expect
.poll(
async () => {
const res = await request.get("/api/state");
const { errors, undocumented } = validateState(await res.json());
return [...errors, ...undocumented];
},
{ timeout: 30000 }
)
.toEqual([]);
});