RetrieveFeatureWorkerVersion endpoint
https://redmine.teklia.com/issues/7497
The frontend will soon need a way to access the details of a worker version that provides an ArkindexFeature
without knowing its ID. A new RetrieveFeatureWorkerVersion
endpoint should allow this, at /api/v1/workers/versions/feature/{feature}/
, where feature
is a value in the ArkindexFeature
enum.
It must have the same permission requirements as RetrieveWorkerVersion
and returns the same response as RetrieveWorkerVersion
. Only that instead of retrieving by ID, it calls WorkerVersion.objects.get_by_feature(feature)
. If there is no worker version providing a feature, it should return HTTP 404.
The OpenAPI documentation can be updated to document that feature
specifically takes the values of ArkindexFeature
; this won't be automatically guessed because the Django path parameters will not support an enum. Look for OpenApiParameter.PATH
in the existing code for examples.