API-Doku: echte Referenz statt Fantasie-Features
- /de/api komplett neu: reale Endpunkte, Felder, Token-Abilities, Rate-Limit und Statuscodes der API v1 (angelehnt an die Legacy-Doku von businessportal24.com/service/documentation.html); OAuth/SDKs/ Webhooks/Integrations-Behauptungen und api.example.com entfernt - docs/api/v1.yml (OpenAPI 3.1) erstellt — die docs.api.v1-Route lief bisher auf eine nie vorhandene Datei (500er aus Hub-Footer/FAQ) - Token-Vergabe korrekt beschrieben: Selfservice im Konto mit Buchungs-Gate statt 'auf Anfrage'; X-ApiKey-Migrationshinweis - ApiDocumentationTest entskippt + Seiten-Test ergaenzt Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
136ecc8f43
commit
43f563c67f
3 changed files with 534 additions and 55 deletions
|
|
@ -9,5 +9,17 @@ test('api v1 documentation is publicly available', function () {
|
|||
->assertHeader('content-type', 'application/yaml; charset=UTF-8')
|
||||
->assertSee('openapi: 3.1.0', false)
|
||||
->assertSee('/press-releases:', false)
|
||||
->assertSee('Legacy API keys are no longer supported.', false);
|
||||
})->skip('OpenAPI-Spec docs/api/v1.yml ist noch nicht erstellt (eigener API-Doku-Track, siehe dev/migration 2026/07-API-MIGRATION.md). Assertions bleiben erhalten; Skip entfernen, sobald die Datei vorliegt.');
|
||||
->assertSee('legacy API keys are no longer supported', false);
|
||||
});
|
||||
|
||||
test('the public api page documents the real endpoints', function () {
|
||||
/** @var TestCase $this */
|
||||
$this->get('https://pressekonto.test/de/api')
|
||||
->assertSuccessful()
|
||||
->assertSeeText('API-Dokumentation')
|
||||
->assertSee('/press-releases/{id}/submit', false)
|
||||
->assertSee('press-releases:write', false)
|
||||
// Keine Fantasie-Features mehr (OAuth/SDKs/Webhooks gab es nie).
|
||||
->assertDontSee('OAuth 2.0')
|
||||
->assertDontSee('api.example.com');
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue