F-API-3 (owner: follow OpenAPI 3.1). - GET /api/v1/openapi.json (admins) and `sharestead -openapi` produce an OpenAPI 3.1.0 document: JSON Schema 2020-12 generated by reflection from the request and response types the handlers use (requests and the former map responses are named types now), enums for fixed values, nullable as type [x, "null"], session cookie + CSRF header as security schemes, RFC 9457 problem details for every error status, operation per route with area, summary, description and required scope. - Tests: every registered route must have documentation (and vice versa), $refs resolve, operation IDs are unique. - CI: the document is linted with Redocly CLI (pinned dev dependency), rule set recommended-strict; one documented exception (auth/status always answers 200). - UI: "API" page — how to authenticate with a curl example, download of openapi.json, search, operations grouped by area with parameters, request/response field tables and example bodies, "Try it" for GET. Verified on CT 151: 39 paths / 47 operations, 74 schemas, 401 without a session; lint passes locally. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5 lines
170 B
YAML
5 lines
170 B
YAML
# OpenAPI lint (Redocly CLI): the recommended rules for OpenAPI 3.1, with
|
|
# warnings treated as errors. Generated by: sharestead -openapi
|
|
extends:
|
|
- recommended-strict
|