templates: support include_total for search and categories endpoints; update docs; add tests
This commit is contained in:
@@ -302,6 +302,7 @@ Allowed sort fields (high level):
|
||||
- `sort_by` (str, optional): `name` (default) | `category` | `updated`
|
||||
- `sort_dir` (str, optional): `asc` (default) | `desc`
|
||||
- `active_only` (bool, optional): when `true` (default), only active templates are returned
|
||||
- `include_total` (bool, optional): when `true`, returns `{ items, total }` instead of a plain list
|
||||
- Examples:
|
||||
```bash
|
||||
# Any of the keywords (default)
|
||||
@@ -320,6 +321,7 @@ Allowed sort fields (high level):
|
||||
- `GET /api/templates/categories` - List distinct template categories with counts
|
||||
- Query params:
|
||||
- `active_only` (bool, optional): when `true` (default), only counts active templates
|
||||
- `include_total` (bool, optional): when `true`, returns `{ items, total }` instead of a plain list
|
||||
- Example:
|
||||
```bash
|
||||
curl "http://localhost:6920/api/templates/categories?active_only=false"
|
||||
|
||||
Reference in New Issue
Block a user