From d418f9cd4b84924937af8fcaf2e75c038cbe88be Mon Sep 17 00:00:00 2001 From: Iryna Grankova <87977540+igrankova@users.noreply.github.com> Date: Wed, 5 Jan 2022 16:17:00 +0200 Subject: [PATCH] Update fields in source-connectors specifications: notion (#9207) --- .../6e00b415-b02e-4160-bf02-58176a0ae687.json | 2 +- .../src/main/resources/seed/source_definitions.yaml | 2 +- .../init/src/main/resources/seed/source_specs.yaml | 4 +++- .../connectors/source-notion/Dockerfile | 2 +- .../connectors/source-notion/README.md | 3 ++- .../source-notion/source_notion/schemas/pages.json | 12 ++++++++++-- .../source_notion/schemas/shared/date.json | 7 ++++--- .../connectors/source-notion/source_notion/spec.json | 2 ++ docs/integrations/sources/notion.md | 1 + 9 files changed, 25 insertions(+), 10 deletions(-) diff --git a/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/6e00b415-b02e-4160-bf02-58176a0ae687.json b/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/6e00b415-b02e-4160-bf02-58176a0ae687.json index a788dd9dc6f32..59bee7cfe8fb0 100644 --- a/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/6e00b415-b02e-4160-bf02-58176a0ae687.json +++ b/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/6e00b415-b02e-4160-bf02-58176a0ae687.json @@ -2,7 +2,7 @@ "sourceDefinitionId": "6e00b415-b02e-4160-bf02-58176a0ae687", "name": "Notion", "dockerRepository": "airbyte/source-notion", - "dockerImageTag": "0.1.0", + "dockerImageTag": "0.1.1", "documentationUrl": "https://hub.docker.com/r/airbyte/source-notion", "icon": "notion.svg" } diff --git a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml index baceb95dab680..71f2ec237cb68 100644 --- a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml +++ b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml @@ -447,7 +447,7 @@ - name: Notion sourceDefinitionId: 6e00b415-b02e-4160-bf02-58176a0ae687 dockerRepository: airbyte/source-notion - dockerImageTag: 0.1.0 + dockerImageTag: 0.1.1 documentationUrl: https://docs.airbyte.io/integrations/sources/notion icon: notion.svg sourceType: api diff --git a/airbyte-config/init/src/main/resources/seed/source_specs.yaml b/airbyte-config/init/src/main/resources/seed/source_specs.yaml index 34760856f74b4..01437c10c03d1 100644 --- a/airbyte-config/init/src/main/resources/seed/source_specs.yaml +++ b/airbyte-config/init/src/main/resources/seed/source_specs.yaml @@ -4716,7 +4716,7 @@ supportsNormalization: false supportsDBT: false supported_destination_sync_modes: [] -- dockerImage: "airbyte/source-notion:0.1.0" +- dockerImage: "airbyte/source-notion:0.1.1" spec: documentationUrl: "https://docsurl.com" connectionSpecification: @@ -4730,11 +4730,13 @@ properties: access_token: type: "string" + title: "Access Token" description: "Notion API access token, see the docs for more information on how to obtain this token." airbyte_secret: true start_date: type: "string" + title: "Start Date" description: "The date from which you'd like to replicate data for Notion\ \ API, in the format YYYY-MM-DDT00:00:00.000Z. All data generated after\ \ this date will be replicated." diff --git a/airbyte-integrations/connectors/source-notion/Dockerfile b/airbyte-integrations/connectors/source-notion/Dockerfile index c5a925d1a3ed1..9e121a38fd34d 100644 --- a/airbyte-integrations/connectors/source-notion/Dockerfile +++ b/airbyte-integrations/connectors/source-notion/Dockerfile @@ -34,5 +34,5 @@ COPY source_notion ./source_notion ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py" ENTRYPOINT ["python", "/airbyte/integration_code/main.py"] -LABEL io.airbyte.version=0.1.0 +LABEL io.airbyte.version=0.1.1 LABEL io.airbyte.name=airbyte/source-notion diff --git a/airbyte-integrations/connectors/source-notion/README.md b/airbyte-integrations/connectors/source-notion/README.md index 8d003a2c81f69..1ba66cbf88fb1 100644 --- a/airbyte-integrations/connectors/source-notion/README.md +++ b/airbyte-integrations/connectors/source-notion/README.md @@ -102,7 +102,8 @@ Customize `acceptance-test-config.yml` file to configure tests. See [Source Acce If your connector requires to create or destroy resources for use during acceptance tests create fixtures for it and place them inside integration_tests/acceptance.py. To run your integration tests with acceptance tests, from the connector root, run ``` -python -m pytest integration_tests -p integration_tests.acceptance +docker build . --no-cache -t airbyte/source-notion:dev \ +&& python -m pytest -p source_acceptance_test.plugin ``` To run your integration tests with docker diff --git a/airbyte-integrations/connectors/source-notion/source_notion/schemas/pages.json b/airbyte-integrations/connectors/source-notion/source_notion/schemas/pages.json index ce59b0037eaed..be5124292e20a 100644 --- a/airbyte-integrations/connectors/source-notion/source_notion/schemas/pages.json +++ b/airbyte-integrations/connectors/source-notion/source_notion/schemas/pages.json @@ -29,13 +29,13 @@ }, "properties": { "type": "object", - "additionalProperties": false, + "additionalProperties": true, "patternProperties": { ".*": { "anyOf": [ { "type": "object", - "additionalProperties": false, + "additionalProperties": true, "patternProperties": { "^id$": { "type": "string" }, "^type$": { "enum": ["title", "rich_text"] }, @@ -80,6 +80,14 @@ "date": { "$ref": "date.json" } } }, + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "type": { "enum": ["date"] }, + "date": { "$ref": "date.json" } + } + }, { "type": "object", "properties": { diff --git a/airbyte-integrations/connectors/source-notion/source_notion/schemas/shared/date.json b/airbyte-integrations/connectors/source-notion/source_notion/schemas/shared/date.json index 94f1e299c8bcd..18a4f13debaee 100644 --- a/airbyte-integrations/connectors/source-notion/source_notion/schemas/shared/date.json +++ b/airbyte-integrations/connectors/source-notion/source_notion/schemas/shared/date.json @@ -1,9 +1,10 @@ { "$schema": "http://json-schema.org/draft-04/schema#", "type": ["null", "object"], - "additionalProperties": false, + "additionalProperties": true, "properties": { - "start": { "type": "string" }, - "end": { "type": ["null", "string"] } + "start": { "type": ["null", "string"] }, + "end": { "type": ["null", "string"] }, + "time_zone": { "type": ["null", "string"] } } } diff --git a/airbyte-integrations/connectors/source-notion/source_notion/spec.json b/airbyte-integrations/connectors/source-notion/source_notion/spec.json index 4ab7b6db4d20a..b3029b1d5fbfd 100644 --- a/airbyte-integrations/connectors/source-notion/source_notion/spec.json +++ b/airbyte-integrations/connectors/source-notion/source_notion/spec.json @@ -9,11 +9,13 @@ "properties": { "access_token": { "type": "string", + "title": "Access Token", "description": "Notion API access token, see the docs for more information on how to obtain this token.", "airbyte_secret": true }, "start_date": { "type": "string", + "title": "Start Date", "description": "The date from which you'd like to replicate data for Notion API, in the format YYYY-MM-DDT00:00:00.000Z. All data generated after this date will be replicated.", "examples": ["2020-11-16T00:00:00.000Z"], "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}Z$" diff --git a/docs/integrations/sources/notion.md b/docs/integrations/sources/notion.md index 006bf9a024767..474396e1a6211 100644 --- a/docs/integrations/sources/notion.md +++ b/docs/integrations/sources/notion.md @@ -57,6 +57,7 @@ Please register on Notion and follow this [docs](https://developers.notion.com/d | Version | Date | Pull Request | Subject | | :--- | :--- | :--- | :--- | +| 0.1.1 | 2021-12-30 | [9207](https://github.com/airbytehq/airbyte/pull/9207) | Update connector fields title/description | | 0.1.0 | 2021-10-17 | [7092](https://github.com/airbytehq/airbyte/pull/7092) | Initial Release |