TOSIT-IO / tdp-server

REST API for tdp-lib orchestration
2 stars 2 forks source link

`null` variables list for `/api/v1/service/` components #93

Closed PaulFarault closed 1 year ago

PaulFarault commented 1 year ago

On GET /api/v1/service/, variables field appears as null for each service>component. Ex:

{
    "id": "zookeeper",
    "components": [
      {
        "id": "server",
        "variables": null,
        "version": "78e899e190a1304efcb68686120f395ddcb9f1ab"
      },
      {
        "id": "client",
        "variables": null,
        "version": "78e899e190a1304efcb68686120f395ddcb9f1ab"
      },
    ...
    ]
...
}

We expect variables to be an array containing all the defined variables for a given service>component.

Suggestion

Following #54, variables could be replaced by an isUsed field. This would allow the client to know both the list of all components and which component are in used without duplicating the result of the GET /api/v1/service/{service_id} endpoint.