diff --git a/schemas/latest/dependencies-latest.json b/schemas/latest/dependencies-latest.json index adc3420..d6b4d94 100644 --- a/schemas/latest/dependencies-latest.json +++ b/schemas/latest/dependencies-latest.json @@ -24,18 +24,11 @@ "anyOf": [ { "type": "object", - "required": [ - "package", - "version" - ], + "required": ["package", "version"], "properties": { "version": { "title": "Package version", - "type": [ - "string", - "number", - "array" - ], + "type": ["string", "number", "array"], "description": "A semantic version string or range, such as [\">=1.0.0\", \"<2.0.0\"]" }, "install-prerelease": { @@ -47,9 +40,7 @@ "title": "Package identifier", "type": "string", "description": "Must be in format `org_name/package_name`. Refer to hub.getdbt.com for installation instructions", - "examples": [ - "dbt-labs/dbt_utils" - ], + "examples": ["dbt-labs/dbt_utils"], "pattern": "^[\\w\\-\\.]+/[\\w\\-\\.]+$" } }, @@ -57,9 +48,31 @@ }, { "type": "object", - "required": [ - "git" - ], + "required": ["private"], + "properties": { + "revision": { + "title": "Revision", + "description": "Pin your package to a specific release by specifying a release name", + "type": "string" + }, + "subdirectory": { + "title": "Repo subdirectory", + "description": "Subdirectory of the repo where the dbt package is located", + "type": "string" + }, + "private": { + "title": "Package identifier", + "description": "Must be in format `org_name/package_name`. Refer to docs.getdbt.com for installation instructions", + "type": "string", + "examples": ["dbt-labs/private_dbt_utils"], + "pattern": "^[\\w\\-\\.]+/[\\w\\-\\.]+$" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": ["git"], "properties": { "git": { "title": "Git URL", @@ -80,10 +93,7 @@ }, { "type": "object", - "required": [ - "tarball", - "name" - ], + "required": ["tarball", "name"], "properties": { "tarball": { "title": "Internally-hosted tarball URL", diff --git a/schemas/latest/packages-latest.json b/schemas/latest/packages-latest.json index e63ba55..ca31c5a 100644 --- a/schemas/latest/packages-latest.json +++ b/schemas/latest/packages-latest.json @@ -1,10 +1,10 @@ { "title": "packages", - "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "required": [ "packages" ], + "$schema": "http://json-schema.org/draft-07/schema#", "properties": { "packages": { "type": "array", @@ -19,22 +19,22 @@ "properties": { "version": { "title": "Package version", + "description": "A semantic version string or range, such as [\">=1.0.0\", \"<2.0.0\"]", "type": [ "string", "number", "array" - ], - "description": "A semantic version string or range, such as [\">=1.0.0\", \"<2.0.0\"]" + ] }, "install-prerelease": { "title": "Install Prerelease", - "type": "boolean", - "description": "Opt in to prerelease versions of a package" + "description": "Opt in to prerelease versions of a package", + "type": "boolean" }, "package": { "title": "Package identifier", - "type": "string", "description": "Must be in format `org_name/package_name`. Refer to hub.getdbt.com for installation instructions", + "type": "string", "examples": [ "dbt-labs/dbt_utils" ], @@ -43,6 +43,32 @@ }, "additionalProperties": false }, + { + "type": "object", + "required": [ + "private" + ], + "properties": { + "revision": { + "title": "Revision", + "description": "Pin your package to a specific release by specifying a release name", + "type": "string" + }, + "subdirectory": { + "title": "Repo subdirectory", + "description": "Subdirectory of the repo where the dbt package is located", + "type": "string" + }, + "private": { + "title": "Package identifier", + "description": "Must be in format `org_name/package_name`. Refer to docs.getdbt.com for installation instructions", + "type": "string", + "examples": ["dbt-labs/private_dbt_utils"], + "pattern": "^[\\w\\-\\.]+/[\\w\\-\\.]+$" + } + }, + "additionalProperties": false + }, { "type": "object", "required": [ @@ -55,13 +81,13 @@ }, "revision": { "title": "Revision", - "type": "string", - "description": "Pin your package to a specific release by specifying a release name" + "description": "Pin your package to a specific release by specifying a release name", + "type": "string" }, "subdirectory": { "title": "Subdirectory", - "type": "string", - "description": "Only required if the package is nested in a subdirectory of the git project" + "description": "Only required if the package is nested in a subdirectory of the git project", + "type": "string" } }, "additionalProperties": false @@ -73,13 +99,13 @@ "name" ], "properties": { + "name": { + "description": "dbt will create a subdirectory in your `packages-install-path` with this name, and the tarball's source code will be installed here.", + "type": "string" + }, "tarball": { "title": "Internally-hosted tarball URL", "type": "string" - }, - "name": { - "type": "string", - "description": "dbt will create a subdirectory in your `packages-install-path` with this name, and the tarball's source code will be installed here." } }, "additionalProperties": false @@ -99,4 +125,4 @@ } }, "additionalProperties": false -} +} \ No newline at end of file diff --git a/tests/latest/valid/dependencies.yml b/tests/latest/valid/dependencies.yml index 19c88c5..9386734 100644 --- a/tests/latest/valid/dependencies.yml +++ b/tests/latest/valid/dependencies.yml @@ -3,4 +3,8 @@ projects: packages: - package: dbt-labs/dbt-utils - version: 1.0.0 \ No newline at end of file + version: 1.0.0 + + - private: dbt-labs/private_dbt_utils + revision: 1.0.0 + subdirectory: mango \ No newline at end of file diff --git a/tests/latest/valid/packages.yml b/tests/latest/valid/packages.yml index 794e3c1..11e096a 100644 --- a/tests/latest/valid/packages.yml +++ b/tests/latest/valid/packages.yml @@ -8,4 +8,8 @@ packages: - local: /opt/dbt/redshift - tarball: abc123 - name: some_package \ No newline at end of file + name: some_package + + - private: dbt-labs/private_dbt_utils + revision: 1.0.0 + subdirectory: banjo \ No newline at end of file