Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(vdp): add description field to component definitions #279

Merged
merged 1 commit into from
Mar 4, 2024

Conversation

jvallesm
Copy link
Collaborator

@jvallesm jvallesm commented Mar 1, 2024

Because

  • Component page needs to receive the description field in the component definitions.json

This commit

  • Exposes the description in the Connector and Operator proto entities.

Before

$ curl --request GET \
  --url "localhost:8080/vdp/v1beta/component-definitions?page=1" \
  --header 'accept: application/json' | jq '.component_definitions[7]'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  7683    0  7683    0     0   357k      0 --:--:-- --:--:-- --:--:--  375k
{
  "type": "COMPONENT_TYPE_OPERATOR",
  "operator_definition": {
    "name": "operator-definitions/json",
    "uid": "28f53d15-6150-46e6-99aa-f76b70a926c0",
    "id": "json",
    "title": "JSON",
    "documentation_url": "https://www.instill.tech/docs/latest/vdp/operators/json",
    "icon": "assets/json.svg",
    "spec": null,
    "tombstone": false,
    "public": true,
    "custom": false,
    "source_url": "https://github.com/instill-ai/operator/blob/main/pkg/json/v0",
    "version": "0.1.0-alpha",
    "tasks": [
      {
        "name": "TASK_MARSHAL",
        "title": "Marshal",
        "description": "Convert JSON to a string"
      },
      {
        "name": "TASK_UNMARSHAL",
        "title": "Unmarshal",
        "description": "Convert a string to JSON"
      },
      {
        "name": "TASK_JQ",
        "title": "jq",
        "description": "Process JSON through a `jq` command"
      }
    ]
  }
}

After

$ curl --request GET \
  --url "localhost:8080/vdp/v1beta/component-definitions?page=1" \
  --header 'accept: application/json' | jq '.component_definitions[7]'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  7683    0  7683    0     0   357k      0 --:--:-- --:--:-- --:--:--  375k
{
  "type": "COMPONENT_TYPE_OPERATOR",
  "operator_definition": {
    "name": "operator-definitions/json",
    "description": "Enables users to manipulate and convert JSON objects",
    "uid": "28f53d15-6150-46e6-99aa-f76b70a926c0",
    "id": "json",
    "title": "JSON",
    "documentation_url": "https://www.instill.tech/docs/latest/vdp/operators/json",
    "icon": "assets/json.svg",
    "spec": null,
    "tombstone": false,
    "public": true,
    "custom": false,
    "source_url": "https://github.com/instill-ai/operator/blob/main/pkg/json/v0",
    "version": "0.1.0-alpha",
    "tasks": [
      {
        "name": "TASK_MARSHAL",
        "title": "Marshal",
        "description": "Convert JSON to a string"
      },
      {
        "name": "TASK_UNMARSHAL",
        "title": "Unmarshal",
        "description": "Convert a string to JSON"
      },
      {
        "name": "TASK_JQ",
        "title": "jq",
        "description": "Process JSON through a `jq` command"
      }
    ]
  }
}

@jvallesm jvallesm self-assigned this Mar 1, 2024
Copy link

linear bot commented Mar 1, 2024

@jvallesm jvallesm marked this pull request as ready for review March 1, 2024 14:42
@jvallesm jvallesm force-pushed the jvalles/ins-3680-create-component-list-endpoint branch from 6dccd91 to 9bbb972 Compare March 1, 2024 15:38
@jvallesm jvallesm changed the title feat: add description field to component definitions feat(vdp): add description field to component definitions Mar 4, 2024
@jvallesm jvallesm merged commit 938b02b into main Mar 4, 2024
3 of 4 checks passed
@jvallesm jvallesm deleted the jvalles/ins-3680-create-component-list-endpoint branch March 4, 2024 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: 👋 Done
Development

Successfully merging this pull request may close these issues.

1 participant