Appearance
Schema Endpoints
Dynamic schema introspection endpoints. Return JSON Schemas or TypeScript types describing the API's request/response structures.
These schemas are dynamically generated from the database, including actual book, chapter, issue, template, and field names as enum values.
Routes
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | /api/schema/get/collection | Bearer | Query schema for collection endpoint |
| GET | /api/schema/get/data | Bearer | Query schema for single item |
| GET | /api/schema/get/item | Bearer | Alias for /schema/get/data |
| GET | /api/schema/delete/collection | Bearer | Delete query schema for collection |
| GET | /api/schema/delete/data | Bearer | Delete query schema for item |
| GET | /api/schema/delete/item | Bearer | Alias for /schema/delete/data |
| GET | /api/schema/patch/data | Bearer | Patch body schema |
| GET | /api/schema/post/data | Bearer | Post body schema |
| GET | /api/schema/put/data | Bearer | Put body schema (single) |
| GET | /api/schema/put/collection | Bearer | Put body schema (batch array) |
| POST | /api/schema/post/token | None | Token request body schema |
TypeScript Output
Add ?type=ts to any GET schema endpoint to receive TypeScript type definitions instead of JSON Schema:
bash
curl "http://localhost:8080/api/schema/get/collection?type=ts" \
-H "Authorization: Bearer API_KEY"Dynamic Enums
The collection and data schemas include enum values populated from the database:
- Books: All book names and IDs
- Chapters: All chapter names and IDs
- Issues: All issue names and IDs
- Templates: All template group names and IDs
- Fields: Field names in format
TemplateName.FieldName
This allows clients to validate query parameters against the actual available values.