Currently, the accessibility feature is special, compared to all other features, because it is the only feature that queries the google-lighthouse container and hence works with its own data structures and control flow. It also may take significantly longer to compute.
This means, it might make sense to move this feature to its dedicated own REST API endpoint/path.
The other features could also be moved to their individual endpoints:
Pros:
changing / adding / removing a feature would leave every other feature untouched (in code)
The list of available features would be documented via openapi spec.
input and output models could be feature specific (also they probably shouldn't as far as possible)
Cons:
A consuming service would have to query multiple endpoints to get the full set of features
Currently, the accessibility feature is special, compared to all other features, because it is the only feature that queries the google-lighthouse container and hence works with its own data structures and control flow. It also may take significantly longer to compute.
This means, it might make sense to move this feature to its dedicated own REST API endpoint/path.
The other features could also be moved to their individual endpoints: Pros:
Cons: