From 3210edd916043a25eab56e4b364f69906853450b Mon Sep 17 00:00:00 2001 From: John Smith Date: Thu, 5 Dec 2024 09:01:55 +1030 Subject: [PATCH] fix: Data Connector build tag --- .github/workflows/build.yml | 4 ++-- data-connector/README.md | 1 + data-connector/src/open-api/README.md | 7 ++++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9dadba5d..516be6ec 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -563,7 +563,7 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - - name: Build Control Plane Docker Image + - name: Build Data Connector Docker Image env: IMAGE_TAG: ${{ github.sha }} DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} @@ -578,7 +578,7 @@ jobs: --push \ --build-arg="VERSION=$VERSION" \ --build-arg="SHORT_VERSION=$SHORT_VERSION" \ - -t $DOCKERHUB_USERNAME/data-connector:$IMAGE_TAG -t $DOCKERHUB_USERNAME/$data-connector:latest ./ + -t $DOCKERHUB_USERNAME/data-connector:$IMAGE_TAG -t $DOCKERHUB_USERNAME/data-connector:latest ./ deploy-cloud: runs-on: ubuntu-latest diff --git a/data-connector/README.md b/data-connector/README.md index bbc9fdfb..191abe43 100644 --- a/data-connector/README.md +++ b/data-connector/README.md @@ -160,6 +160,7 @@ Each connector is defined in the `config.connectors` array. - `config.connectors[].specUrl`: The URL to your OpenAPI spec. Must be publicly accessible. - `config.connectors[].endpoint`: The endpoint to use. (e.g. `https://api.inferable.ai`) - `config.connectors[].defaultHeaders`: The default headers to use. (e.g. `{"Authorization": "Bearer "}`) +- `config.connectors[].allowedOperations`: Explicit OpenAPI operationIDs to allow. diff --git a/data-connector/src/open-api/README.md b/data-connector/src/open-api/README.md index 85a43b05..3de31bde 100644 --- a/data-connector/src/open-api/README.md +++ b/data-connector/src/open-api/README.md @@ -14,7 +14,7 @@ Configure the connector in your `config.json`: "endpoint": "process.env.SERVER_URL", "defaultHeaders": { "Authorization": "process.env.SERVER_AUTH_HEADER" - } + }, } ``` @@ -60,6 +60,7 @@ sequenceDiagram - **Paranoid Mode**: Requires human approval for API requests - **Parameter Validation**: Ensures requests match the OpenAPI specification - **Default Headers**: Supports global headers for authentication +- **OperationId Filtering**: Explicitly allow certain OpenAPI operations ## Important Considerations @@ -84,6 +85,10 @@ The connector automatically generates functions from OpenAPI operations: } ``` +### Large Schemas + +By default, the connector will attach **all** operations in the OpenAPI spec to the model. If your schema is large, consider using `config.connectors[].allowedOperations` to explicitly allow only the operations you need. + ### Security Considerations - **Authentication**: Configure through defaultHeaders