Repository navigation
[O2B-1623] Document the run types endpoints in the HTTP API documentation - #2267
Merged
Merged
Conversation
graduta
added this pull request to stack #2265
October 20, 2026 12:58
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2267 +/- ##
==========================================
+ Coverage 46.34% 46.36% +0.01%
==========================================
Files 1050 1049 -1
Lines 17367 17351 -16
Branches 3168 3160 -8
==========================================
- Hits 8049 8044 -5
+ Misses 9318 9307 -11 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
graduta
force-pushed
the
feature/O2B-1623/docs-run-types-endpoints
branch
from
October 22, 2026 09:28
29d7093 to
cfcc343
Compare
graduta
removed this pull request from stack #2265
October 22, 2026 09:29
graduta
changed the base branch from
feature/O2B-1623/docs-dpl-detectors-endpoint
to
main
October 22, 2026 09:29
graduta
added this pull request to stack #2276
October 22, 2026 09:30
Nothing uses the creation and update dates of run types: the GUI only reads the id and the name (`runTypesProvider`, run types overview and the `runType` of runs), no test checks them, and `RunTypeAdapter.toEntity` is only used by the run types endpoints and by `RunAdapter` for the `runType` of a run. The adapter now only returns `id` and `name`, so the `runType` of runs loses them too. The `RunType` typedef is updated and the API tests check the returned keys.
graduta
force-pushed
the
feature/O2B-1623/docs-run-types-endpoints
branch
from
October 22, 2026 09:34
cfcc343 to
4003615
Compare
The frontend never gives pagination parameters to `GET /api/runTypes` and never reads `meta`, and there are only a handful of run types (as for detectors and tags, which are not paginated either). `page[limit]` and `page[offset]` are removed from the DTO and `meta.page` from the response. Run types can be created automatically (when a run is created with a new run type name), so the use case still caps the query to `ApiConfig.pagination.limit` as before, which is what protected the endpoint when no `limit` was given. Breaking for clients giving `page[...]` parameters (rejected with a 400) or reading `meta`.
graduta
force-pushed
the
feature/O2B-1623/docs-run-types-endpoints
branch
2 times, most recently
from
October 22, 2026 09:46
e7bdd0f to
8821a77
Compare
`GetAllRunTypesUseCase` and `GetRunTypeUseCase` are replaced by a `RunTypeService` (`getAll` and `getOneOrFail`) like the other resources read through services
(detectors, simulation passes...). The service reuses `getRunTypeOrFail` which already existed, instead of duplicating the lookup in a use case, and keeps the cap
of `getAll` to `ApiConfig.pagination.limit`.
The 404 of `GET /api/runTypes/:runTypeId` is now sent from the `NotFoundError` like the other service based endpoints: it changes from
`{ status: '404', title: 'Run with this id (X) could not be found' }` (which wrongly said "Run") to
`{ status: 404, title: 'Not found', detail: 'Run type with this id (X) could not be found' }`.
The use case tests are replaced by `RunTypeService` tests and a 404 API test is added.
…tion Also add the reusable PageLimit and PageOffset parameters and the PageMeta schema, to be used by the paginated endpoints documented next.
graduta
force-pushed
the
feature/O2B-1623/docs-run-types-endpoints
branch
from
October 22, 2026 09:56
8821a77 to
136dfdc
Compare
2 of 4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I have a JIRA ticket
Part of a stack of PRs documenting the HTTP API (O2B-1623). The earlier PRs of the stack are merged: this one is rebased on
mainand 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:
GET /api/runTypes/{runTypeId}changes from{ status: '404', title: 'Run with this id (X) could not be found' }to{ status: 404, title: 'Not found', detail: 'Run type with this id (X) could not be found' }(same shape as the other service based endpoints; the old title wrongly said "Run").createdAtandupdatedAtare no longer sent for run types, including therunTypeof runs (breaking for any external client reading them).GET /api/runTypesis no longer paginated:page[limit]/page[offset]are rejected (400) andmeta.pageis no longer returned (breaking for clients using them). Nothing in the GUI used them.run typesendpoints are now documented at/api-docs, with parameters, responses andcurlexamples:GET /api/runTypes: list of run types (ordered by name, descending, not paginated)GET /api/runTypes/{runTypeId}: one run typeNotable changes for developers:
GetAllRunTypesUseCaseandGetRunTypeUseCaseare replaced by aRunTypeService(getAll,getOneOrFail) following the usual convention: the service applies the adapter and the query defaults on top of small functions returning models, the existinggetRunTypeOrFailand a newgetAllRunTypes(qbConfiguration)(likeDetectorServicewithgetAllDetectors). Thelib/usecases/runTypefolder and its tests are removed;RunTypeServicetests and a 404 API test are added.GetAllRunTypesUseCasestill caps the query toApiConfig.pagination.limit(5000 by default), which is what bounded the endpoint when nolimitwas given. The limit/offset handling,findAndCountAlland themetacomputation are removed; the DTO no longer acceptspage.RunTypeAdapter.toEntityno longer returnscreatedAtandupdatedAt: nothing uses them (the GUI only readsidandname, no test checks them). The adapter is used by the run types endpoints and byRunAdapterfor therunTypeof a run, so therunTypeobject of runs (/api/runs, run details...) loses the two fields too. TheRunTypetypedef is updated and the API tests check the returned keys.lib/server/api-docs/openapi.yamlis updated by hand,API.mdandindex.htmlare regenerated withnpm run docs:api(separate commit).Changes made to the database:
🤖 Generated with Claude Code