Skip to content

[O2B-1623] Document the detectors endpoint in the HTTP API documentation - #2264

Merged
graduta merged 3 commits into
mainfrom
feature/O2B-1623/docs-detectors-endpoint
Oct 22, 2026
Merged

graduta merged 3 commits into
mainfrom
feature/O2B-1623/docs-detectors-endpoint

Conversation

@graduta

@graduta graduta commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

I have a JIRA ticket

  • branch and/or PR name(s) include(s) JIRA ID
  • issue has "Fix version" assigned
  • issue "Status" is set to "In review"
  • PR labels are selected

Part of a stack of PRs documenting the HTTP API (O2B-1623). The earlier PRs of the stack (#2261, #2262, #2263) are merged: this one is rebased on main and regenerated with the current generator. The following PRs of the stack are rebased one by one, once the previous one is merged.

Notable changes for users:

  • The detectors endpoints are now documented at /api-docs, with parameters, responses and curl examples:
    • GET /api/detectors: all detectors sorted by name, with their type. createdAt and updatedAt are no longer returned (see below)

Notable changes for developers:

  • DetectorAdapter.toEntity (only used by GET /api/detectors) no longer returns createdAt and updatedAt: nothing uses them (the GUI only reads type and name in detectorsProvider). The Detector typedef is updated and gets its missing id. The API test checks the returned keys.
  • lib/server/api-docs/openapi.yaml is updated by hand, API.md and index.html are regenerated with npm run docs:api (separate commit).

Changes made to the database:

  • None

🤖 Generated with Claude Code

@graduta
graduta added this pull request to stack #2265 October 20, 2026 12:55
@graduta
graduta requested a review from isaachilly as a code owner October 20, 2026 12:55
@graduta graduta changed the title feature/O2B 1623/docs detectors endpoint [O2B-1623] Document the detectors endpoint in the HTTP API documentation Oct 20, 2026
@graduta graduta added documentation Improvements or additions to documentation backend labels Oct 20, 2026
@codecov

codecov Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 46.39%. Comparing base (82f1a88) to head (a545ba4).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2264   +/-   ##
=======================================
  Coverage   46.38%   46.39%           
=======================================
  Files        1053     1053           
  Lines       17384    17384           
  Branches     3168     3168           
=======================================
+ Hits         8064     8065    +1     
+ Misses       9320     9319    -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Base automatically changed from feature/O2B-1623/docs-configuration-endpoint to main October 22, 2026 08:43
@graduta
graduta force-pushed the feature/O2B-1623/docs-detectors-endpoint branch from d1c77c1 to 30b596e Compare October 22, 2026 08:44
`GET /api/detectors` sent the creation and update dates of each detector, which nothing uses: the GUI only reads the type and the name through `detectorsProvider`
and the dates are not part of any other consumer of `DetectorAdapter.toEntity`. The adapter now only returns `id`, `name` and `type`, the `Detector` typedef is
updated accordingly (and gets its missing `id`), and the API test checks the keys of the returned detectors.
@graduta
graduta force-pushed the feature/O2B-1623/docs-detectors-endpoint branch from 30b596e to a545ba4 Compare October 22, 2026 08:52
@graduta
graduta merged commit 741e5c1 into main Oct 22, 2026
26 checks passed
@graduta
graduta deleted the feature/O2B-1623/docs-detectors-endpoint branch October 22, 2026 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend documentation Improvements or additions to documentation

Development

Successfully merging this pull request may close these issues.

2 participants