Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,22 @@ This server provides a management interface for job trees and includes a RESTful

* Manages job trees.
* Provides a RESTful API for database management.
* Paginated list endpoints for jobs, stages, and tasks.

## Pagination

The `GET /v1/jobs`, `GET /v1/stages`, and `GET /v1/tasks` list endpoints support `page` (1-based, default `1`) and `page_size` (1–100, default `10`) query parameters.

Responses are wrapped in `{ total, items }` instead of a plain array — `total` is the full match count regardless of page.

```
GET /v1/jobs?page=2&page_size=5
→ { "total": 15, "items": [...5 jobs...] }
```

Requesting beyond the last page returns `items: []`, not an error.

`GET /v1/jobs/:jobId/stages` is scoped to a single job and returns a plain array — a job's stages are bounded in number, so pagination isn't needed there.

**Requirements:**

Expand Down
12 changes: 11 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,18 @@ const AllowedSqlOperators = {
},
};

const AllowedSnakeCaseDestructured = {
selector: 'variable',
modifiers: ['destructured'],
format: null,
filter: {
match: true,
regex: '^page_size$',
},
};

// Create a new array with the base rules and our custom rule
const namingConvention = [...namingConventions, AllowedSqlOperators];
const namingConvention = [...namingConventions, AllowedSqlOperators, AllowedSnakeCaseDestructured];

const customConfig = {
rules: {
Expand Down
Loading
Loading