From 4509de40dd87a7cbb7cab59dc0f5e3f2132ace4c Mon Sep 17 00:00:00 2001 From: notfelineit Date: Wed, 1 May 2024 14:36:14 -0700 Subject: [PATCH 1/3] Change spec format --- cmd/airbyte-source/spec.json | 164 +++++++++++++++++------------------ 1 file changed, 79 insertions(+), 85 deletions(-) diff --git a/cmd/airbyte-source/spec.json b/cmd/airbyte-source/spec.json index b91bdc8..aade30e 100644 --- a/cmd/airbyte-source/spec.json +++ b/cmd/airbyte-source/spec.json @@ -1,91 +1,85 @@ { - "type": "SPEC", - "spec": { - "documentationUrl": "https://planetscale.com/docs/integrations/airbyte", - "connectionSpecification": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "PlanetScale Source Spec", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "PlanetScale Source Spec", + "type": "object", + "required": [ + "host", + "database", + "username", + "password" + ], + "additionalProperties": false, + "properties": { + "host": { + "description": "The host name of the database.", + "title": "Host", + "type": "string", + "order": 0 + }, + "shards": { + "description": "Comma separated list of shards you'd like to sync, by default all shards are synced.", + "title": "Shards", + "type": "string", + "order": 5 + }, + "database": { + "description": "The PlanetScale database name.", + "title": "Database", + "type": "string", + "order": 1 + }, + "username": { + "description": "The username which is used to access the database.", + "title": "Username", + "type": "string", + "order": 2 + }, + "password": { + "description": "The password associated with the username.", + "title": "Password", + "type": "string", + "order": 3, + "airbyte_secret": true + }, + "use_replica": { + "description": "Use a replica to pull data from", + "title": "Use replica?", + "type": "boolean", + "default": false, + "order": 4 + }, + "starting_gtids": { + "type": "string", + "title": "Starting GTIDs", + "default": "", + "description": "A JSON string containing start GTIDs for every { keyspace: { shard: starting_gtid } }", + "order": 6 + }, + "options": { "type": "object", - "required": [ - "host", - "database", - "username", - "password" - ], - "additionalProperties": false, - "properties": { - "host": { - "description": "The host name of the database.", - "title": "Host", - "type": "string", - "order": 0 - }, - "shards": { - "description": "Comma separated list of shards you'd like to sync, by default all shards are synced.", - "title": "Shards", - "type": "string", - "order": 5 - }, - "database": { - "description": "The PlanetScale database name.", - "title": "Database", - "type": "string", - "order": 1 - }, - "username": { - "description": "The username which is used to access the database.", - "title": "Username", - "type": "string", - "order": 2 - }, - "password": { - "description": "The password associated with the username.", - "title": "Password", - "type": "string", - "order": 3, - "airbyte_secret": true - }, - "use_replica": { - "description": "Use a replica to pull data from", - "title": "Use replica?", - "type": "boolean", - "default": false, - "order": 4 - }, - "starting_gtids": { - "type": "string", - "title": "Starting GTIDs", - "default": "", - "description": "A JSON string containing start GTIDs for every { keyspace: { shard: starting_gtid } }", - "order": 6 - }, - "options": { - "type": "object", - "title": "Customize serialization", - "description": "The storage Provider or Location of the file(s) which should be replicated.", - "default": "Public Web", - "oneOf": [ - { - "title": "tinyint(1) serialization", - "required": [ - "do_not_treat_tiny_int_as_boolean" - ], - "properties": { - "storage": { - "type": "string", - "const": "HTTPS" - }, - "do_not_treat_tiny_int_as_boolean": { - "type": "boolean", - "title": "Do not treat tinyint(1) as boolean", - "default": false, - "description": "If enabled, properties of type TinyInt(1) are output as TinyInt, and not boolean." - } - } + "title": "Customize serialization", + "description": "The storage Provider or Location of the file(s) which should be replicated.", + "default": "Public Web", + "oneOf": [ + { + "title": "tinyint(1) serialization", + "required": [ + "do_not_treat_tiny_int_as_boolean" + ], + "properties": { + "storage": { + "type": "string", + "const": "HTTPS" + }, + "do_not_treat_tiny_int_as_boolean": { + "type": "boolean", + "title": "Do not treat tinyint(1) as boolean", + "default": false, + "description": "If enabled, properties of type TinyInt(1) are output as TinyInt, and not boolean." } - ] + } } - } + ] } } -} \ No newline at end of file +} From 057e49893267ab7ac78fc9a2802a8ee7a8b0c7cd Mon Sep 17 00:00:00 2001 From: notfelineit Date: Wed, 1 May 2024 14:46:26 -0700 Subject: [PATCH 2/3] Match their docs --- cmd/airbyte-source/spec.json | 160 ++++++++++++++++++----------------- 1 file changed, 81 insertions(+), 79 deletions(-) diff --git a/cmd/airbyte-source/spec.json b/cmd/airbyte-source/spec.json index aade30e..d632b10 100644 --- a/cmd/airbyte-source/spec.json +++ b/cmd/airbyte-source/spec.json @@ -1,85 +1,87 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "PlanetScale Source Spec", - "type": "object", - "required": [ - "host", - "database", - "username", - "password" - ], - "additionalProperties": false, - "properties": { - "host": { - "description": "The host name of the database.", - "title": "Host", - "type": "string", - "order": 0 - }, - "shards": { - "description": "Comma separated list of shards you'd like to sync, by default all shards are synced.", - "title": "Shards", - "type": "string", - "order": 5 - }, - "database": { - "description": "The PlanetScale database name.", - "title": "Database", - "type": "string", - "order": 1 - }, - "username": { - "description": "The username which is used to access the database.", - "title": "Username", - "type": "string", - "order": 2 - }, - "password": { - "description": "The password associated with the username.", - "title": "Password", - "type": "string", - "order": 3, - "airbyte_secret": true - }, - "use_replica": { - "description": "Use a replica to pull data from", - "title": "Use replica?", - "type": "boolean", - "default": false, - "order": 4 - }, - "starting_gtids": { - "type": "string", - "title": "Starting GTIDs", - "default": "", - "description": "A JSON string containing start GTIDs for every { keyspace: { shard: starting_gtid } }", - "order": 6 - }, - "options": { - "type": "object", - "title": "Customize serialization", - "description": "The storage Provider or Location of the file(s) which should be replicated.", - "default": "Public Web", - "oneOf": [ - { - "title": "tinyint(1) serialization", - "required": [ - "do_not_treat_tiny_int_as_boolean" - ], - "properties": { - "storage": { - "type": "string", - "const": "HTTPS" - }, - "do_not_treat_tiny_int_as_boolean": { - "type": "boolean", - "title": "Do not treat tinyint(1) as boolean", - "default": false, - "description": "If enabled, properties of type TinyInt(1) are output as TinyInt, and not boolean." + "connectionSpecification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "PlanetScale Source Spec", + "type": "object", + "required": [ + "host", + "database", + "username", + "password" + ], + "additionalProperties": false, + "properties": { + "host": { + "description": "The host name of the database.", + "title": "Host", + "type": "string", + "order": 0 + }, + "shards": { + "description": "Comma separated list of shards you'd like to sync, by default all shards are synced.", + "title": "Shards", + "type": "string", + "order": 5 + }, + "database": { + "description": "The PlanetScale database name.", + "title": "Database", + "type": "string", + "order": 1 + }, + "username": { + "description": "The username which is used to access the database.", + "title": "Username", + "type": "string", + "order": 2 + }, + "password": { + "description": "The password associated with the username.", + "title": "Password", + "type": "string", + "order": 3, + "airbyte_secret": true + }, + "use_replica": { + "description": "Use a replica to pull data from", + "title": "Use replica?", + "type": "boolean", + "default": false, + "order": 4 + }, + "starting_gtids": { + "type": "string", + "title": "Starting GTIDs", + "default": "", + "description": "A JSON string containing start GTIDs for every { keyspace: { shard: starting_gtid } }", + "order": 6 + }, + "options": { + "type": "object", + "title": "Customize serialization", + "description": "The storage Provider or Location of the file(s) which should be replicated.", + "default": "Public Web", + "oneOf": [ + { + "title": "tinyint(1) serialization", + "required": [ + "do_not_treat_tiny_int_as_boolean" + ], + "properties": { + "storage": { + "type": "string", + "const": "HTTPS" + }, + "do_not_treat_tiny_int_as_boolean": { + "type": "boolean", + "title": "Do not treat tinyint(1) as boolean", + "default": false, + "description": "If enabled, properties of type TinyInt(1) are output as TinyInt, and not boolean." + } } } - } - ] + ] + } } } } From b5f1def96185cf65432a9226176ec15b0d17c6db Mon Sep 17 00:00:00 2001 From: notfelineit Date: Wed, 1 May 2024 15:00:08 -0700 Subject: [PATCH 3/3] Minify json again --- cmd/airbyte-source/spec.json | 88 +----------------------------------- 1 file changed, 1 insertion(+), 87 deletions(-) diff --git a/cmd/airbyte-source/spec.json b/cmd/airbyte-source/spec.json index d632b10..75de849 100644 --- a/cmd/airbyte-source/spec.json +++ b/cmd/airbyte-source/spec.json @@ -1,87 +1 @@ -{ - "connectionSpecification": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "PlanetScale Source Spec", - "type": "object", - "required": [ - "host", - "database", - "username", - "password" - ], - "additionalProperties": false, - "properties": { - "host": { - "description": "The host name of the database.", - "title": "Host", - "type": "string", - "order": 0 - }, - "shards": { - "description": "Comma separated list of shards you'd like to sync, by default all shards are synced.", - "title": "Shards", - "type": "string", - "order": 5 - }, - "database": { - "description": "The PlanetScale database name.", - "title": "Database", - "type": "string", - "order": 1 - }, - "username": { - "description": "The username which is used to access the database.", - "title": "Username", - "type": "string", - "order": 2 - }, - "password": { - "description": "The password associated with the username.", - "title": "Password", - "type": "string", - "order": 3, - "airbyte_secret": true - }, - "use_replica": { - "description": "Use a replica to pull data from", - "title": "Use replica?", - "type": "boolean", - "default": false, - "order": 4 - }, - "starting_gtids": { - "type": "string", - "title": "Starting GTIDs", - "default": "", - "description": "A JSON string containing start GTIDs for every { keyspace: { shard: starting_gtid } }", - "order": 6 - }, - "options": { - "type": "object", - "title": "Customize serialization", - "description": "The storage Provider or Location of the file(s) which should be replicated.", - "default": "Public Web", - "oneOf": [ - { - "title": "tinyint(1) serialization", - "required": [ - "do_not_treat_tiny_int_as_boolean" - ], - "properties": { - "storage": { - "type": "string", - "const": "HTTPS" - }, - "do_not_treat_tiny_int_as_boolean": { - "type": "boolean", - "title": "Do not treat tinyint(1) as boolean", - "default": false, - "description": "If enabled, properties of type TinyInt(1) are output as TinyInt, and not boolean." - } - } - } - ] - } - } - } -} +{"type":"SPEC","spec":{"documentationUrl":"https://planetscale.com/docs/integrations/airbyte","connectionSpecification":{"$schema":"http://json-schema.org/draft-07/schema#","title":"PlanetScale Source Spec","type":"object","required":["host","database","username","password"],"additionalProperties":false,"properties":{"host":{"description":"The host name of the database.","title":"Host","type":"string","order":0},"shards":{"description":"Comma separated list of shards you'd like to sync, by default all shards are synced.","title":"Shards","type":"string","order":5},"database":{"description":"The PlanetScale database name.","title":"Database","type":"string","order":1},"username":{"description":"The username which is used to access the database.","title":"Username","type":"string","order":2},"password":{"description":"The password associated with the username.","title":"Password","type":"string","order":3,"airbyte_secret":true},"use_replica":{"description":"Use a replica to pull data from","title":"Use replica?","type":"boolean","default":false,"order":4},"starting_gtids":{"type":"string","title":"Starting GTIDs","default":"","description":"A JSON string containing start GTIDs for every { keyspace: { shard: starting_gtid } }","order":6},"options":{"type":"object","title":"Customize serialization","description":"The storage Provider or Location of the file(s) which should be replicated.","default":"Public Web","oneOf":[{"title":"tinyint(1) serialization","required":["do_not_treat_tiny_int_as_boolean"],"properties":{"storage":{"type":"string","const":"HTTPS"},"do_not_treat_tiny_int_as_boolean":{"type":"boolean","title":"Do not treat tinyint(1) as boolean","default":false,"description":"If enabled, properties of type TinyInt(1) are output as TinyInt, and not boolean."}}}]}}}}} \ No newline at end of file