diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 245acb490ea..b639f3b3883 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -110,3 +110,8 @@ src/negative_test/jsontron-0.1/ @kzu # Managed by Podman Desktop Team: src/schemas/json/podman-desktop-extension.json @podman-desktop-bot @simonrey1 @benoitf @jiridostal + +# Managed by terraform-provider-powershell: +src/schemas/json/tfpowershell-* @markdomansky +src/test/tfpowershell-* @markdomansky +src/negative_test/tfpowershell-* @markdomansky diff --git a/src/api/json/catalog.json b/src/api/json/catalog.json index 04cdbd1cda0..af13f7e40b3 100644 --- a/src/api/json/catalog.json +++ b/src/api/json/catalog.json @@ -7656,6 +7656,30 @@ "fileMatch": ["templatesources.json"], "url": "https://www.schemastore.org/templatesources.json" }, + { + "name": "Terraform PowerShell provider block manifest", + "description": "Custom provider-block attributes of a Terraform provider built on terraform-provider-powershell", + "fileMatch": ["provider.tfps.json", "**/provider.tfps.json"], + "url": "https://www.schemastore.org/tfpowershell-provider.json" + }, + { + "name": "Terraform PowerShell provider data source manifest", + "description": "Typed attribute declarations for one data source in a Terraform provider built on terraform-provider-powershell", + "fileMatch": ["datasource.tfps.json", "**/datasource.tfps.json"], + "url": "https://www.schemastore.org/tfpowershell-datasource.json" + }, + { + "name": "Terraform PowerShell provider resource manifest", + "description": "Typed attribute declarations for one resource in a Terraform provider built on terraform-provider-powershell", + "fileMatch": ["resource.tfps.json", "**/resource.tfps.json"], + "url": "https://www.schemastore.org/tfpowershell-resource.json" + }, + { + "name": "Terraform PowerShell provider settings", + "description": "Name and registry address of a Terraform provider built on terraform-provider-powershell", + "fileMatch": ["settings.tfps.json", "**/settings.tfps.json"], + "url": "https://www.schemastore.org/tfpowershell-settings.json" + }, { "name": "Tier.run pricing.json", "description": "Tier.run pricing model configuration", diff --git a/src/negative_test/tfpowershell-datasource/collection-without-element-type.json b/src/negative_test/tfpowershell-datasource/collection-without-element-type.json new file mode 100644 index 00000000000..5213c48beff --- /dev/null +++ b/src/negative_test/tfpowershell-datasource/collection-without-element-type.json @@ -0,0 +1,10 @@ +{ + "attributes": { + "a": { + "description": "x", + "required": true, + "type": "set" + } + }, + "version": 1 +} diff --git a/src/negative_test/tfpowershell-datasource/empty-attributes.json b/src/negative_test/tfpowershell-datasource/empty-attributes.json new file mode 100644 index 00000000000..22877fae2a3 --- /dev/null +++ b/src/negative_test/tfpowershell-datasource/empty-attributes.json @@ -0,0 +1,4 @@ +{ + "attributes": {}, + "version": 1 +} diff --git a/src/negative_test/tfpowershell-datasource/env-not-allowed.json b/src/negative_test/tfpowershell-datasource/env-not-allowed.json new file mode 100644 index 00000000000..9f24f3aa06b --- /dev/null +++ b/src/negative_test/tfpowershell-datasource/env-not-allowed.json @@ -0,0 +1,11 @@ +{ + "attributes": { + "a": { + "description": "Provider manifests only.", + "env": "X", + "optional": true, + "type": "string" + } + }, + "version": 1 +} diff --git a/src/negative_test/tfpowershell-datasource/invalid-attribute-name.json b/src/negative_test/tfpowershell-datasource/invalid-attribute-name.json new file mode 100644 index 00000000000..292598d5c07 --- /dev/null +++ b/src/negative_test/tfpowershell-datasource/invalid-attribute-name.json @@ -0,0 +1,10 @@ +{ + "attributes": { + "BadName": { + "description": "x", + "required": true, + "type": "string" + } + }, + "version": 1 +} diff --git a/src/negative_test/tfpowershell-datasource/missing-attributes.json b/src/negative_test/tfpowershell-datasource/missing-attributes.json new file mode 100644 index 00000000000..0946d0ea90d --- /dev/null +++ b/src/negative_test/tfpowershell-datasource/missing-attributes.json @@ -0,0 +1,4 @@ +{ + "description": "No attributes key.", + "version": 1 +} diff --git a/src/negative_test/tfpowershell-datasource/missing-version.json b/src/negative_test/tfpowershell-datasource/missing-version.json new file mode 100644 index 00000000000..9fac114cf1a --- /dev/null +++ b/src/negative_test/tfpowershell-datasource/missing-version.json @@ -0,0 +1,9 @@ +{ + "attributes": { + "a": { + "description": "x", + "required": true, + "type": "string" + } + } +} diff --git a/src/negative_test/tfpowershell-datasource/requires-replace-not-allowed.json b/src/negative_test/tfpowershell-datasource/requires-replace-not-allowed.json new file mode 100644 index 00000000000..d2f494861ef --- /dev/null +++ b/src/negative_test/tfpowershell-datasource/requires-replace-not-allowed.json @@ -0,0 +1,11 @@ +{ + "attributes": { + "a": { + "description": "Resources only.", + "required": true, + "requires_replace": true, + "type": "string" + } + }, + "version": 1 +} diff --git a/src/negative_test/tfpowershell-datasource/two-behaviors.json b/src/negative_test/tfpowershell-datasource/two-behaviors.json new file mode 100644 index 00000000000..eefa0e91c4f --- /dev/null +++ b/src/negative_test/tfpowershell-datasource/two-behaviors.json @@ -0,0 +1,11 @@ +{ + "attributes": { + "a": { + "computed": true, + "description": "x", + "required": true, + "type": "string" + } + }, + "version": 1 +} diff --git a/src/negative_test/tfpowershell-datasource/unknown-top-level-key.json b/src/negative_test/tfpowershell-datasource/unknown-top-level-key.json new file mode 100644 index 00000000000..71e7b2cc4ea --- /dev/null +++ b/src/negative_test/tfpowershell-datasource/unknown-top-level-key.json @@ -0,0 +1,11 @@ +{ + "attributes": { + "a": { + "description": "x", + "required": true, + "type": "string" + } + }, + "bogus": true, + "version": 1 +} diff --git a/src/negative_test/tfpowershell-datasource/unknown-type.json b/src/negative_test/tfpowershell-datasource/unknown-type.json new file mode 100644 index 00000000000..11dc96b1dac --- /dev/null +++ b/src/negative_test/tfpowershell-datasource/unknown-type.json @@ -0,0 +1,10 @@ +{ + "attributes": { + "a": { + "description": "x", + "required": true, + "type": "object" + } + }, + "version": 1 +} diff --git a/src/negative_test/tfpowershell-datasource/validators-on-computed.json b/src/negative_test/tfpowershell-datasource/validators-on-computed.json new file mode 100644 index 00000000000..9c45fa7a323 --- /dev/null +++ b/src/negative_test/tfpowershell-datasource/validators-on-computed.json @@ -0,0 +1,15 @@ +{ + "attributes": { + "a": { + "computed": true, + "description": "x", + "type": "string", + "validators": [ + { + "one_of": ["x"] + } + ] + } + }, + "version": 1 +} diff --git a/src/negative_test/tfpowershell-datasource/version-must-be-1.json b/src/negative_test/tfpowershell-datasource/version-must-be-1.json new file mode 100644 index 00000000000..e7676948199 --- /dev/null +++ b/src/negative_test/tfpowershell-datasource/version-must-be-1.json @@ -0,0 +1,10 @@ +{ + "attributes": { + "a": { + "description": "x", + "required": true, + "type": "string" + } + }, + "version": 2 +} diff --git a/src/negative_test/tfpowershell-provider/collection-without-element-type.json b/src/negative_test/tfpowershell-provider/collection-without-element-type.json new file mode 100644 index 00000000000..0fd2355e394 --- /dev/null +++ b/src/negative_test/tfpowershell-provider/collection-without-element-type.json @@ -0,0 +1,10 @@ +{ + "attributes": { + "a": { + "description": "x", + "required": true, + "type": "map" + } + }, + "version": 1 +} diff --git a/src/negative_test/tfpowershell-provider/computed-attribute.json b/src/negative_test/tfpowershell-provider/computed-attribute.json new file mode 100644 index 00000000000..349caf8814e --- /dev/null +++ b/src/negative_test/tfpowershell-provider/computed-attribute.json @@ -0,0 +1,10 @@ +{ + "attributes": { + "a": { + "computed": true, + "description": "Provider attributes cannot be computed.", + "type": "string" + } + }, + "version": 1 +} diff --git a/src/negative_test/tfpowershell-provider/default-on-required-attribute.json b/src/negative_test/tfpowershell-provider/default-on-required-attribute.json new file mode 100644 index 00000000000..f9050729c23 --- /dev/null +++ b/src/negative_test/tfpowershell-provider/default-on-required-attribute.json @@ -0,0 +1,11 @@ +{ + "attributes": { + "a": { + "default": "x", + "description": "x", + "required": true, + "type": "string" + } + }, + "version": 1 +} diff --git a/src/negative_test/tfpowershell-provider/empty-attributes.json b/src/negative_test/tfpowershell-provider/empty-attributes.json new file mode 100644 index 00000000000..22877fae2a3 --- /dev/null +++ b/src/negative_test/tfpowershell-provider/empty-attributes.json @@ -0,0 +1,4 @@ +{ + "attributes": {}, + "version": 1 +} diff --git a/src/negative_test/tfpowershell-provider/env-on-int-attribute.json b/src/negative_test/tfpowershell-provider/env-on-int-attribute.json new file mode 100644 index 00000000000..b46b206210f --- /dev/null +++ b/src/negative_test/tfpowershell-provider/env-on-int-attribute.json @@ -0,0 +1,11 @@ +{ + "attributes": { + "a": { + "description": "env is string-only.", + "env": "X", + "optional": true, + "type": "int" + } + }, + "version": 1 +} diff --git a/src/negative_test/tfpowershell-provider/env-on-required-attribute.json b/src/negative_test/tfpowershell-provider/env-on-required-attribute.json new file mode 100644 index 00000000000..9582edcf9e9 --- /dev/null +++ b/src/negative_test/tfpowershell-provider/env-on-required-attribute.json @@ -0,0 +1,11 @@ +{ + "attributes": { + "a": { + "description": "env is optional-only.", + "env": "X", + "required": true, + "type": "string" + } + }, + "version": 1 +} diff --git a/src/negative_test/tfpowershell-provider/invalid-attribute-name.json b/src/negative_test/tfpowershell-provider/invalid-attribute-name.json new file mode 100644 index 00000000000..292598d5c07 --- /dev/null +++ b/src/negative_test/tfpowershell-provider/invalid-attribute-name.json @@ -0,0 +1,10 @@ +{ + "attributes": { + "BadName": { + "description": "x", + "required": true, + "type": "string" + } + }, + "version": 1 +} diff --git a/src/negative_test/tfpowershell-provider/missing-attributes.json b/src/negative_test/tfpowershell-provider/missing-attributes.json new file mode 100644 index 00000000000..0946d0ea90d --- /dev/null +++ b/src/negative_test/tfpowershell-provider/missing-attributes.json @@ -0,0 +1,4 @@ +{ + "description": "No attributes key.", + "version": 1 +} diff --git a/src/negative_test/tfpowershell-provider/missing-version.json b/src/negative_test/tfpowershell-provider/missing-version.json new file mode 100644 index 00000000000..9fac114cf1a --- /dev/null +++ b/src/negative_test/tfpowershell-provider/missing-version.json @@ -0,0 +1,9 @@ +{ + "attributes": { + "a": { + "description": "x", + "required": true, + "type": "string" + } + } +} diff --git a/src/negative_test/tfpowershell-provider/requires-replace-not-allowed.json b/src/negative_test/tfpowershell-provider/requires-replace-not-allowed.json new file mode 100644 index 00000000000..d2f494861ef --- /dev/null +++ b/src/negative_test/tfpowershell-provider/requires-replace-not-allowed.json @@ -0,0 +1,11 @@ +{ + "attributes": { + "a": { + "description": "Resources only.", + "required": true, + "requires_replace": true, + "type": "string" + } + }, + "version": 1 +} diff --git a/src/negative_test/tfpowershell-provider/timeout-seconds-not-allowed.json b/src/negative_test/tfpowershell-provider/timeout-seconds-not-allowed.json new file mode 100644 index 00000000000..cf5e2a96a09 --- /dev/null +++ b/src/negative_test/tfpowershell-provider/timeout-seconds-not-allowed.json @@ -0,0 +1,11 @@ +{ + "attributes": { + "a": { + "description": "Use the built-in timeout attribute.", + "required": true, + "type": "string" + } + }, + "timeout_seconds": 600, + "version": 1 +} diff --git a/src/negative_test/tfpowershell-provider/two-behaviors.json b/src/negative_test/tfpowershell-provider/two-behaviors.json new file mode 100644 index 00000000000..bfc34d8d409 --- /dev/null +++ b/src/negative_test/tfpowershell-provider/two-behaviors.json @@ -0,0 +1,11 @@ +{ + "attributes": { + "a": { + "description": "x", + "optional": true, + "required": true, + "type": "string" + } + }, + "version": 1 +} diff --git a/src/negative_test/tfpowershell-provider/unknown-top-level-key.json b/src/negative_test/tfpowershell-provider/unknown-top-level-key.json new file mode 100644 index 00000000000..71e7b2cc4ea --- /dev/null +++ b/src/negative_test/tfpowershell-provider/unknown-top-level-key.json @@ -0,0 +1,11 @@ +{ + "attributes": { + "a": { + "description": "x", + "required": true, + "type": "string" + } + }, + "bogus": true, + "version": 1 +} diff --git a/src/negative_test/tfpowershell-provider/unknown-type.json b/src/negative_test/tfpowershell-provider/unknown-type.json new file mode 100644 index 00000000000..11dc96b1dac --- /dev/null +++ b/src/negative_test/tfpowershell-provider/unknown-type.json @@ -0,0 +1,10 @@ +{ + "attributes": { + "a": { + "description": "x", + "required": true, + "type": "object" + } + }, + "version": 1 +} diff --git a/src/negative_test/tfpowershell-provider/version-must-be-1.json b/src/negative_test/tfpowershell-provider/version-must-be-1.json new file mode 100644 index 00000000000..e7676948199 --- /dev/null +++ b/src/negative_test/tfpowershell-provider/version-must-be-1.json @@ -0,0 +1,10 @@ +{ + "attributes": { + "a": { + "description": "x", + "required": true, + "type": "string" + } + }, + "version": 2 +} diff --git a/src/negative_test/tfpowershell-resource/collection-without-element-type.json b/src/negative_test/tfpowershell-resource/collection-without-element-type.json new file mode 100644 index 00000000000..d5a38ef4b06 --- /dev/null +++ b/src/negative_test/tfpowershell-resource/collection-without-element-type.json @@ -0,0 +1,10 @@ +{ + "attributes": { + "a": { + "description": "An attribute.", + "required": true, + "type": "list" + } + }, + "version": 1 +} diff --git a/src/negative_test/tfpowershell-resource/default-on-required-attribute.json b/src/negative_test/tfpowershell-resource/default-on-required-attribute.json new file mode 100644 index 00000000000..4b13aabdd45 --- /dev/null +++ b/src/negative_test/tfpowershell-resource/default-on-required-attribute.json @@ -0,0 +1,11 @@ +{ + "attributes": { + "a": { + "default": "x", + "description": "An attribute.", + "required": true, + "type": "string" + } + }, + "version": 1 +} diff --git a/src/negative_test/tfpowershell-resource/default-type-mismatch.json b/src/negative_test/tfpowershell-resource/default-type-mismatch.json new file mode 100644 index 00000000000..02303ac7e6c --- /dev/null +++ b/src/negative_test/tfpowershell-resource/default-type-mismatch.json @@ -0,0 +1,11 @@ +{ + "attributes": { + "a": { + "default": "x", + "description": "Bad default.", + "optional": true, + "type": "int" + } + }, + "version": 1 +} diff --git a/src/negative_test/tfpowershell-resource/element-type-on-primitive.json b/src/negative_test/tfpowershell-resource/element-type-on-primitive.json new file mode 100644 index 00000000000..1906d35417f --- /dev/null +++ b/src/negative_test/tfpowershell-resource/element-type-on-primitive.json @@ -0,0 +1,11 @@ +{ + "attributes": { + "a": { + "description": "An attribute.", + "element_type": "string", + "required": true, + "type": "string" + } + }, + "version": 1 +} diff --git a/src/negative_test/tfpowershell-resource/empty-attributes.json b/src/negative_test/tfpowershell-resource/empty-attributes.json new file mode 100644 index 00000000000..22877fae2a3 --- /dev/null +++ b/src/negative_test/tfpowershell-resource/empty-attributes.json @@ -0,0 +1,4 @@ +{ + "attributes": {}, + "version": 1 +} diff --git a/src/negative_test/tfpowershell-resource/invalid-attribute-name.json b/src/negative_test/tfpowershell-resource/invalid-attribute-name.json new file mode 100644 index 00000000000..b9c9a524bfe --- /dev/null +++ b/src/negative_test/tfpowershell-resource/invalid-attribute-name.json @@ -0,0 +1,10 @@ +{ + "attributes": { + "BadName": { + "description": "An attribute.", + "required": true, + "type": "string" + } + }, + "version": 1 +} diff --git a/src/negative_test/tfpowershell-resource/missing-attributes.json b/src/negative_test/tfpowershell-resource/missing-attributes.json new file mode 100644 index 00000000000..0946d0ea90d --- /dev/null +++ b/src/negative_test/tfpowershell-resource/missing-attributes.json @@ -0,0 +1,4 @@ +{ + "description": "No attributes key.", + "version": 1 +} diff --git a/src/negative_test/tfpowershell-resource/missing-version.json b/src/negative_test/tfpowershell-resource/missing-version.json new file mode 100644 index 00000000000..34f68ab76be --- /dev/null +++ b/src/negative_test/tfpowershell-resource/missing-version.json @@ -0,0 +1,9 @@ +{ + "attributes": { + "a": { + "description": "An attribute.", + "required": true, + "type": "string" + } + } +} diff --git a/src/negative_test/tfpowershell-resource/negative-timeout-seconds.json b/src/negative_test/tfpowershell-resource/negative-timeout-seconds.json new file mode 100644 index 00000000000..f7f192918d2 --- /dev/null +++ b/src/negative_test/tfpowershell-resource/negative-timeout-seconds.json @@ -0,0 +1,11 @@ +{ + "attributes": { + "a": { + "description": "An attribute.", + "required": true, + "type": "string" + } + }, + "timeout_seconds": -5, + "version": 1 +} diff --git a/src/negative_test/tfpowershell-resource/no-behavior.json b/src/negative_test/tfpowershell-resource/no-behavior.json new file mode 100644 index 00000000000..769b6b00e02 --- /dev/null +++ b/src/negative_test/tfpowershell-resource/no-behavior.json @@ -0,0 +1,9 @@ +{ + "attributes": { + "a": { + "description": "No behavior flag.", + "type": "string" + } + }, + "version": 1 +} diff --git a/src/negative_test/tfpowershell-resource/one-of-empty.json b/src/negative_test/tfpowershell-resource/one-of-empty.json new file mode 100644 index 00000000000..276cf6d7246 --- /dev/null +++ b/src/negative_test/tfpowershell-resource/one-of-empty.json @@ -0,0 +1,15 @@ +{ + "attributes": { + "a": { + "description": "Bad.", + "optional": true, + "type": "string", + "validators": [ + { + "one_of": [] + } + ] + } + }, + "version": 1 +} diff --git a/src/negative_test/tfpowershell-resource/one-of-wrong-value-type.json b/src/negative_test/tfpowershell-resource/one-of-wrong-value-type.json new file mode 100644 index 00000000000..9a0614aafef --- /dev/null +++ b/src/negative_test/tfpowershell-resource/one-of-wrong-value-type.json @@ -0,0 +1,15 @@ +{ + "attributes": { + "a": { + "description": "Bad.", + "optional": true, + "type": "string", + "validators": [ + { + "one_of": [1] + } + ] + } + }, + "version": 1 +} diff --git a/src/negative_test/tfpowershell-resource/requires-replace-on-computed.json b/src/negative_test/tfpowershell-resource/requires-replace-on-computed.json new file mode 100644 index 00000000000..97be3ca4a98 --- /dev/null +++ b/src/negative_test/tfpowershell-resource/requires-replace-on-computed.json @@ -0,0 +1,11 @@ +{ + "attributes": { + "a": { + "computed": true, + "description": "Bad.", + "requires_replace": true, + "type": "string" + } + }, + "version": 1 +} diff --git a/src/negative_test/tfpowershell-resource/reserved-id-attribute.json b/src/negative_test/tfpowershell-resource/reserved-id-attribute.json new file mode 100644 index 00000000000..5993c8a25c1 --- /dev/null +++ b/src/negative_test/tfpowershell-resource/reserved-id-attribute.json @@ -0,0 +1,10 @@ +{ + "attributes": { + "id": { + "computed": true, + "description": "Reserved.", + "type": "string" + } + }, + "version": 1 +} diff --git a/src/negative_test/tfpowershell-resource/two-behaviors.json b/src/negative_test/tfpowershell-resource/two-behaviors.json new file mode 100644 index 00000000000..ea2080c38c6 --- /dev/null +++ b/src/negative_test/tfpowershell-resource/two-behaviors.json @@ -0,0 +1,11 @@ +{ + "attributes": { + "a": { + "computed": true, + "description": "An attribute.", + "required": true, + "type": "string" + } + }, + "version": 1 +} diff --git a/src/negative_test/tfpowershell-resource/unknown-attribute-key.json b/src/negative_test/tfpowershell-resource/unknown-attribute-key.json new file mode 100644 index 00000000000..50006e9def8 --- /dev/null +++ b/src/negative_test/tfpowershell-resource/unknown-attribute-key.json @@ -0,0 +1,11 @@ +{ + "attributes": { + "a": { + "description": "An attribute.", + "nope": 1, + "required": true, + "type": "string" + } + }, + "version": 1 +} diff --git a/src/negative_test/tfpowershell-resource/unknown-element-type.json b/src/negative_test/tfpowershell-resource/unknown-element-type.json new file mode 100644 index 00000000000..c9e815bc1a6 --- /dev/null +++ b/src/negative_test/tfpowershell-resource/unknown-element-type.json @@ -0,0 +1,11 @@ +{ + "attributes": { + "a": { + "description": "An attribute.", + "element_type": "json", + "required": true, + "type": "list" + } + }, + "version": 1 +} diff --git a/src/negative_test/tfpowershell-resource/unknown-top-level-key.json b/src/negative_test/tfpowershell-resource/unknown-top-level-key.json new file mode 100644 index 00000000000..7178679b1cd --- /dev/null +++ b/src/negative_test/tfpowershell-resource/unknown-top-level-key.json @@ -0,0 +1,11 @@ +{ + "attributes": { + "a": { + "description": "An attribute.", + "required": true, + "type": "string" + } + }, + "bogus": true, + "version": 1 +} diff --git a/src/negative_test/tfpowershell-resource/unknown-type.json b/src/negative_test/tfpowershell-resource/unknown-type.json new file mode 100644 index 00000000000..13f011f92d4 --- /dev/null +++ b/src/negative_test/tfpowershell-resource/unknown-type.json @@ -0,0 +1,10 @@ +{ + "attributes": { + "a": { + "description": "An attribute.", + "required": true, + "type": "object" + } + }, + "version": 1 +} diff --git a/src/negative_test/tfpowershell-resource/unknown-validator-key.json b/src/negative_test/tfpowershell-resource/unknown-validator-key.json new file mode 100644 index 00000000000..042c97ae8b7 --- /dev/null +++ b/src/negative_test/tfpowershell-resource/unknown-validator-key.json @@ -0,0 +1,16 @@ +{ + "attributes": { + "a": { + "description": "Bad.", + "optional": true, + "type": "string", + "validators": [ + { + "one_of": ["x"], + "pattern": "y" + } + ] + } + }, + "version": 1 +} diff --git a/src/negative_test/tfpowershell-resource/validators-on-bool.json b/src/negative_test/tfpowershell-resource/validators-on-bool.json new file mode 100644 index 00000000000..447b0065815 --- /dev/null +++ b/src/negative_test/tfpowershell-resource/validators-on-bool.json @@ -0,0 +1,15 @@ +{ + "attributes": { + "a": { + "description": "Bad.", + "optional": true, + "type": "bool", + "validators": [ + { + "one_of": [true] + } + ] + } + }, + "version": 1 +} diff --git a/src/negative_test/tfpowershell-resource/validators-on-computed.json b/src/negative_test/tfpowershell-resource/validators-on-computed.json new file mode 100644 index 00000000000..60dfa3a48f6 --- /dev/null +++ b/src/negative_test/tfpowershell-resource/validators-on-computed.json @@ -0,0 +1,15 @@ +{ + "attributes": { + "a": { + "computed": true, + "description": "Bad.", + "type": "string", + "validators": [ + { + "one_of": ["x"] + } + ] + } + }, + "version": 1 +} diff --git a/src/negative_test/tfpowershell-resource/version-must-be-1.json b/src/negative_test/tfpowershell-resource/version-must-be-1.json new file mode 100644 index 00000000000..9bf589b0616 --- /dev/null +++ b/src/negative_test/tfpowershell-resource/version-must-be-1.json @@ -0,0 +1,10 @@ +{ + "attributes": { + "a": { + "description": "An attribute.", + "required": true, + "type": "string" + } + }, + "version": 2 +} diff --git a/src/negative_test/tfpowershell-settings/empty-address.json b/src/negative_test/tfpowershell-settings/empty-address.json new file mode 100644 index 00000000000..6ce8b75587f --- /dev/null +++ b/src/negative_test/tfpowershell-settings/empty-address.json @@ -0,0 +1,4 @@ +{ + "address": "", + "name": "acme" +} diff --git a/src/negative_test/tfpowershell-settings/invalid-engine-version.json b/src/negative_test/tfpowershell-settings/invalid-engine-version.json new file mode 100644 index 00000000000..e596ee14f05 --- /dev/null +++ b/src/negative_test/tfpowershell-settings/invalid-engine-version.json @@ -0,0 +1,5 @@ +{ + "address": "registry.terraform.io/acme/acme", + "engine_version": "newest", + "name": "acme" +} diff --git a/src/negative_test/tfpowershell-settings/invalid-name.json b/src/negative_test/tfpowershell-settings/invalid-name.json new file mode 100644 index 00000000000..240dc1a481b --- /dev/null +++ b/src/negative_test/tfpowershell-settings/invalid-name.json @@ -0,0 +1,4 @@ +{ + "address": "registry.terraform.io/acme/acme", + "name": "Acme-Provider" +} diff --git a/src/negative_test/tfpowershell-settings/missing-address.json b/src/negative_test/tfpowershell-settings/missing-address.json new file mode 100644 index 00000000000..055bd5b1a37 --- /dev/null +++ b/src/negative_test/tfpowershell-settings/missing-address.json @@ -0,0 +1,3 @@ +{ + "name": "acme" +} diff --git a/src/negative_test/tfpowershell-settings/missing-name.json b/src/negative_test/tfpowershell-settings/missing-name.json new file mode 100644 index 00000000000..2facd80ce32 --- /dev/null +++ b/src/negative_test/tfpowershell-settings/missing-name.json @@ -0,0 +1,3 @@ +{ + "address": "registry.terraform.io/acme/acme" +} diff --git a/src/negative_test/tfpowershell-settings/unknown-key.json b/src/negative_test/tfpowershell-settings/unknown-key.json new file mode 100644 index 00000000000..b94f3dea7fe --- /dev/null +++ b/src/negative_test/tfpowershell-settings/unknown-key.json @@ -0,0 +1,5 @@ +{ + "address": "registry.terraform.io/acme/acme", + "bogus": true, + "name": "acme" +} diff --git a/src/schema-validation.jsonc b/src/schema-validation.jsonc index 3c94e004cef..1a1364ea8e8 100644 --- a/src/schema-validation.jsonc +++ b/src/schema-validation.jsonc @@ -222,7 +222,6 @@ "xs-app.json", "yamllint.json", "deployed.json", - "jfrog-pipelines.json", "lsdlschema-0.7.json", "lsdlschema-1.0.json", "lsdlschema-1.2.json", @@ -448,6 +447,22 @@ "openapi-arazzo-1.X.json" // uses external references ], "coverage": [ + { + "schema": "tfpowershell-datasource.json", + "strict": true + }, + { + "schema": "tfpowershell-provider.json", + "strict": true + }, + { + "schema": "tfpowershell-resource.json", + "strict": true + }, + { + "schema": "tfpowershell-settings.json", + "strict": true + }, { "schema": "claude-code-settings.json", "strict": true diff --git a/src/schemas/json/jfrog-pipelines.json b/src/schemas/json/jfrog-pipelines.json index c620473fcab..4e545d45ba8 100644 --- a/src/schemas/json/jfrog-pipelines.json +++ b/src/schemas/json/jfrog-pipelines.json @@ -7,7 +7,7 @@ "title": "JFrog-Pipelines", "description": "https://www.jfrog.com/confluence/display/JFROG/Pipelines+Developer+Guide", "type": "object", - "additionalProperties": false, + "additionalProperties": true, "properties": { "resources": { "type": "array", @@ -36,27 +36,26 @@ } } }, - "patternProperties": { - "^.*$": { - "anyOf": [ - { "type": "string" }, - { "type": "number" }, - { "type": "integer" }, - { "type": "boolean" }, - { "type": "array" }, - { "type": "object" }, - { "type": "null" } - ] - } - }, "anyOf": [ { + "type": "object", + "properties": { + "pipelines": true + }, "required": ["pipelines"] }, { + "type": "object", + "properties": { + "resources": true + }, "required": ["resources"] }, { + "type": "object", + "properties": { + "include": true + }, "required": ["include"] } ] @@ -94,7 +93,7 @@ "if": { "properties": { "type": { - "enum": ["Aql"] + "const": "Aql" } } }, @@ -106,7 +105,7 @@ "if": { "properties": { "type": { - "enum": ["BuildInfo"] + "const": "BuildInfo" } } }, @@ -118,7 +117,7 @@ "if": { "properties": { "type": { - "enum": ["CronTrigger"] + "const": "CronTrigger" } } }, @@ -130,7 +129,7 @@ "if": { "properties": { "type": { - "enum": ["DistributionRule"] + "const": "DistributionRule" } } }, @@ -142,7 +141,7 @@ "if": { "properties": { "type": { - "enum": ["FileSpec"] + "const": "FileSpec" } } }, @@ -154,7 +153,7 @@ "if": { "properties": { "type": { - "enum": ["GitRepo"] + "const": "GitRepo" } } }, @@ -166,7 +165,7 @@ "if": { "properties": { "type": { - "enum": ["HelmChart"] + "const": "HelmChart" } } }, @@ -178,7 +177,7 @@ "if": { "properties": { "type": { - "enum": ["Image"] + "const": "Image" } } }, @@ -190,7 +189,7 @@ "if": { "properties": { "type": { - "enum": ["IncomingWebhook"] + "const": "IncomingWebhook" } } }, @@ -202,7 +201,7 @@ "if": { "properties": { "type": { - "enum": ["OutgoingWebhook"] + "const": "OutgoingWebhook" } } }, @@ -214,7 +213,7 @@ "if": { "properties": { "type": { - "enum": ["PropertyBag"] + "const": "PropertyBag" } } }, @@ -226,7 +225,7 @@ "if": { "properties": { "type": { - "enum": ["ReleaseBundle"] + "const": "ReleaseBundle" } } }, @@ -238,7 +237,7 @@ "if": { "properties": { "type": { - "enum": ["RemoteFile"] + "const": "RemoteFile" } } }, @@ -250,7 +249,7 @@ "if": { "properties": { "type": { - "enum": ["VmCluster"] + "const": "VmCluster" } } }, @@ -284,7 +283,14 @@ "addedProperties": { "type": "object", "additionalProperties": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "mappings": { @@ -330,7 +336,14 @@ "type": "string" }, "buildNumber": { - "type": ["integer", "string"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] }, "buildName": { "type": "string" @@ -350,7 +363,14 @@ "type": "string" }, "buildNumber": { - "type": ["integer", "string"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] }, "targetRepo": { "type": "string" @@ -358,9 +378,18 @@ }, "anyOf": [ { + "type": "object", + "properties": { + "versionId": true + }, "required": ["versionId"] }, { + "type": "object", + "properties": { + "buildName": true, + "buildNumber": true + }, "required": ["buildName", "buildNumber"] } ] @@ -480,10 +509,24 @@ "type": "string" }, "recursive": { - "type": ["boolean", "string"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] }, "flat": { - "type": ["boolean", "string"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] }, "excludePatterns": { "type": "array", @@ -501,7 +544,14 @@ "type": "string" }, "buildNumber": { - "type": ["integer", "string"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] }, "buildName": { "type": "string" @@ -516,10 +566,24 @@ "type": "string" }, "limit": { - "type": ["integer", "string"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] }, "offset": { - "type": ["integer", "string"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] } }, "required": ["sourceArtifactory"] @@ -673,14 +737,7 @@ "type": "string" } }, - "anyOf": [ - { - "required": ["versionId"] - }, - { - "required": ["sha"] - } - ] + "minProperties": 1 } }, "required": ["gitProvider", "path"] @@ -726,14 +783,7 @@ "type": "string" } }, - "anyOf": [ - { - "required": ["versionId"] - }, - { - "required": ["version"] - } - ] + "minProperties": 1 } }, "required": ["sourceArtifactory", "repository", "chart", "version"] @@ -768,7 +818,14 @@ "type": "string" }, "autoPull": { - "type": ["boolean", "string"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] }, "region": { "type": "string" @@ -785,14 +842,7 @@ "type": "string" } }, - "anyOf": [ - { - "required": ["versionId"] - }, - { - "required": ["imageTag"] - } - ] + "minProperties": 1 } }, "required": ["registry", "imageName", "imageTag"] @@ -911,7 +961,14 @@ "type": "string" }, "isSigned": { - "type": ["boolean", "string"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] }, "pin": { "type": "object", @@ -930,9 +987,18 @@ }, "anyOf": [ { + "type": "object", + "properties": { + "versionId": true + }, "required": ["versionId"] }, { + "type": "object", + "properties": { + "name": true, + "version": true + }, "required": ["name", "version"] } ] @@ -972,12 +1038,21 @@ "type": "string" } }, + "required": ["source"], "anyOf": [ { - "required": ["source", "fileLocation"] + "type": "object", + "properties": { + "fileLocation": true + }, + "required": ["fileLocation"] }, { - "required": ["source", "fileName"] + "type": "object", + "properties": { + "fileName": true + }, + "required": ["fileName"] } ] } @@ -1032,38 +1107,81 @@ "readOnly": { "type": "object", "additionalProperties": { - "type": ["string", "number", "object"], - "properties": { - "description": { + "anyOf": [ + { "type": "string" }, - "default": { - "type": ["string", "number"] - }, - "values": { - "type": "array", - "minItems": 1, - "items": { - "type": ["string", "number"] - } - }, - "allowCustom": { - "type": "boolean" - }, - "allowMultipleValues": { - "type": "boolean" + { + "type": "number" }, - "defaultMultipleValues": { - "type": "array", - "minItems": 1, - "items": { - "type": ["string", "number"] - } + { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "default": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "values": { + "type": "array", + "minItems": 1, + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "allowCustom": { + "type": "boolean" + }, + "allowMultipleValues": { + "type": "boolean" + }, + "defaultMultipleValues": { + "type": "array", + "minItems": 1, + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + } + }, + "anyOf": [ + { + "type": "object", + "properties": { + "default": true + }, + "required": ["default"] + }, + { + "type": "object", + "properties": { + "defaultMultipleValues": true + }, + "required": ["defaultMultipleValues"] + } + ] } - }, - "anyOf": [ - { "required": ["default"] }, - { "required": ["defaultMultipleValues"] } ] } } @@ -1077,7 +1195,14 @@ "type": "string" }, "jfrogCliVersion": { - "type": ["string", "integer"], + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ], "enum": ["1", "2", 1, 2] }, "runtime": { @@ -1092,14 +1217,15 @@ "if": { "properties": { "type": { - "enum": ["image"] + "const": "image" } } }, "then": { + "type": "object", "properties": { "type": { - "enum": ["image"] + "const": "image" }, "image": { "type": "object", @@ -1115,7 +1241,14 @@ "versions": { "type": "array", "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } } @@ -1149,22 +1282,17 @@ } } }, - "oneOf": [ - { - "required": ["auto"] - }, - { - "required": ["custom"] - } - ] + "minProperties": 1, + "maxProperties": 1 } }, "additionalProperties": false }, "else": { + "type": "object", "properties": { "type": { - "enum": ["host"] + "const": "host" } }, "additionalProperties": false @@ -1264,6 +1392,7 @@ "additionalProperties": false, "properties": { "configuration": { + "type": "object", "additionalProperties": false, "properties": { "environmentVariables": { @@ -1272,38 +1401,81 @@ "readOnly": { "type": "object", "additionalProperties": { - "type": ["string", "number", "object"], - "properties": { - "description": { + "anyOf": [ + { "type": "string" }, - "default": { - "type": ["string", "number"] + { + "type": "number" }, - "values": { - "type": "array", - "minItems": 1, - "items": { - "type": ["string", "number"] - } - }, - "allowCustom": { - "type": "boolean" - }, - "allowMultipleValues": { - "type": "boolean" - }, - "defaultMultipleValues": { - "type": "array", - "minItems": 1, - "items": { - "type": ["string", "number"] - } + { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "default": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "values": { + "type": "array", + "minItems": 1, + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "allowCustom": { + "type": "boolean" + }, + "allowMultipleValues": { + "type": "boolean" + }, + "defaultMultipleValues": { + "type": "array", + "minItems": 1, + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + } + }, + "anyOf": [ + { + "type": "object", + "properties": { + "default": true + }, + "required": ["default"] + }, + { + "type": "object", + "properties": { + "defaultMultipleValues": true + }, + "required": ["defaultMultipleValues"] + } + ] } - }, - "anyOf": [ - { "required": ["default"] }, - { "required": ["defaultMultipleValues"] } ] } } @@ -1317,7 +1489,14 @@ "type": "string" }, "jfrogCliVersion": { - "type": ["string", "integer"], + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ], "enum": ["1", "2", 1, 2] }, "runtime": { @@ -1331,12 +1510,17 @@ "required": ["type"], "if": { "properties": { - "type": { "enum": ["image"] } + "type": { + "const": "image" + } } }, "then": { + "type": "object", "properties": { - "type": { "enum": ["image"] }, + "type": { + "const": "image" + }, "image": { "type": "object", "additionalProperties": false, @@ -1351,7 +1535,14 @@ "versions": { "type": "array", "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } } @@ -1385,17 +1576,18 @@ } } }, - "oneOf": [ - { "required": ["auto"] }, - { "required": ["custom"] } - ] + "minProperties": 1, + "maxProperties": 1 } }, "additionalProperties": false }, "else": { + "type": "object", "properties": { - "type": { "enum": ["host"] } + "type": { + "const": "host" + } }, "additionalProperties": false } @@ -1490,6 +1682,7 @@ "additionalProperties": false, "properties": { "configuration": { + "type": "object", "additionalProperties": false, "properties": { "environmentVariables": { @@ -1498,38 +1691,81 @@ "readOnly": { "type": "object", "additionalProperties": { - "type": ["string", "number", "object"], - "properties": { - "description": { + "anyOf": [ + { "type": "string" }, - "default": { - "type": ["string", "number"] - }, - "values": { - "type": "array", - "minItems": 1, - "items": { - "type": ["string", "number"] - } - }, - "allowCustom": { - "type": "boolean" - }, - "allowMultipleValues": { - "type": "boolean" + { + "type": "number" }, - "defaultMultipleValues": { - "type": "array", - "minItems": 1, - "items": { - "type": ["string", "number"] - } + { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "default": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "values": { + "type": "array", + "minItems": 1, + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "allowCustom": { + "type": "boolean" + }, + "allowMultipleValues": { + "type": "boolean" + }, + "defaultMultipleValues": { + "type": "array", + "minItems": 1, + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + } + }, + "anyOf": [ + { + "type": "object", + "properties": { + "default": true + }, + "required": ["default"] + }, + { + "type": "object", + "properties": { + "defaultMultipleValues": true + }, + "required": ["defaultMultipleValues"] + } + ] } - }, - "anyOf": [ - { "required": ["default"] }, - { "required": ["defaultMultipleValues"] } ] } } @@ -1543,7 +1779,14 @@ "type": "string" }, "jfrogCliVersion": { - "type": ["string", "integer"], + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ], "enum": ["1", "2", 1, 2] }, "runtime": { @@ -1557,12 +1800,17 @@ "required": ["type"], "if": { "properties": { - "type": { "enum": ["image"] } + "type": { + "const": "image" + } } }, "then": { + "type": "object", "properties": { - "type": { "enum": ["image"] }, + "type": { + "const": "image" + }, "image": { "type": "object", "additionalProperties": false, @@ -1577,7 +1825,14 @@ "versions": { "type": "array", "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } } @@ -1611,17 +1866,18 @@ } } }, - "oneOf": [ - { "required": ["auto"] }, - { "required": ["custom"] } - ] + "minProperties": 1, + "maxProperties": 1 } }, "additionalProperties": false }, "else": { + "type": "object", "properties": { - "type": { "enum": ["host"] } + "type": { + "const": "host" + } }, "additionalProperties": false } @@ -1791,7 +2047,7 @@ "if": { "properties": { "type": { - "enum": ["Bash"] + "const": "Bash" } } }, @@ -1803,7 +2059,7 @@ "if": { "properties": { "type": { - "enum": ["CreateReleaseBundle"] + "const": "CreateReleaseBundle" } } }, @@ -1815,7 +2071,7 @@ "if": { "properties": { "type": { - "enum": ["DistributeReleaseBundle"] + "const": "DistributeReleaseBundle" } } }, @@ -1827,7 +2083,7 @@ "if": { "properties": { "type": { - "enum": ["DockerBuild"] + "const": "DockerBuild" } } }, @@ -1839,7 +2095,7 @@ "if": { "properties": { "type": { - "enum": ["DockerPush"] + "const": "DockerPush" } } }, @@ -1851,7 +2107,7 @@ "if": { "properties": { "type": { - "enum": ["GoBuild"] + "const": "GoBuild" } } }, @@ -1863,7 +2119,7 @@ "if": { "properties": { "type": { - "enum": ["GoPublishBinary"] + "const": "GoPublishBinary" } } }, @@ -1875,7 +2131,7 @@ "if": { "properties": { "type": { - "enum": ["GoPublishModule"] + "const": "GoPublishModule" } } }, @@ -1887,7 +2143,7 @@ "if": { "properties": { "type": { - "enum": ["GradleBuild"] + "const": "GradleBuild" } } }, @@ -1899,7 +2155,7 @@ "if": { "properties": { "type": { - "enum": ["HelmBlueGreenCleanup"] + "const": "HelmBlueGreenCleanup" } } }, @@ -1911,7 +2167,7 @@ "if": { "properties": { "type": { - "enum": ["HelmBlueGreenDeploy"] + "const": "HelmBlueGreenDeploy" } } }, @@ -1923,7 +2179,7 @@ "if": { "properties": { "type": { - "enum": ["HelmBlueGreenRoleSwitch"] + "const": "HelmBlueGreenRoleSwitch" } } }, @@ -1935,7 +2191,7 @@ "if": { "properties": { "type": { - "enum": ["HelmDeploy"] + "const": "HelmDeploy" } } }, @@ -1947,7 +2203,7 @@ "if": { "properties": { "type": { - "enum": ["HelmPublish"] + "const": "HelmPublish" } } }, @@ -1959,7 +2215,7 @@ "if": { "properties": { "type": { - "enum": ["Jenkins"] + "const": "Jenkins" } } }, @@ -1971,7 +2227,7 @@ "if": { "properties": { "type": { - "enum": ["Matrix"] + "const": "Matrix" } } }, @@ -1983,7 +2239,7 @@ "if": { "properties": { "type": { - "enum": ["PreMatrix"] + "const": "PreMatrix" } } }, @@ -1995,7 +2251,7 @@ "if": { "properties": { "type": { - "enum": ["PostMatrix"] + "const": "PostMatrix" } } }, @@ -2007,7 +2263,7 @@ "if": { "properties": { "type": { - "enum": ["MvnBuild"] + "const": "MvnBuild" } } }, @@ -2019,7 +2275,7 @@ "if": { "properties": { "type": { - "enum": ["NpmBuild"] + "const": "NpmBuild" } } }, @@ -2031,7 +2287,7 @@ "if": { "properties": { "type": { - "enum": ["NpmPublish"] + "const": "NpmPublish" } } }, @@ -2043,7 +2299,7 @@ "if": { "properties": { "type": { - "enum": ["PowerShell"] + "const": "PowerShell" } } }, @@ -2055,7 +2311,7 @@ "if": { "properties": { "type": { - "enum": ["PromoteBuild"] + "const": "PromoteBuild" } } }, @@ -2067,7 +2323,7 @@ "if": { "properties": { "type": { - "enum": ["PublishBuildInfo"] + "const": "PublishBuildInfo" } } }, @@ -2079,7 +2335,7 @@ "if": { "properties": { "type": { - "enum": ["PushArtifactoryPackage"] + "const": "PushArtifactoryPackage" } } }, @@ -2091,7 +2347,7 @@ "if": { "properties": { "type": { - "enum": ["SignReleaseBundle"] + "const": "SignReleaseBundle" } } }, @@ -2103,7 +2359,7 @@ "if": { "properties": { "type": { - "enum": ["TriggerPipeline"] + "const": "TriggerPipeline" } } }, @@ -2115,7 +2371,7 @@ "if": { "properties": { "type": { - "enum": ["XrayScan"] + "const": "XrayScan" } } }, @@ -2172,14 +2428,15 @@ "if": { "properties": { "type": { - "enum": ["image"] + "const": "image" } } }, "then": { + "type": "object", "properties": { "type": { - "enum": ["image"] + "const": "image" }, "image": { "type": "object", @@ -2192,15 +2449,24 @@ "required": ["auto"] }, "then": { + "type": "object", "properties": { "auto": { "type": "object", "required": ["language"], "oneOf": [ { + "type": "object", + "properties": { + "version": true + }, "required": ["version"] }, { + "type": "object", + "properties": { + "versions": true + }, "required": ["versions"] } ], @@ -2209,37 +2475,75 @@ "type": "string" }, "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] }, "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "if": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "required": ["version"] }, "then": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } }, "else": { + "type": "object", "properties": { "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } } @@ -2251,6 +2555,7 @@ "additionalProperties": false }, "else": { + "type": "object", "additionalProperties": false, "properties": { "custom": { @@ -2289,16 +2594,18 @@ }, "else": { "if": { + "type": "object", "properties": { "type": { - "enum": ["host"] + "const": "host" } } }, "then": { + "type": "object", "properties": { "type": { - "enum": ["host"] + "const": "host" } }, "additionalProperties": false @@ -2456,7 +2763,14 @@ "type": "boolean" }, "failOnValidate": { - "type": ["string", "boolean"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] }, "environmentVariables": { "$ref": "#/definitions/common/EnvironmentVariables" @@ -2473,14 +2787,15 @@ "if": { "properties": { "type": { - "enum": ["image"] + "const": "image" } } }, "then": { + "type": "object", "properties": { "type": { - "enum": ["image"] + "const": "image" }, "image": { "type": "object", @@ -2493,15 +2808,24 @@ "required": ["auto"] }, "then": { + "type": "object", "properties": { "auto": { "type": "object", "required": ["language"], "oneOf": [ { + "type": "object", + "properties": { + "version": true + }, "required": ["version"] }, { + "type": "object", + "properties": { + "versions": true + }, "required": ["versions"] } ], @@ -2510,37 +2834,75 @@ "type": "string" }, "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] }, "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "if": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "required": ["version"] }, "then": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } }, "else": { + "type": "object", "properties": { "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } } @@ -2552,6 +2914,7 @@ "additionalProperties": false }, "else": { + "type": "object", "additionalProperties": false, "properties": { "custom": { @@ -2590,16 +2953,18 @@ }, "else": { "if": { + "type": "object", "properties": { "type": { - "enum": ["host"] + "const": "host" } } }, "then": { + "type": "object", "properties": { "type": { - "enum": ["host"] + "const": "host" } }, "additionalProperties": false @@ -2613,10 +2978,24 @@ "type": "string" }, "dryRun": { - "type": ["string", "boolean"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] }, "sign": { - "type": ["string", "boolean"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] }, "storeAtSourceArtifactory": { "type": "string" @@ -2787,7 +3166,14 @@ "type": "boolean" }, "dryRun": { - "type": ["string", "boolean"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] }, "environmentVariables": { "$ref": "#/definitions/common/EnvironmentVariables" @@ -2804,18 +3190,20 @@ "if": { "properties": { "type": { - "enum": ["image"] + "const": "image" } } }, "then": { + "type": "object", "properties": { "type": { - "enum": ["image"] + "const": "image" }, "image": { "type": "object", "if": { + "type": "object", "properties": { "auto": { "type": "object" @@ -2824,15 +3212,24 @@ "required": ["auto"] }, "then": { + "type": "object", "properties": { "auto": { "type": "object", "required": ["language"], "oneOf": [ { + "type": "object", + "properties": { + "version": true + }, "required": ["version"] }, { + "type": "object", + "properties": { + "versions": true + }, "required": ["versions"] } ], @@ -2841,37 +3238,75 @@ "type": "string" }, "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] }, "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "if": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "required": ["version"] }, "then": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } }, "else": { + "type": "object", "properties": { "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } } @@ -2883,6 +3318,7 @@ "additionalProperties": false }, "else": { + "type": "object", "additionalProperties": false, "properties": { "custom": { @@ -2921,16 +3357,18 @@ }, "else": { "if": { + "type": "object", "properties": { "type": { - "enum": ["host"] + "const": "host" } } }, "then": { + "type": "object", "properties": { "type": { - "enum": ["host"] + "const": "host" } }, "additionalProperties": false @@ -3099,18 +3537,20 @@ "if": { "properties": { "type": { - "enum": ["image"] + "const": "image" } } }, "then": { + "type": "object", "properties": { "type": { - "enum": ["image"] + "const": "image" }, "image": { "type": "object", "if": { + "type": "object", "properties": { "auto": { "type": "object" @@ -3119,15 +3559,24 @@ "required": ["auto"] }, "then": { + "type": "object", "properties": { "auto": { "type": "object", "required": ["language"], "oneOf": [ { + "type": "object", + "properties": { + "version": true + }, "required": ["version"] }, { + "type": "object", + "properties": { + "versions": true + }, "required": ["versions"] } ], @@ -3136,37 +3585,75 @@ "type": "string" }, "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] }, "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "if": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "required": ["version"] }, "then": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } }, "else": { + "type": "object", "properties": { "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } } @@ -3178,6 +3665,7 @@ "additionalProperties": false }, "else": { + "type": "object", "additionalProperties": false, "properties": { "custom": { @@ -3216,16 +3704,18 @@ }, "else": { "if": { + "type": "object", "properties": { "type": { - "enum": ["host"] + "const": "host" } } }, "then": { + "type": "object", "properties": { "type": { - "enum": ["host"] + "const": "host" } }, "additionalProperties": false @@ -3399,13 +3889,34 @@ "type": "string" }, "forceXrayScan": { - "type": ["string", "boolean"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] }, "failOnScan": { - "type": ["string", "boolean"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] }, "autoPublishBuildInfo": { - "type": ["string", "boolean"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] }, "environmentVariables": { "$ref": "#/definitions/common/EnvironmentVariables" @@ -3422,18 +3933,20 @@ "if": { "properties": { "type": { - "enum": ["image"] + "const": "image" } } }, "then": { + "type": "object", "properties": { "type": { - "enum": ["image"] + "const": "image" }, "image": { "type": "object", "if": { + "type": "object", "properties": { "auto": { "type": "object" @@ -3442,15 +3955,24 @@ "required": ["auto"] }, "then": { + "type": "object", "properties": { "auto": { "type": "object", "required": ["language"], "oneOf": [ { + "type": "object", + "properties": { + "version": true + }, "required": ["version"] }, { + "type": "object", + "properties": { + "versions": true + }, "required": ["versions"] } ], @@ -3459,37 +3981,75 @@ "type": "string" }, "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] }, "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "if": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "required": ["version"] }, "then": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } }, "else": { + "type": "object", "properties": { "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } } @@ -3501,6 +4061,7 @@ "additionalProperties": false }, "else": { + "type": "object", "additionalProperties": false, "properties": { "custom": { @@ -3539,16 +4100,18 @@ }, "else": { "if": { + "type": "object", "properties": { "type": { - "enum": ["host"] + "const": "host" } } }, "then": { + "type": "object", "properties": { "type": { - "enum": ["host"] + "const": "host" } }, "additionalProperties": false @@ -3717,18 +4280,20 @@ "if": { "properties": { "type": { - "enum": ["image"] + "const": "image" } } }, "then": { + "type": "object", "properties": { "type": { - "enum": ["image"] + "const": "image" }, "image": { "type": "object", "if": { + "type": "object", "properties": { "auto": { "type": "object" @@ -3737,15 +4302,24 @@ "required": ["auto"] }, "then": { + "type": "object", "properties": { "auto": { "type": "object", "required": ["language"], "oneOf": [ { + "type": "object", + "properties": { + "version": true + }, "required": ["version"] }, { + "type": "object", + "properties": { + "versions": true + }, "required": ["versions"] } ], @@ -3754,37 +4328,75 @@ "type": "string" }, "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] }, "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "if": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "required": ["version"] }, "then": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } }, "else": { + "type": "object", "properties": { "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } } @@ -3796,6 +4408,7 @@ "additionalProperties": false }, "else": { + "type": "object", "additionalProperties": false, "properties": { "custom": { @@ -3834,16 +4447,18 @@ }, "else": { "if": { + "type": "object", "properties": { "type": { - "enum": ["host"] + "const": "host" } } }, "then": { + "type": "object", "properties": { "type": { - "enum": ["host"] + "const": "host" } }, "additionalProperties": false @@ -3946,10 +4561,24 @@ "type": "string" }, "noRegistry": { - "type": ["string", "boolean"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] }, "publishDeps": { - "type": ["string", "boolean"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] }, "repository": { "type": "string" @@ -4036,18 +4665,20 @@ "if": { "properties": { "type": { - "enum": ["image"] + "const": "image" } } }, "then": { + "type": "object", "properties": { "type": { - "enum": ["image"] + "const": "image" }, "image": { "type": "object", "if": { + "type": "object", "properties": { "auto": { "type": "object" @@ -4056,15 +4687,24 @@ "required": ["auto"] }, "then": { + "type": "object", "properties": { "auto": { "type": "object", "required": ["language"], "oneOf": [ { + "type": "object", + "properties": { + "version": true + }, "required": ["version"] }, { + "type": "object", + "properties": { + "versions": true + }, "required": ["versions"] } ], @@ -4073,37 +4713,75 @@ "type": "string" }, "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] }, "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "if": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "required": ["version"] }, "then": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } }, "else": { + "type": "object", "properties": { "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } } @@ -4115,6 +4793,7 @@ "additionalProperties": false }, "else": { + "type": "object", "additionalProperties": false, "properties": { "custom": { @@ -4153,16 +4832,18 @@ }, "else": { "if": { + "type": "object", "properties": { "type": { - "enum": ["host"] + "const": "host" } } }, "then": { + "type": "object", "properties": { "type": { - "enum": ["host"] + "const": "host" } }, "additionalProperties": false @@ -4262,13 +4943,34 @@ "type": "string" }, "forceXrayScan": { - "type": ["string", "boolean"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] }, "failOnScan": { - "type": ["string", "boolean"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] }, "autoPublishBuildInfo": { - "type": ["string", "boolean"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] } }, "required": ["inputSteps", "targetRepository"] @@ -4344,18 +5046,20 @@ "if": { "properties": { "type": { - "enum": ["image"] + "const": "image" } } }, "then": { + "type": "object", "properties": { "type": { - "enum": ["image"] + "const": "image" }, "image": { "type": "object", "if": { + "type": "object", "properties": { "auto": { "type": "object" @@ -4364,15 +5068,24 @@ "required": ["auto"] }, "then": { + "type": "object", "properties": { "auto": { "type": "object", "required": ["language"], "oneOf": [ { + "type": "object", + "properties": { + "version": true + }, "required": ["version"] }, { + "type": "object", + "properties": { + "versions": true + }, "required": ["versions"] } ], @@ -4381,37 +5094,75 @@ "type": "string" }, "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] }, "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "if": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "required": ["version"] }, "then": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } }, "else": { + "type": "object", "properties": { "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } } @@ -4423,6 +5174,7 @@ "additionalProperties": false }, "else": { + "type": "object", "additionalProperties": false, "properties": { "custom": { @@ -4461,16 +5213,18 @@ }, "else": { "if": { + "type": "object", "properties": { "type": { - "enum": ["host"] + "const": "host" } } }, "then": { + "type": "object", "properties": { "type": { - "enum": ["host"] + "const": "host" } }, "additionalProperties": false @@ -4573,7 +5327,14 @@ "type": "string" }, "self": { - "type": ["string", "boolean"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] }, "deps": { "type": "string" @@ -4585,13 +5346,34 @@ "type": "string" }, "forceXrayScan": { - "type": ["string", "boolean"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] }, "failOnScan": { - "type": ["string", "boolean"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] }, "autoPublishBuildInfo": { - "type": ["string", "boolean"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] } }, "required": ["version", "targetRepository"] @@ -4667,18 +5449,20 @@ "if": { "properties": { "type": { - "enum": ["image"] + "const": "image" } } }, "then": { + "type": "object", "properties": { "type": { - "enum": ["image"] + "const": "image" }, "image": { "type": "object", "if": { + "type": "object", "properties": { "auto": { "type": "object" @@ -4687,15 +5471,24 @@ "required": ["auto"] }, "then": { + "type": "object", "properties": { "auto": { "type": "object", "required": ["language"], "oneOf": [ { + "type": "object", + "properties": { + "version": true + }, "required": ["version"] }, { + "type": "object", + "properties": { + "versions": true + }, "required": ["versions"] } ], @@ -4704,37 +5497,75 @@ "type": "string" }, "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] }, "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "if": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "required": ["version"] }, "then": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } }, "else": { + "type": "object", "properties": { "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } } @@ -4746,6 +5577,7 @@ "additionalProperties": false }, "else": { + "type": "object", "additionalProperties": false, "properties": { "custom": { @@ -4784,16 +5616,18 @@ }, "else": { "if": { + "type": "object", "properties": { "type": { - "enum": ["host"] + "const": "host" } } }, "then": { + "type": "object", "properties": { "type": { - "enum": ["host"] + "const": "host" } }, "additionalProperties": false @@ -4908,19 +5742,54 @@ "type": "string" }, "usesPlugin": { - "type": ["string", "boolean"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] }, "useWrapper": { - "type": ["string", "boolean"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] }, "forceXrayScan": { - "type": ["string", "boolean"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] }, "failOnScan": { - "type": ["string", "boolean"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] }, "autoPublishBuildInfo": { - "type": ["string", "boolean"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] } }, "required": ["gradleCommand"] @@ -5002,18 +5871,20 @@ "if": { "properties": { "type": { - "enum": ["image"] + "const": "image" } } }, "then": { + "type": "object", "properties": { "type": { - "enum": ["image"] + "const": "image" }, "image": { "type": "object", "if": { + "type": "object", "properties": { "auto": { "type": "object" @@ -5022,15 +5893,24 @@ "required": ["auto"] }, "then": { + "type": "object", "properties": { "auto": { "type": "object", "required": ["language"], "oneOf": [ { + "type": "object", + "properties": { + "version": true + }, "required": ["version"] }, { + "type": "object", + "properties": { + "versions": true + }, "required": ["versions"] } ], @@ -5039,37 +5919,75 @@ "type": "string" }, "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] }, "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "if": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "required": ["version"] }, "then": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } }, "else": { + "type": "object", "properties": { "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } } @@ -5081,6 +5999,7 @@ "additionalProperties": false }, "else": { + "type": "object", "additionalProperties": false, "properties": { "custom": { @@ -5119,16 +6038,18 @@ }, "else": { "if": { + "type": "object", "properties": { "type": { - "enum": ["host"] + "const": "host" } } }, "then": { + "type": "object", "properties": { "type": { - "enum": ["host"] + "const": "host" } }, "additionalProperties": false @@ -5266,7 +6187,14 @@ "type": "boolean" }, "helmVersion": { - "type": ["string", "integer"], + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ], "enum": ["2", "3", 2, 3] }, "namespace": { @@ -5334,16 +6262,37 @@ "type": "string" }, "dryRun": { - "type": ["string", "boolean"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] }, "lint": { - "type": ["string", "boolean"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] }, "lintFlags": { "type": "string" }, "test": { - "type": ["string", "boolean"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] }, "testFlags": { "type": "string" @@ -5363,18 +6312,20 @@ "if": { "properties": { "type": { - "enum": ["image"] + "const": "image" } } }, "then": { + "type": "object", "properties": { "type": { - "enum": ["image"] + "const": "image" }, "image": { "type": "object", "if": { + "type": "object", "properties": { "auto": { "type": "object" @@ -5383,15 +6334,24 @@ "required": ["auto"] }, "then": { + "type": "object", "properties": { "auto": { "type": "object", "required": ["language"], "oneOf": [ { + "type": "object", + "properties": { + "version": true + }, "required": ["version"] }, { + "type": "object", + "properties": { + "versions": true + }, "required": ["versions"] } ], @@ -5400,37 +6360,75 @@ "type": "string" }, "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] }, "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "if": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "required": ["version"] }, "then": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } }, "else": { + "type": "object", "properties": { "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } } @@ -5442,6 +6440,7 @@ "additionalProperties": false }, "else": { + "type": "object", "additionalProperties": false, "properties": { "custom": { @@ -5480,16 +6479,18 @@ }, "else": { "if": { + "type": "object", "properties": { "type": { - "enum": ["host"] + "const": "host" } } }, "then": { + "type": "object", "properties": { "type": { - "enum": ["host"] + "const": "host" } }, "additionalProperties": false @@ -5647,20 +6648,23 @@ }, "required": ["type"], "if": { + "type": "object", "properties": { "type": { - "enum": ["image"] + "const": "image" } } }, "then": { + "type": "object", "properties": { "type": { - "enum": ["image"] + "const": "image" }, "image": { "type": "object", "if": { + "type": "object", "properties": { "auto": { "type": "object" @@ -5669,15 +6673,24 @@ "required": ["auto"] }, "then": { + "type": "object", "properties": { "auto": { "type": "object", "required": ["language"], "oneOf": [ { + "type": "object", + "properties": { + "version": true + }, "required": ["version"] }, { + "type": "object", + "properties": { + "versions": true + }, "required": ["versions"] } ], @@ -5686,37 +6699,75 @@ "type": "string" }, "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] }, "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "if": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "required": ["version"] }, "then": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } }, "else": { + "type": "object", "properties": { "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } } @@ -5728,6 +6779,7 @@ "additionalProperties": false }, "else": { + "type": "object", "additionalProperties": false, "properties": { "custom": { @@ -5766,16 +6818,18 @@ }, "else": { "if": { + "type": "object", "properties": { "type": { - "enum": ["host"] + "const": "host" } } }, "then": { + "type": "object", "properties": { "type": { - "enum": ["host"] + "const": "host" } }, "additionalProperties": false @@ -5913,7 +6967,14 @@ "type": "boolean" }, "helmVersion": { - "type": ["string", "integer"], + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ], "enum": ["2", "3", 2, 3] }, "chartPath": { @@ -5938,16 +6999,37 @@ "type": "string" }, "dryRun": { - "type": ["string", "boolean"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] }, "lint": { - "type": ["string", "boolean"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] }, "lintFlags": { "type": "string" }, "test": { - "type": ["string", "boolean"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] }, "testFlags": { "type": "string" @@ -5965,20 +7047,23 @@ }, "required": ["type"], "if": { + "type": "object", "properties": { "type": { - "enum": ["image"] + "const": "image" } } }, "then": { + "type": "object", "properties": { "type": { - "enum": ["image"] + "const": "image" }, "image": { "type": "object", "if": { + "type": "object", "properties": { "auto": { "type": "object" @@ -5987,15 +7072,24 @@ "required": ["auto"] }, "then": { + "type": "object", "properties": { "auto": { "type": "object", "required": ["language"], "oneOf": [ { + "type": "object", + "properties": { + "version": true + }, "required": ["version"] }, { + "type": "object", + "properties": { + "versions": true + }, "required": ["versions"] } ], @@ -6004,37 +7098,75 @@ "type": "string" }, "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] }, "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "if": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "required": ["version"] }, "then": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } }, "else": { + "type": "object", "properties": { "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } } @@ -6046,6 +7178,7 @@ "additionalProperties": false }, "else": { + "type": "object", "additionalProperties": false, "properties": { "custom": { @@ -6084,16 +7217,18 @@ }, "else": { "if": { + "type": "object", "properties": { "type": { - "enum": ["host"] + "const": "host" } } }, "then": { + "type": "object", "properties": { "type": { - "enum": ["host"] + "const": "host" } }, "additionalProperties": false @@ -6252,23 +7387,51 @@ "type": "string" }, "forceXrayScan": { - "type": ["string", "boolean"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] }, "autoPublishBuildInfo": { - "type": ["string", "boolean"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] }, "flags": { "type": "string" }, "helmVersion": { - "type": ["string", "integer"], + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ], "enum": ["2", "3", 2, 3] }, "valueFilePaths": { "type": "array" }, "lint": { - "type": ["string", "boolean"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] }, "lintFlags": { "type": "string" @@ -6286,20 +7449,23 @@ }, "required": ["type"], "if": { + "type": "object", "properties": { "type": { - "enum": ["image"] + "const": "image" } } }, "then": { + "type": "object", "properties": { "type": { - "enum": ["image"] + "const": "image" }, "image": { "type": "object", "if": { + "type": "object", "properties": { "auto": { "type": "object" @@ -6308,15 +7474,24 @@ "required": ["auto"] }, "then": { + "type": "object", "properties": { "auto": { "type": "object", "required": ["language"], "oneOf": [ { + "type": "object", + "properties": { + "version": true + }, "required": ["version"] }, { + "type": "object", + "properties": { + "versions": true + }, "required": ["versions"] } ], @@ -6325,37 +7500,75 @@ "type": "string" }, "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] }, "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "if": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "required": ["version"] }, "then": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } }, "else": { + "type": "object", "properties": { "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } } @@ -6367,6 +7580,7 @@ "additionalProperties": false }, "else": { + "type": "object", "additionalProperties": false, "properties": { "custom": { @@ -6405,16 +7619,18 @@ }, "else": { "if": { + "type": "object", "properties": { "type": { - "enum": ["host"] + "const": "host" } } }, "then": { + "type": "object", "properties": { "type": { - "enum": ["host"] + "const": "host" } }, "additionalProperties": false @@ -6572,7 +7788,14 @@ "buildParameters": { "type": "object", "additionalProperties": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "inputSteps": { @@ -6704,20 +7927,23 @@ }, "required": ["type"], "if": { + "type": "object", "properties": { "type": { - "enum": ["image"] + "const": "image" } } }, "then": { + "type": "object", "properties": { "type": { - "enum": ["image"] + "const": "image" }, "image": { "type": "object", "if": { + "type": "object", "properties": { "auto": { "type": "object" @@ -6726,15 +7952,24 @@ "required": ["auto"] }, "then": { + "type": "object", "properties": { "auto": { "type": "object", "required": ["language"], "oneOf": [ { + "type": "object", + "properties": { + "version": true + }, "required": ["version"] }, { + "type": "object", + "properties": { + "versions": true + }, "required": ["versions"] } ], @@ -6743,37 +7978,75 @@ "type": "string" }, "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] }, "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "if": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "required": ["version"] }, "then": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } }, "else": { + "type": "object", "properties": { "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } } @@ -6785,6 +8058,7 @@ "additionalProperties": false }, "else": { + "type": "object", "additionalProperties": false, "properties": { "custom": { @@ -6823,16 +8097,18 @@ }, "else": { "if": { + "type": "object", "properties": { "type": { - "enum": ["host"] + "const": "host" } } }, "then": { + "type": "object", "properties": { "type": { - "enum": ["host"] + "const": "host" } }, "additionalProperties": false @@ -6939,8 +8215,7 @@ "items": { "type": "object", "additionalProperties": true - }, - "additionalProperties": false + } }, "runtimes": { "type": "array", @@ -6955,20 +8230,23 @@ }, "required": ["type"], "if": { + "type": "object", "properties": { "type": { - "enum": ["image"] + "const": "image" } } }, "then": { + "type": "object", "properties": { "type": { - "enum": ["image"] + "const": "image" }, "image": { "type": "object", "if": { + "type": "object", "properties": { "auto": { "type": "object" @@ -6977,6 +8255,7 @@ "required": ["auto"] }, "then": { + "type": "object", "additionalProperties": false, "properties": { "auto": { @@ -6991,7 +8270,14 @@ "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } } @@ -6999,6 +8285,7 @@ } }, "else": { + "type": "object", "additionalProperties": false, "properties": { "custom": { @@ -7037,23 +8324,24 @@ }, "else": { "if": { + "type": "object", "properties": { "type": { - "enum": ["host"] + "const": "host" } } }, "then": { + "type": "object", "properties": { "type": { - "enum": ["host"] + "const": "host" } }, "additionalProperties": false } } - }, - "additionalProperties": false + } }, "exclude": { "type": "array", @@ -7073,20 +8361,23 @@ }, "required": ["type"], "if": { + "type": "object", "properties": { "type": { - "enum": ["image"] + "const": "image" } } }, "then": { + "type": "object", "properties": { "type": { - "enum": ["image"] + "const": "image" }, "image": { "type": "object", "if": { + "type": "object", "properties": { "auto": { "type": "object" @@ -7095,6 +8386,7 @@ "required": ["auto"] }, "then": { + "type": "object", "additionalProperties": false, "properties": { "auto": { @@ -7109,7 +8401,14 @@ "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } } @@ -7117,6 +8416,7 @@ } }, "else": { + "type": "object", "additionalProperties": false, "properties": { "custom": { @@ -7155,30 +8455,30 @@ }, "else": { "if": { + "type": "object", "properties": { "type": { - "enum": ["host"] + "const": "host" } } }, "then": { + "type": "object", "properties": { "type": { - "enum": ["host"] + "const": "host" } }, "additionalProperties": false } } - }, - "additionalProperties": false - } - }, - "additionalProperties": false + } + }, + "additionalProperties": false + } }, "fastFail": { - "type": "boolean", - "additionalProperties": false + "type": "boolean" }, "allowFailures": { "type": "array", @@ -7198,20 +8498,23 @@ }, "required": ["type"], "if": { + "type": "object", "properties": { "type": { - "enum": ["image"] + "const": "image" } } }, "then": { + "type": "object", "properties": { "type": { - "enum": ["image"] + "const": "image" }, "image": { "type": "object", "if": { + "type": "object", "properties": { "auto": { "type": "object" @@ -7220,6 +8523,7 @@ "required": ["auto"] }, "then": { + "type": "object", "additionalProperties": false, "properties": { "auto": { @@ -7234,7 +8538,14 @@ "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } } @@ -7242,6 +8553,7 @@ } }, "else": { + "type": "object", "additionalProperties": false, "properties": { "custom": { @@ -7280,16 +8592,18 @@ }, "else": { "if": { + "type": "object", "properties": { "type": { - "enum": ["host"] + "const": "host" } } }, "then": { + "type": "object", "properties": { "type": { - "enum": ["host"] + "const": "host" } }, "additionalProperties": false @@ -7298,10 +8612,8 @@ } }, "additionalProperties": false - }, - "additionalProperties": false - }, - "additionalProperties": false + } + } }, "additionalProperties": false }, @@ -7377,20 +8689,23 @@ }, "required": ["type"], "if": { + "type": "object", "properties": { "type": { - "enum": ["image"] + "const": "image" } } }, "then": { + "type": "object", "properties": { "type": { - "enum": ["image"] + "const": "image" }, "image": { "type": "object", "if": { + "type": "object", "properties": { "auto": { "type": "object" @@ -7399,15 +8714,24 @@ "required": ["auto"] }, "then": { + "type": "object", "properties": { "auto": { "type": "object", "required": ["language"], "oneOf": [ { + "type": "object", + "properties": { + "version": true + }, "required": ["version"] }, { + "type": "object", + "properties": { + "versions": true + }, "required": ["versions"] } ], @@ -7416,37 +8740,75 @@ "type": "string" }, "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] }, "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "if": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "required": ["version"] }, "then": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } }, "else": { + "type": "object", "properties": { "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } } @@ -7458,6 +8820,7 @@ "additionalProperties": false }, "else": { + "type": "object", "additionalProperties": false, "properties": { "custom": { @@ -7496,16 +8859,18 @@ }, "else": { "if": { + "type": "object", "properties": { "type": { - "enum": ["host"] + "const": "host" } } }, "then": { + "type": "object", "properties": { "type": { - "enum": ["host"] + "const": "host" } }, "additionalProperties": false @@ -7675,20 +9040,23 @@ }, "required": ["type"], "if": { + "type": "object", "properties": { "type": { - "enum": ["image"] + "const": "image" } } }, "then": { + "type": "object", "properties": { "type": { - "enum": ["image"] + "const": "image" }, "image": { "type": "object", "if": { + "type": "object", "properties": { "auto": { "type": "object" @@ -7697,15 +9065,24 @@ "required": ["auto"] }, "then": { + "type": "object", "properties": { "auto": { "type": "object", "required": ["language"], "oneOf": [ { + "type": "object", + "properties": { + "version": true + }, "required": ["version"] }, { + "type": "object", + "properties": { + "versions": true + }, "required": ["versions"] } ], @@ -7714,37 +9091,75 @@ "type": "string" }, "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] }, "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "if": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "required": ["version"] }, "then": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } }, "else": { + "type": "object", "properties": { "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } } @@ -7756,6 +9171,7 @@ "additionalProperties": false }, "else": { + "type": "object", "additionalProperties": false, "properties": { "custom": { @@ -7794,16 +9210,18 @@ }, "else": { "if": { + "type": "object", "properties": { "type": { - "enum": ["host"] + "const": "host" } } }, "then": { + "type": "object", "properties": { "type": { - "enum": ["host"] + "const": "host" } }, "additionalProperties": false @@ -7961,13 +9379,34 @@ "type": "boolean" }, "forceXrayScan": { - "type": ["string", "boolean"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] }, "failOnScan": { - "type": ["string", "boolean"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] }, "autoPublishBuildInfo": { - "type": ["string", "boolean"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] }, "environmentVariables": { "$ref": "#/definitions/common/EnvironmentVariables" @@ -7982,20 +9421,23 @@ }, "required": ["type"], "if": { + "type": "object", "properties": { "type": { - "enum": ["image"] + "const": "image" } } }, "then": { + "type": "object", "properties": { "type": { - "enum": ["image"] + "const": "image" }, "image": { "type": "object", "if": { + "type": "object", "properties": { "auto": { "type": "object" @@ -8004,15 +9446,24 @@ "required": ["auto"] }, "then": { + "type": "object", "properties": { "auto": { "type": "object", "required": ["language"], "oneOf": [ { + "type": "object", + "properties": { + "version": true + }, "required": ["version"] }, { + "type": "object", + "properties": { + "versions": true + }, "required": ["versions"] } ], @@ -8021,37 +9472,75 @@ "type": "string" }, "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] }, "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "if": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "required": ["version"] }, "then": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } }, "else": { + "type": "object", "properties": { "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } } @@ -8063,6 +9552,7 @@ "additionalProperties": false }, "else": { + "type": "object", "additionalProperties": false, "properties": { "custom": { @@ -8101,16 +9591,18 @@ }, "else": { "if": { + "type": "object", "properties": { "type": { - "enum": ["host"] + "const": "host" } } }, "then": { + "type": "object", "properties": { "type": { - "enum": ["host"] + "const": "host" } }, "additionalProperties": false @@ -8310,20 +9802,23 @@ }, "required": ["type"], "if": { + "type": "object", "properties": { "type": { - "enum": ["image"] + "const": "image" } } }, "then": { + "type": "object", "properties": { "type": { - "enum": ["image"] + "const": "image" }, "image": { "type": "object", "if": { + "type": "object", "properties": { "auto": { "type": "object" @@ -8332,15 +9827,24 @@ "required": ["auto"] }, "then": { + "type": "object", "properties": { "auto": { "type": "object", "required": ["language"], "oneOf": [ { + "type": "object", + "properties": { + "version": true + }, "required": ["version"] }, { + "type": "object", + "properties": { + "versions": true + }, "required": ["versions"] } ], @@ -8349,37 +9853,75 @@ "type": "string" }, "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] }, "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "if": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "required": ["version"] }, "then": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } }, "else": { + "type": "object", "properties": { "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } } @@ -8391,6 +9933,7 @@ "additionalProperties": false }, "else": { + "type": "object", "additionalProperties": false, "properties": { "custom": { @@ -8429,16 +9972,18 @@ }, "else": { "if": { + "type": "object", "properties": { "type": { - "enum": ["host"] + "const": "host" } } }, "then": { + "type": "object", "properties": { "type": { - "enum": ["host"] + "const": "host" } }, "additionalProperties": false @@ -8599,13 +10144,34 @@ "type": "string" }, "forceXrayScan": { - "type": ["string", "boolean"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] }, "failOnScan": { - "type": ["string", "boolean"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] }, "autoPublishBuildInfo": { - "type": ["string", "boolean"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] }, "environmentVariables": { "$ref": "#/definitions/common/EnvironmentVariables" @@ -8622,18 +10188,19 @@ "if": { "properties": { "type": { - "enum": ["image"] + "const": "image" } } }, "then": { "properties": { "type": { - "enum": ["image"] + "const": "image" }, "image": { "type": "object", "if": { + "type": "object", "properties": { "auto": { "type": "object" @@ -8642,15 +10209,24 @@ "required": ["auto"] }, "then": { + "type": "object", "properties": { "auto": { "type": "object", "required": ["language"], "oneOf": [ { + "type": "object", + "properties": { + "version": true + }, "required": ["version"] }, { + "type": "object", + "properties": { + "versions": true + }, "required": ["versions"] } ], @@ -8659,37 +10235,75 @@ "type": "string" }, "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] }, "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "if": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "required": ["version"] }, "then": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } }, "else": { + "type": "object", "properties": { "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } } @@ -8701,6 +10315,7 @@ "additionalProperties": false }, "else": { + "type": "object", "additionalProperties": false, "properties": { "custom": { @@ -8741,14 +10356,14 @@ "if": { "properties": { "type": { - "enum": ["host"] + "const": "host" } } }, "then": { "properties": { "type": { - "enum": ["host"] + "const": "host" } }, "additionalProperties": false @@ -8918,18 +10533,19 @@ "if": { "properties": { "type": { - "enum": ["image"] + "const": "image" } } }, "then": { "properties": { "type": { - "enum": ["image"] + "const": "image" }, "image": { "type": "object", "if": { + "type": "object", "properties": { "auto": { "type": "object" @@ -8938,15 +10554,24 @@ "required": ["auto"] }, "then": { + "type": "object", "properties": { "auto": { "type": "object", "required": ["language"], "oneOf": [ { + "type": "object", + "properties": { + "version": true + }, "required": ["version"] }, { + "type": "object", + "properties": { + "versions": true + }, "required": ["versions"] } ], @@ -8955,37 +10580,75 @@ "type": "string" }, "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] }, "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "if": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "required": ["version"] }, "then": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } }, "else": { + "type": "object", "properties": { "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } } @@ -8997,6 +10660,7 @@ "additionalProperties": false }, "else": { + "type": "object", "additionalProperties": false, "properties": { "custom": { @@ -9037,14 +10701,14 @@ "if": { "properties": { "type": { - "enum": ["host"] + "const": "host" } } }, "then": { "properties": { "type": { - "enum": ["host"] + "const": "host" } }, "additionalProperties": false @@ -9206,7 +10870,14 @@ "type": "string" }, "includeDependencies": { - "type": ["string", "boolean"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] }, "status": { "type": "string" @@ -9215,10 +10886,24 @@ "type": "string" }, "copy": { - "type": ["string", "boolean"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] }, "failOnValidate": { - "type": ["string", "boolean"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] }, "environmentVariables": { "$ref": "#/definitions/common/EnvironmentVariables" @@ -9235,18 +10920,19 @@ "if": { "properties": { "type": { - "enum": ["image"] + "const": "image" } } }, "then": { "properties": { "type": { - "enum": ["image"] + "const": "image" }, "image": { "type": "object", "if": { + "type": "object", "properties": { "auto": { "type": "object" @@ -9255,15 +10941,24 @@ "required": ["auto"] }, "then": { + "type": "object", "properties": { "auto": { "type": "object", "required": ["language"], "oneOf": [ { + "type": "object", + "properties": { + "version": true + }, "required": ["version"] }, { + "type": "object", + "properties": { + "versions": true + }, "required": ["versions"] } ], @@ -9272,37 +10967,75 @@ "type": "string" }, "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] }, "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "if": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "required": ["version"] }, "then": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } }, "else": { + "type": "object", "properties": { "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } } @@ -9314,6 +11047,7 @@ "additionalProperties": false }, "else": { + "type": "object", "additionalProperties": false, "properties": { "custom": { @@ -9354,14 +11088,14 @@ "if": { "properties": { "type": { - "enum": ["host"] + "const": "host" } } }, "then": { "properties": { "type": { - "enum": ["host"] + "const": "host" } }, "additionalProperties": false @@ -9523,10 +11257,24 @@ "type": "string" }, "forceXrayScan": { - "type": ["string", "boolean"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] }, "failOnScan": { - "type": ["string", "boolean"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] }, "runtime": { "type": "object", @@ -9540,18 +11288,19 @@ "if": { "properties": { "type": { - "enum": ["image"] + "const": "image" } } }, "then": { "properties": { "type": { - "enum": ["image"] + "const": "image" }, "image": { "type": "object", "if": { + "type": "object", "properties": { "auto": { "type": "object" @@ -9560,15 +11309,24 @@ "required": ["auto"] }, "then": { + "type": "object", "properties": { "auto": { "type": "object", "required": ["language"], "oneOf": [ { + "type": "object", + "properties": { + "version": true + }, "required": ["version"] }, { + "type": "object", + "properties": { + "versions": true + }, "required": ["versions"] } ], @@ -9577,37 +11335,75 @@ "type": "string" }, "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] }, "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "if": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "required": ["version"] }, "then": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } }, "else": { + "type": "object", "properties": { "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } } @@ -9619,6 +11415,7 @@ "additionalProperties": false }, "else": { + "type": "object", "additionalProperties": false, "properties": { "custom": { @@ -9659,14 +11456,14 @@ "if": { "properties": { "type": { - "enum": ["host"] + "const": "host" } } }, "then": { "properties": { "type": { - "enum": ["host"] + "const": "host" } }, "additionalProperties": false @@ -9828,13 +11625,34 @@ "type": "string" }, "forceXrayScan": { - "type": ["string", "boolean"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] }, "failOnScan": { - "type": ["string", "boolean"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] }, "autoPublishBuildInfo": { - "type": ["string", "boolean"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] }, "environmentVariables": { "$ref": "#/definitions/common/EnvironmentVariables" @@ -9851,18 +11669,19 @@ "if": { "properties": { "type": { - "enum": ["image"] + "const": "image" } } }, "then": { "properties": { "type": { - "enum": ["image"] + "const": "image" }, "image": { "type": "object", "if": { + "type": "object", "properties": { "auto": { "type": "object" @@ -9871,15 +11690,24 @@ "required": ["auto"] }, "then": { + "type": "object", "properties": { "auto": { "type": "object", "required": ["language"], "oneOf": [ { + "type": "object", + "properties": { + "version": true + }, "required": ["version"] }, { + "type": "object", + "properties": { + "versions": true + }, "required": ["versions"] } ], @@ -9888,37 +11716,75 @@ "type": "string" }, "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] }, "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "if": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "required": ["version"] }, "then": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } }, "else": { + "type": "object", "properties": { "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } } @@ -9930,6 +11796,7 @@ "additionalProperties": false }, "else": { + "type": "object", "additionalProperties": false, "properties": { "custom": { @@ -9970,14 +11837,14 @@ "if": { "properties": { "type": { - "enum": ["host"] + "const": "host" } } }, "then": { "properties": { "type": { - "enum": ["host"] + "const": "host" } }, "additionalProperties": false @@ -10144,18 +12011,19 @@ "if": { "properties": { "type": { - "enum": ["image"] + "const": "image" } } }, "then": { "properties": { "type": { - "enum": ["image"] + "const": "image" }, "image": { "type": "object", "if": { + "type": "object", "properties": { "auto": { "type": "object" @@ -10164,15 +12032,24 @@ "required": ["auto"] }, "then": { + "type": "object", "properties": { "auto": { "type": "object", "required": ["language"], "oneOf": [ { + "type": "object", + "properties": { + "version": true + }, "required": ["version"] }, { + "type": "object", + "properties": { + "versions": true + }, "required": ["versions"] } ], @@ -10181,37 +12058,75 @@ "type": "string" }, "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] }, "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "if": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "required": ["version"] }, "then": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } }, "else": { + "type": "object", "properties": { "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } } @@ -10223,6 +12138,7 @@ "additionalProperties": false }, "else": { + "type": "object", "additionalProperties": false, "properties": { "custom": { @@ -10263,14 +12179,14 @@ "if": { "properties": { "type": { - "enum": ["host"] + "const": "host" } } }, "then": { "properties": { "type": { - "enum": ["host"] + "const": "host" } }, "additionalProperties": false @@ -10439,18 +12355,19 @@ "if": { "properties": { "type": { - "enum": ["image"] + "const": "image" } } }, "then": { "properties": { "type": { - "enum": ["image"] + "const": "image" }, "image": { "type": "object", "if": { + "type": "object", "properties": { "auto": { "type": "object" @@ -10459,15 +12376,24 @@ "required": ["auto"] }, "then": { + "type": "object", "properties": { "auto": { "type": "object", "required": ["language"], "oneOf": [ { + "type": "object", + "properties": { + "version": true + }, "required": ["version"] }, { + "type": "object", + "properties": { + "versions": true + }, "required": ["versions"] } ], @@ -10476,37 +12402,75 @@ "type": "string" }, "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] }, "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "if": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "required": ["version"] }, "then": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } }, "else": { + "type": "object", "properties": { "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } } @@ -10518,6 +12482,7 @@ "additionalProperties": false }, "else": { + "type": "object", "additionalProperties": false, "properties": { "custom": { @@ -10558,14 +12523,14 @@ "if": { "properties": { "type": { - "enum": ["host"] + "const": "host" } } }, "then": { "properties": { "type": { - "enum": ["host"] + "const": "host" } }, "additionalProperties": false @@ -10733,7 +12698,14 @@ "type": "boolean" }, "failOnScan": { - "type": ["string", "boolean"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] }, "environmentVariables": { "$ref": "#/definitions/common/EnvironmentVariables" @@ -10839,18 +12811,20 @@ "if": { "properties": { "type": { - "enum": ["image"] + "const": "image" } } }, "then": { + "type": "object", "properties": { "type": { - "enum": ["image"] + "const": "image" }, "image": { "type": "object", "if": { + "type": "object", "properties": { "auto": { "type": "object" @@ -10859,15 +12833,24 @@ "required": ["auto"] }, "then": { + "type": "object", "properties": { "auto": { "type": "object", "required": ["language"], "oneOf": [ { + "type": "object", + "properties": { + "version": true + }, "required": ["version"] }, { + "type": "object", + "properties": { + "versions": true + }, "required": ["versions"] } ], @@ -10876,37 +12859,75 @@ "type": "string" }, "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] }, "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "if": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, "required": ["version"] }, "then": { + "type": "object", "properties": { "version": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } }, "else": { + "type": "object", "properties": { "versions": { "type": "array", "minItems": 1, "items": { - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } } @@ -10918,6 +12939,7 @@ "additionalProperties": false }, "else": { + "type": "object", "additionalProperties": false, "properties": { "custom": { @@ -10958,14 +12980,14 @@ "if": { "properties": { "type": { - "enum": ["host"] + "const": "host" } } }, "then": { "properties": { "type": { - "enum": ["host"] + "const": "host" } }, "additionalProperties": false @@ -11004,79 +13026,127 @@ "EnvironmentVariables": { "type": "object", "additionalProperties": { - "type": ["string", "number", "object"], - "properties": { - "description": { + "anyOf": [ + { "type": "string" }, - "default": { - "type": ["string", "number"] - }, - "values": { - "type": "array", - "minItems": 1, - "items": { - "type": ["string", "number"] - } - }, - "allowCustom": { - "type": "boolean" - }, - "allowMultipleValues": { - "type": "boolean" + { + "type": "number" }, - "defaultMultipleValues": { - "type": "array", - "minItems": 1, - "items": { - "type": ["string", "number"] - } - } - }, - "anyOf": [ - { "required": ["default"] }, - { "required": ["defaultMultipleValues"] } - ] - } - }, - "RequiresApproval": { - "type": ["boolean", "object"], - "additionalProperties": false, - "properties": { - "timeoutSeconds": { - "type": "integer", - "exclusiveMinimum": 0 - }, - "approvers": { - "type": "array", - "minItems": 1, - "items": { - "type": "string" - } - }, - "notifications": { - "type": "array", - "minItems": 1, - "items": { + { "type": "object", - "additionalProperties": false, "properties": { - "integrationName": { + "description": { "type": "string" }, - "recipients": { + "default": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "values": { "type": "array", "minItems": 1, "items": { - "type": "string" + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "allowCustom": { + "type": "boolean" + }, + "allowMultipleValues": { + "type": "boolean" + }, + "defaultMultipleValues": { + "type": "array", + "minItems": 1, + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } }, - "required": ["integrationName"] + "anyOf": [ + { + "properties": { + "default": true + }, + "required": ["default"] + }, + { + "properties": { + "defaultMultipleValues": true + }, + "required": ["defaultMultipleValues"] + } + ] } - } + ] } }, + "RequiresApproval": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "timeoutSeconds": { + "type": "integer", + "exclusiveMinimum": 0 + }, + "approvers": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "notifications": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "integrationName": { + "type": "string" + }, + "recipients": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + } + }, + "required": ["integrationName"] + } + } + } + } + ] + }, "Task": { "type": "object", "properties": { diff --git a/src/schemas/json/tfpowershell-datasource.json b/src/schemas/json/tfpowershell-datasource.json new file mode 100644 index 00000000000..4c45babe522 --- /dev/null +++ b/src/schemas/json/tfpowershell-datasource.json @@ -0,0 +1,417 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://json.schemastore.org/tfpowershell-datasource.json", + "title": "Terraform PowerShell provider data source manifest", + "description": "A datasource.tfps.json manifest, declaring the typed Terraform attributes of one data source in a provider built on terraform-provider-powershell. It sits in provider/data-sources// next to the read.ps1 script that implements it.", + "type": "object", + "additionalProperties": false, + "required": ["version", "attributes"], + "properties": { + "$schema": { + "description": "Link to this document. The provider engine accepts and ignores it.", + "type": "string", + "format": "uri" + }, + "version": { + "description": "Manifest format version. Only 1 exists; the engine rejects any other value rather than half-applying a manifest written for a newer format.", + "const": 1 + }, + "description": { + "description": "What the data source reads. Surfaced in the Terraform Registry docs and in `terraform providers schema`.", + "type": "string" + }, + "timeout_seconds": { + "description": "Per-operation timeout for this data source's read.ps1. Omit to inherit the provider's timeout attribute.", + "type": "integer", + "minimum": 0 + }, + "attributes": { + "description": "The data source's attributes, keyed by attribute name. At least one is required.", + "type": "object", + "minProperties": 1, + "propertyNames": { + "pattern": "^[a-z][a-z0-9_]*$" + }, + "additionalProperties": { + "$ref": "#/definitions/attribute" + } + } + }, + "definitions": { + "attribute": { + "description": "One attribute declaration.", + "type": "object", + "additionalProperties": false, + "required": ["type"], + "properties": { + "type": { + "description": "The attribute's Terraform type. `json` is a string attribute validated as a JSON object, decoded into a real object in $InputData, and re-encoded on the way out.", + "enum": [ + "string", + "bool", + "int", + "number", + "list", + "set", + "map", + "json" + ] + }, + "element_type": { + "description": "Element type of a list, set, or map attribute. Required for those three types and not allowed on any other.", + "enum": ["string", "bool", "int", "number"] + }, + "required": { + "description": "The practitioner must set this attribute. Exactly one of required, optional, or computed must be true.", + "type": "boolean" + }, + "optional": { + "description": "The practitioner may set this attribute. Exactly one of required, optional, or computed must be true.", + "type": "boolean" + }, + "computed": { + "description": "The scripts supply this attribute; it never appears in configuration. Exactly one of required, optional, or computed must be true.", + "type": "boolean" + }, + "sensitive": { + "description": "Redact the value in CLI output and plans.", + "type": "boolean" + }, + "description": { + "description": "What the attribute means. Surfaced in the Terraform Registry docs and in `terraform providers schema`.", + "type": "string" + }, + "default": { + "description": "Value injected into $InputData when the practitioner leaves this optional attribute null. Terraform state still records null - the default is visible to your scripts, not to Terraform. Its JSON type must match the declared type." + }, + "validators": { + "description": "Plan-time value constraints. Only string, int, and number config attributes can carry them.", + "type": "array", + "items": { + "description": "One validator. Each entry is an object with exactly one recognized key.", + "type": "object", + "additionalProperties": false, + "required": ["one_of"], + "properties": { + "one_of": { + "description": "The permitted values. Each must match the attribute's declared type.", + "type": "array", + "minItems": 1 + } + } + } + } + }, + "allOf": [ + { + "description": "Exactly one of required, optional, or computed must be true.", + "oneOf": [ + { + "type": "object", + "required": ["required"], + "properties": { + "required": { + "const": true + }, + "optional": { + "const": false + }, + "computed": { + "const": false + } + } + }, + { + "type": "object", + "required": ["optional"], + "properties": { + "optional": { + "const": true + }, + "required": { + "const": false + }, + "computed": { + "const": false + } + } + }, + { + "type": "object", + "required": ["computed"], + "properties": { + "computed": { + "const": true + }, + "required": { + "const": false + }, + "optional": { + "const": false + } + } + } + ] + }, + { + "description": "list, set, and map attributes require an element_type; no other type may declare one.", + "if": { + "type": "object", + "required": ["type"], + "properties": { + "type": { + "enum": ["list", "set", "map"] + } + } + }, + "then": { + "type": "object", + "required": ["element_type"], + "properties": { + "element_type": true + } + }, + "else": { + "not": { + "type": "object", + "required": ["element_type"], + "properties": { + "element_type": true + } + } + } + }, + { + "description": "A non-null default only applies to an optional attribute.", + "if": { + "type": "object", + "required": ["default"], + "properties": { + "default": { + "not": { + "type": "null" + } + } + } + }, + "then": { + "type": "object", + "required": ["optional"], + "properties": { + "optional": { + "const": true + } + } + } + }, + { + "description": "Validators only apply to non-computed string, int, and number attributes.", + "if": { + "type": "object", + "required": ["validators"], + "properties": { + "validators": { + "type": "array", + "minItems": 1 + } + } + }, + "then": { + "type": "object", + "required": ["type"], + "properties": { + "type": { + "enum": ["string", "int", "number"] + }, + "computed": { + "const": false + } + } + } + }, + { + "description": "one_of values on a string attribute must be strings.", + "if": { + "type": "object", + "required": ["type"], + "properties": { + "type": { + "const": "string" + } + } + }, + "then": { + "type": "object", + "properties": { + "validators": { + "type": "array", + "items": { + "type": "object", + "properties": { + "one_of": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + { + "description": "one_of values on an int or number attribute must be numbers.", + "if": { + "type": "object", + "required": ["type"], + "properties": { + "type": { + "enum": ["int", "number"] + } + } + }, + "then": { + "type": "object", + "properties": { + "validators": { + "type": "array", + "items": { + "type": "object", + "properties": { + "one_of": { + "type": "array", + "items": { + "type": "number" + } + } + } + } + } + } + } + }, + { + "description": "A string attribute's default must be a string.", + "if": { + "type": "object", + "required": ["type"], + "properties": { + "type": { + "const": "string" + } + } + }, + "then": { + "type": "object", + "properties": { + "default": { + "type": ["string", "null"] + } + } + } + }, + { + "description": "A bool attribute's default must be a boolean.", + "if": { + "type": "object", + "required": ["type"], + "properties": { + "type": { + "const": "bool" + } + } + }, + "then": { + "type": "object", + "properties": { + "default": { + "type": ["boolean", "null"] + } + } + } + }, + { + "description": "An int attribute's default must be a whole number.", + "if": { + "type": "object", + "required": ["type"], + "properties": { + "type": { + "const": "int" + } + } + }, + "then": { + "type": "object", + "properties": { + "default": { + "type": ["integer", "null"] + } + } + } + }, + { + "description": "A number attribute's default must be a number.", + "if": { + "type": "object", + "required": ["type"], + "properties": { + "type": { + "const": "number" + } + } + }, + "then": { + "type": "object", + "properties": { + "default": { + "type": ["number", "null"] + } + } + } + }, + { + "description": "A json or map attribute's default must be an object.", + "if": { + "type": "object", + "required": ["type"], + "properties": { + "type": { + "enum": ["json", "map"] + } + } + }, + "then": { + "type": "object", + "properties": { + "default": { + "type": ["object", "null"] + } + } + } + }, + { + "description": "A list or set attribute's default must be an array.", + "if": { + "type": "object", + "required": ["type"], + "properties": { + "type": { + "enum": ["list", "set"] + } + } + }, + "then": { + "type": "object", + "properties": { + "default": { + "type": ["array", "null"] + } + } + } + } + ] + } + } +} diff --git a/src/schemas/json/tfpowershell-provider.json b/src/schemas/json/tfpowershell-provider.json new file mode 100644 index 00000000000..cfa2449db18 --- /dev/null +++ b/src/schemas/json/tfpowershell-provider.json @@ -0,0 +1,420 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://json.schemastore.org/tfpowershell-provider.json", + "title": "Terraform PowerShell provider block manifest", + "description": "A provider.tfps.json manifest, declaring the custom provider-block attributes of a provider built on terraform-provider-powershell. Values reach PowerShell scripts as $global:ProviderData.Config.. The file is optional; omit it when the provider block needs nothing beyond the built-in attributes.", + "type": "object", + "additionalProperties": false, + "required": ["version", "attributes"], + "properties": { + "$schema": { + "description": "Link to this document. The provider engine accepts and ignores it.", + "type": "string", + "format": "uri" + }, + "version": { + "description": "Manifest format version. Only 1 exists; the engine rejects any other value rather than half-applying a manifest written for a newer format.", + "const": 1 + }, + "description": { + "description": "What the provider manages. Surfaced in the Terraform Registry docs and in `terraform providers schema`.", + "type": "string" + }, + "attributes": { + "description": "The custom provider-block attributes, keyed by attribute name. At least one is required. A name that collides with a built-in provider attribute (timeout, startup_script, session_*, ...) is a load error.", + "type": "object", + "minProperties": 1, + "propertyNames": { + "pattern": "^[a-z][a-z0-9_]*$" + }, + "additionalProperties": { + "$ref": "#/definitions/attribute" + } + } + }, + "definitions": { + "attribute": { + "description": "One attribute declaration.", + "type": "object", + "additionalProperties": false, + "required": ["type"], + "properties": { + "type": { + "description": "The attribute's Terraform type. `json` is a string attribute validated as a JSON object, decoded into a real object in $InputData, and re-encoded on the way out.", + "enum": [ + "string", + "bool", + "int", + "number", + "list", + "set", + "map", + "json" + ] + }, + "element_type": { + "description": "Element type of a list, set, or map attribute. Required for those three types and not allowed on any other.", + "enum": ["string", "bool", "int", "number"] + }, + "required": { + "description": "The practitioner must set this attribute. Exactly one of required, optional, or computed must be true.", + "type": "boolean" + }, + "optional": { + "description": "The practitioner may set this attribute. Exactly one of required, optional, or computed must be true.", + "type": "boolean" + }, + "computed": { + "description": "Provider attributes cannot be computed, so only false is accepted. Exactly one of required or optional must be true.", + "const": false + }, + "sensitive": { + "description": "Redact the value in CLI output and plans.", + "type": "boolean" + }, + "description": { + "description": "What the attribute means. Surfaced in the Terraform Registry docs and in `terraform providers schema`.", + "type": "string" + }, + "default": { + "description": "Value injected into $InputData when the practitioner leaves this optional attribute null. Terraform state still records null - the default is visible to your scripts, not to Terraform. Its JSON type must match the declared type." + }, + "validators": { + "description": "Plan-time value constraints. Only string, int, and number config attributes can carry them.", + "type": "array", + "items": { + "description": "One validator. Each entry is an object with exactly one recognized key.", + "type": "object", + "additionalProperties": false, + "required": ["one_of"], + "properties": { + "one_of": { + "description": "The permitted values. Each must match the attribute's declared type.", + "type": "array", + "minItems": 1 + } + } + } + }, + "env": { + "description": "Environment variable consulted when the practitioner leaves this attribute unset. Optional string attributes only.", + "type": "string" + } + }, + "allOf": [ + { + "description": "Exactly one of required or optional must be true.", + "oneOf": [ + { + "type": "object", + "required": ["required"], + "properties": { + "required": { + "const": true + }, + "optional": { + "const": false + } + } + }, + { + "type": "object", + "required": ["optional"], + "properties": { + "optional": { + "const": true + }, + "required": { + "const": false + } + } + } + ] + }, + { + "description": "list, set, and map attributes require an element_type; no other type may declare one.", + "if": { + "type": "object", + "required": ["type"], + "properties": { + "type": { + "enum": ["list", "set", "map"] + } + } + }, + "then": { + "type": "object", + "required": ["element_type"], + "properties": { + "element_type": true + } + }, + "else": { + "not": { + "type": "object", + "required": ["element_type"], + "properties": { + "element_type": true + } + } + } + }, + { + "description": "A non-null default only applies to an optional attribute.", + "if": { + "type": "object", + "required": ["default"], + "properties": { + "default": { + "not": { + "type": "null" + } + } + } + }, + "then": { + "type": "object", + "required": ["optional"], + "properties": { + "optional": { + "const": true + } + } + } + }, + { + "description": "Validators only apply to non-computed string, int, and number attributes.", + "if": { + "type": "object", + "required": ["validators"], + "properties": { + "validators": { + "type": "array", + "minItems": 1 + } + } + }, + "then": { + "type": "object", + "required": ["type"], + "properties": { + "type": { + "enum": ["string", "int", "number"] + }, + "computed": { + "const": false + } + } + } + }, + { + "description": "env only applies to optional string attributes.", + "if": { + "type": "object", + "required": ["env"], + "properties": { + "env": { + "type": "string", + "minLength": 1 + } + } + }, + "then": { + "type": "object", + "required": ["type", "optional"], + "properties": { + "type": { + "const": "string" + }, + "optional": { + "const": true + } + } + } + }, + { + "description": "one_of values on a string attribute must be strings.", + "if": { + "type": "object", + "required": ["type"], + "properties": { + "type": { + "const": "string" + } + } + }, + "then": { + "type": "object", + "properties": { + "validators": { + "type": "array", + "items": { + "type": "object", + "properties": { + "one_of": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + { + "description": "one_of values on an int or number attribute must be numbers.", + "if": { + "type": "object", + "required": ["type"], + "properties": { + "type": { + "enum": ["int", "number"] + } + } + }, + "then": { + "type": "object", + "properties": { + "validators": { + "type": "array", + "items": { + "type": "object", + "properties": { + "one_of": { + "type": "array", + "items": { + "type": "number" + } + } + } + } + } + } + } + }, + { + "description": "A string attribute's default must be a string.", + "if": { + "type": "object", + "required": ["type"], + "properties": { + "type": { + "const": "string" + } + } + }, + "then": { + "type": "object", + "properties": { + "default": { + "type": ["string", "null"] + } + } + } + }, + { + "description": "A bool attribute's default must be a boolean.", + "if": { + "type": "object", + "required": ["type"], + "properties": { + "type": { + "const": "bool" + } + } + }, + "then": { + "type": "object", + "properties": { + "default": { + "type": ["boolean", "null"] + } + } + } + }, + { + "description": "An int attribute's default must be a whole number.", + "if": { + "type": "object", + "required": ["type"], + "properties": { + "type": { + "const": "int" + } + } + }, + "then": { + "type": "object", + "properties": { + "default": { + "type": ["integer", "null"] + } + } + } + }, + { + "description": "A number attribute's default must be a number.", + "if": { + "type": "object", + "required": ["type"], + "properties": { + "type": { + "const": "number" + } + } + }, + "then": { + "type": "object", + "properties": { + "default": { + "type": ["number", "null"] + } + } + } + }, + { + "description": "A json or map attribute's default must be an object.", + "if": { + "type": "object", + "required": ["type"], + "properties": { + "type": { + "enum": ["json", "map"] + } + } + }, + "then": { + "type": "object", + "properties": { + "default": { + "type": ["object", "null"] + } + } + } + }, + { + "description": "A list or set attribute's default must be an array.", + "if": { + "type": "object", + "required": ["type"], + "properties": { + "type": { + "enum": ["list", "set"] + } + } + }, + "then": { + "type": "object", + "properties": { + "default": { + "type": ["array", "null"] + } + } + } + } + ] + } + } +} diff --git a/src/schemas/json/tfpowershell-resource.json b/src/schemas/json/tfpowershell-resource.json new file mode 100644 index 00000000000..a63a5690ecb --- /dev/null +++ b/src/schemas/json/tfpowershell-resource.json @@ -0,0 +1,450 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://json.schemastore.org/tfpowershell-resource.json", + "title": "Terraform PowerShell provider resource manifest", + "description": "A resource.tfps.json manifest, declaring the typed Terraform attributes of one resource in a provider built on terraform-provider-powershell. It sits in provider/resources// next to the create.ps1, read.ps1, delete.ps1, and optional update.ps1 scripts that implement it.", + "type": "object", + "additionalProperties": false, + "required": ["version", "attributes"], + "properties": { + "$schema": { + "description": "Link to this document. The provider engine accepts and ignores it.", + "type": "string", + "format": "uri" + }, + "version": { + "description": "Manifest format version. Only 1 exists; the engine rejects any other value rather than half-applying a manifest written for a newer format.", + "const": 1 + }, + "description": { + "description": "What the resource manages. Surfaced in the Terraform Registry docs and in `terraform providers schema`.", + "type": "string" + }, + "timeout_seconds": { + "description": "Per-operation timeout for this resource's scripts. Omit to inherit the provider's timeout attribute.", + "type": "integer", + "minimum": 0 + }, + "attributes": { + "description": "The resource's attributes, keyed by attribute name. At least one is required.", + "type": "object", + "minProperties": 1, + "propertyNames": { + "pattern": "^[a-z][a-z0-9_]*$" + }, + "properties": { + "id": { + "description": "Reserved. Every resource automatically gets a computed `id` populated from the value create.ps1 emits, so declaring one is a load error.", + "not": true + } + }, + "additionalProperties": { + "$ref": "#/definitions/attribute" + } + } + }, + "definitions": { + "attribute": { + "description": "One attribute declaration.", + "type": "object", + "additionalProperties": false, + "required": ["type"], + "properties": { + "type": { + "description": "The attribute's Terraform type. `json` is a string attribute validated as a JSON object, decoded into a real object in $InputData, and re-encoded on the way out.", + "enum": [ + "string", + "bool", + "int", + "number", + "list", + "set", + "map", + "json" + ] + }, + "element_type": { + "description": "Element type of a list, set, or map attribute. Required for those three types and not allowed on any other.", + "enum": ["string", "bool", "int", "number"] + }, + "required": { + "description": "The practitioner must set this attribute. Exactly one of required, optional, or computed must be true.", + "type": "boolean" + }, + "optional": { + "description": "The practitioner may set this attribute. Exactly one of required, optional, or computed must be true.", + "type": "boolean" + }, + "computed": { + "description": "The scripts supply this attribute; it never appears in configuration. Exactly one of required, optional, or computed must be true.", + "type": "boolean" + }, + "sensitive": { + "description": "Redact the value in CLI output and plans.", + "type": "boolean" + }, + "description": { + "description": "What the attribute means. Surfaced in the Terraform Registry docs and in `terraform providers schema`.", + "type": "string" + }, + "requires_replace": { + "description": "Changing this attribute destroys and recreates the object instead of running update.ps1. Config attributes only.", + "type": "boolean" + }, + "default": { + "description": "Value injected into $InputData when the practitioner leaves this optional attribute null. Terraform state still records null - the default is visible to your scripts, not to Terraform. Its JSON type must match the declared type." + }, + "validators": { + "description": "Plan-time value constraints. Only string, int, and number config attributes can carry them.", + "type": "array", + "items": { + "description": "One validator. Each entry is an object with exactly one recognized key.", + "type": "object", + "additionalProperties": false, + "required": ["one_of"], + "properties": { + "one_of": { + "description": "The permitted values. Each must match the attribute's declared type.", + "type": "array", + "minItems": 1 + } + } + } + } + }, + "allOf": [ + { + "description": "Exactly one of required, optional, or computed must be true.", + "oneOf": [ + { + "type": "object", + "required": ["required"], + "properties": { + "required": { + "const": true + }, + "optional": { + "const": false + }, + "computed": { + "const": false + } + } + }, + { + "type": "object", + "required": ["optional"], + "properties": { + "optional": { + "const": true + }, + "required": { + "const": false + }, + "computed": { + "const": false + } + } + }, + { + "type": "object", + "required": ["computed"], + "properties": { + "computed": { + "const": true + }, + "required": { + "const": false + }, + "optional": { + "const": false + } + } + } + ] + }, + { + "description": "list, set, and map attributes require an element_type; no other type may declare one.", + "if": { + "type": "object", + "required": ["type"], + "properties": { + "type": { + "enum": ["list", "set", "map"] + } + } + }, + "then": { + "type": "object", + "required": ["element_type"], + "properties": { + "element_type": true + } + }, + "else": { + "not": { + "type": "object", + "required": ["element_type"], + "properties": { + "element_type": true + } + } + } + }, + { + "description": "requires_replace cannot be set on a computed attribute.", + "if": { + "type": "object", + "required": ["requires_replace"], + "properties": { + "requires_replace": { + "const": true + } + } + }, + "then": { + "not": { + "type": "object", + "required": ["computed"], + "properties": { + "computed": { + "const": true + } + } + } + } + }, + { + "description": "A non-null default only applies to an optional attribute.", + "if": { + "type": "object", + "required": ["default"], + "properties": { + "default": { + "not": { + "type": "null" + } + } + } + }, + "then": { + "type": "object", + "required": ["optional"], + "properties": { + "optional": { + "const": true + } + } + } + }, + { + "description": "Validators only apply to non-computed string, int, and number attributes.", + "if": { + "type": "object", + "required": ["validators"], + "properties": { + "validators": { + "type": "array", + "minItems": 1 + } + } + }, + "then": { + "type": "object", + "required": ["type"], + "properties": { + "type": { + "enum": ["string", "int", "number"] + }, + "computed": { + "const": false + } + } + } + }, + { + "description": "one_of values on a string attribute must be strings.", + "if": { + "type": "object", + "required": ["type"], + "properties": { + "type": { + "const": "string" + } + } + }, + "then": { + "type": "object", + "properties": { + "validators": { + "type": "array", + "items": { + "type": "object", + "properties": { + "one_of": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + { + "description": "one_of values on an int or number attribute must be numbers.", + "if": { + "type": "object", + "required": ["type"], + "properties": { + "type": { + "enum": ["int", "number"] + } + } + }, + "then": { + "type": "object", + "properties": { + "validators": { + "type": "array", + "items": { + "type": "object", + "properties": { + "one_of": { + "type": "array", + "items": { + "type": "number" + } + } + } + } + } + } + } + }, + { + "description": "A string attribute's default must be a string.", + "if": { + "type": "object", + "required": ["type"], + "properties": { + "type": { + "const": "string" + } + } + }, + "then": { + "type": "object", + "properties": { + "default": { + "type": ["string", "null"] + } + } + } + }, + { + "description": "A bool attribute's default must be a boolean.", + "if": { + "type": "object", + "required": ["type"], + "properties": { + "type": { + "const": "bool" + } + } + }, + "then": { + "type": "object", + "properties": { + "default": { + "type": ["boolean", "null"] + } + } + } + }, + { + "description": "An int attribute's default must be a whole number.", + "if": { + "type": "object", + "required": ["type"], + "properties": { + "type": { + "const": "int" + } + } + }, + "then": { + "type": "object", + "properties": { + "default": { + "type": ["integer", "null"] + } + } + } + }, + { + "description": "A number attribute's default must be a number.", + "if": { + "type": "object", + "required": ["type"], + "properties": { + "type": { + "const": "number" + } + } + }, + "then": { + "type": "object", + "properties": { + "default": { + "type": ["number", "null"] + } + } + } + }, + { + "description": "A json or map attribute's default must be an object.", + "if": { + "type": "object", + "required": ["type"], + "properties": { + "type": { + "enum": ["json", "map"] + } + } + }, + "then": { + "type": "object", + "properties": { + "default": { + "type": ["object", "null"] + } + } + } + }, + { + "description": "A list or set attribute's default must be an array.", + "if": { + "type": "object", + "required": ["type"], + "properties": { + "type": { + "enum": ["list", "set"] + } + } + }, + "then": { + "type": "object", + "properties": { + "default": { + "type": ["array", "null"] + } + } + } + } + ] + } + } +} diff --git a/src/schemas/json/tfpowershell-settings.json b/src/schemas/json/tfpowershell-settings.json new file mode 100644 index 00000000000..e24a46ac6a8 --- /dev/null +++ b/src/schemas/json/tfpowershell-settings.json @@ -0,0 +1,36 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://json.schemastore.org/tfpowershell-settings.json", + "title": "Terraform PowerShell provider settings", + "description": "A settings.tfps.json file, the single place that names a provider built on terraform-provider-powershell. It sits at provider/settings.tfps.json and is read at build time and at provider startup.", + "type": "object", + "additionalProperties": false, + "required": ["name", "address"], + "properties": { + "$schema": { + "description": "Link to this schema. The provider engine accepts and ignores it.", + "type": "string", + "format": "uri" + }, + "name": { + "description": "The provider type name, e.g. \"exchangeonlinemanagement\". It prefixes every resource and data source type: a resource folder named `mailbox` becomes `exchangeonlinemanagement_mailbox`.", + "type": "string", + "pattern": "^[a-z][a-z0-9_]*$" + }, + "address": { + "description": "The registry source address practitioners put in required_providers, e.g. \"registry.terraform.io/acme/exchangeonlinemanagement\".", + "type": "string", + "minLength": 1 + }, + "repository": { + "description": "URL of the provider's source repository. Used by the release tooling; not read by the provider at runtime.", + "type": "string", + "format": "uri" + }, + "engine_version": { + "description": "Which terraform-provider-powershell release to build against: \"latest\" for the newest GA release, or an exact version such as \"0.4.2\" or \"0.5.0-beta.3\". Defaults to \"latest\" when omitted.", + "type": "string", + "pattern": "^(latest|v?[0-9]+\\.[0-9]+\\.[0-9]+(-[0-9A-Za-z.-]+)?(\\+[0-9A-Za-z.-]+)?)$" + } + } +} diff --git a/src/test/tfpowershell-datasource/every-field.json b/src/test/tfpowershell-datasource/every-field.json new file mode 100644 index 00000000000..2610a2ee8b1 --- /dev/null +++ b/src/test/tfpowershell-datasource/every-field.json @@ -0,0 +1,79 @@ +{ + "$schema": "https://json.schemastore.org/tfpowershell-datasource.json", + "attributes": { + "access_token": { + "computed": true, + "description": "Short-lived token.", + "sensitive": true, + "type": "string" + }, + "filter": { + "default": { + "nested": true + }, + "description": "Free-form server-side filter.", + "optional": true, + "type": "json" + }, + "flags": { + "computed": true, + "description": "Feature flags.", + "element_type": "bool", + "type": "list" + }, + "include_hidden": { + "default": false, + "description": "Include hidden groups.", + "optional": true, + "type": "bool" + }, + "members": { + "computed": true, + "description": "Group members.", + "element_type": "string", + "type": "list" + }, + "name": { + "description": "Group name to look up.", + "required": true, + "type": "string" + }, + "page_size": { + "default": 100, + "description": "Page size for the lookup.", + "optional": true, + "type": "int" + }, + "ports": { + "computed": true, + "description": "Listener ports.", + "element_type": "int", + "type": "set" + }, + "ratio": { + "default": 1.5, + "description": "Sampling ratio.", + "optional": true, + "type": "number" + }, + "tier": { + "description": "Service tier filter.", + "optional": true, + "type": "string", + "validators": [ + { + "one_of": ["standard", "premium"] + } + ] + }, + "weights": { + "computed": true, + "description": "Routing weights.", + "element_type": "number", + "type": "map" + } + }, + "description": "Looks up an Exchange Online distribution group.", + "timeout_seconds": 120, + "version": 1 +} diff --git a/src/test/tfpowershell-datasource/tfpowershell-datasource.json b/src/test/tfpowershell-datasource/tfpowershell-datasource.json new file mode 100644 index 00000000000..a671428009f --- /dev/null +++ b/src/test/tfpowershell-datasource/tfpowershell-datasource.json @@ -0,0 +1,27 @@ +{ + "$schema": "https://json.schemastore.org/tfpowershell-datasource.json", + "attributes": { + "content": { + "computed": true, + "description": "The file's content.", + "type": "string" + }, + "exists": { + "computed": true, + "description": "Whether the file exists.", + "type": "bool" + }, + "path": { + "description": "Path of the file to read.", + "required": true, + "type": "string" + }, + "size": { + "computed": true, + "description": "Size in bytes.", + "type": "int" + } + }, + "description": "Reads a text file on the machine running the provider.", + "version": 1 +} diff --git a/src/test/tfpowershell-provider/every-field.json b/src/test/tfpowershell-provider/every-field.json new file mode 100644 index 00000000000..602e533414e --- /dev/null +++ b/src/test/tfpowershell-provider/every-field.json @@ -0,0 +1,81 @@ +{ + "$schema": "https://json.schemastore.org/tfpowershell-provider.json", + "attributes": { + "api_url": { + "default": "https://outlook.office365.com", + "description": "Service endpoint.", + "env": "EXO_API_URL", + "optional": true, + "type": "string" + }, + "backoff": { + "default": 1.5, + "description": "Backoff multiplier.", + "optional": true, + "type": "number" + }, + "client_secret": { + "description": "Application secret.", + "env": "EXO_CLIENT_SECRET", + "optional": true, + "sensitive": true, + "type": "string" + }, + "extra": { + "default": { + "nested": true + }, + "description": "Free-form connection settings.", + "optional": true, + "type": "json" + }, + "features": { + "description": "Feature toggles.", + "element_type": "bool", + "optional": true, + "type": "list" + }, + "ports": { + "description": "Allowed ports.", + "element_type": "int", + "optional": true, + "type": "set" + }, + "retries": { + "default": 3, + "description": "Retry attempts per operation.", + "optional": true, + "type": "int", + "validators": [ + { + "one_of": [1, 3, 5] + } + ] + }, + "scopes": { + "description": "OAuth scopes to request.", + "element_type": "string", + "optional": true, + "type": "list" + }, + "tenant_id": { + "description": "Entra tenant to connect to.", + "required": true, + "type": "string" + }, + "use_rps": { + "default": false, + "description": "Use remote PowerShell.", + "optional": true, + "type": "bool" + }, + "weights": { + "description": "Endpoint weights.", + "element_type": "number", + "optional": true, + "type": "map" + } + }, + "description": "Manages Exchange Online through the ExchangeOnlineManagement module.", + "version": 1 +} diff --git a/src/test/tfpowershell-provider/tfpowershell-provider.json b/src/test/tfpowershell-provider/tfpowershell-provider.json new file mode 100644 index 00000000000..3819adb2780 --- /dev/null +++ b/src/test/tfpowershell-provider/tfpowershell-provider.json @@ -0,0 +1,13 @@ +{ + "$schema": "https://json.schemastore.org/tfpowershell-provider.json", + "attributes": { + "default_directory": { + "description": "Directory used when a relative path is given.", + "env": "YOURPROVIDER_DEFAULT_DIRECTORY", + "optional": true, + "type": "string" + } + }, + "description": "Example provider built from the PowerShell provider template.", + "version": 1 +} diff --git a/src/test/tfpowershell-resource/every-field.json b/src/test/tfpowershell-resource/every-field.json new file mode 100644 index 00000000000..6c16384fd1d --- /dev/null +++ b/src/test/tfpowershell-resource/every-field.json @@ -0,0 +1,91 @@ +{ + "$schema": "https://json.schemastore.org/tfpowershell-resource.json", + "attributes": { + "access_token": { + "computed": true, + "description": "Short-lived token.", + "sensitive": true, + "type": "string" + }, + "extra": { + "default": { + "nested": true + }, + "description": "Free-form settings passed straight through.", + "optional": true, + "type": "json" + }, + "flags": { + "description": "Feature flags.", + "element_type": "bool", + "optional": true, + "type": "list" + }, + "hidden": { + "default": false, + "description": "Hide the group from the address list.", + "optional": true, + "type": "bool" + }, + "members": { + "default": ["user@example.com"], + "description": "Group members.", + "element_type": "string", + "optional": true, + "type": "list" + }, + "name": { + "description": "Group name; changing it recreates the group.", + "required": true, + "requires_replace": true, + "type": "string" + }, + "ports": { + "description": "Listener ports.", + "element_type": "int", + "optional": true, + "type": "set" + }, + "primary_smtp": { + "computed": true, + "description": "Server-assigned primary SMTP address.", + "type": "string" + }, + "quota_mb": { + "default": 50, + "description": "Mailbox quota in megabytes.", + "optional": true, + "type": "int", + "validators": [ + { + "one_of": [10, 50, 100] + } + ] + }, + "ratio": { + "default": 1.5, + "description": "Overcommit ratio.", + "optional": true, + "type": "number" + }, + "tier": { + "description": "Service tier.", + "optional": true, + "type": "string", + "validators": [ + { + "one_of": ["standard", "premium"] + } + ] + }, + "weights": { + "description": "Routing weights.", + "element_type": "number", + "optional": true, + "type": "map" + } + }, + "description": "Manages an Exchange Online distribution group.", + "timeout_seconds": 600, + "version": 1 +} diff --git a/src/test/tfpowershell-resource/tfpowershell-resource.json b/src/test/tfpowershell-resource/tfpowershell-resource.json new file mode 100644 index 00000000000..d986ed6a636 --- /dev/null +++ b/src/test/tfpowershell-resource/tfpowershell-resource.json @@ -0,0 +1,29 @@ +{ + "$schema": "https://json.schemastore.org/tfpowershell-resource.json", + "attributes": { + "content": { + "default": "", + "description": "Content written to the file.", + "optional": true, + "type": "string" + }, + "last_modified": { + "computed": true, + "description": "Last write time (UTC, ISO 8601).", + "type": "string" + }, + "path": { + "description": "Path of the file to manage.", + "required": true, + "requires_replace": true, + "type": "string" + }, + "size": { + "computed": true, + "description": "Size of the file in bytes.", + "type": "int" + } + }, + "description": "Manages a text file on the machine running the provider.", + "version": 1 +} diff --git a/src/test/tfpowershell-settings/minimal.json b/src/test/tfpowershell-settings/minimal.json new file mode 100644 index 00000000000..a6e8e9a28ea --- /dev/null +++ b/src/test/tfpowershell-settings/minimal.json @@ -0,0 +1,4 @@ +{ + "address": "registry.terraform.io/acme/acme", + "name": "acme" +} diff --git a/src/test/tfpowershell-settings/pinned-engine.json b/src/test/tfpowershell-settings/pinned-engine.json new file mode 100644 index 00000000000..d79973554e4 --- /dev/null +++ b/src/test/tfpowershell-settings/pinned-engine.json @@ -0,0 +1,7 @@ +{ + "$schema": "https://json.schemastore.org/tfpowershell-settings.json", + "address": "registry.terraform.io/acme/exchangeonlinemanagement", + "engine_version": "0.5.0-beta.3", + "name": "exchangeonlinemanagement", + "repository": "https://github.com/acme/terraform-provider-exchangeonlinemanagement" +} diff --git a/src/test/tfpowershell-settings/tfpowershell-settings.json b/src/test/tfpowershell-settings/tfpowershell-settings.json new file mode 100644 index 00000000000..b5b1ead5a18 --- /dev/null +++ b/src/test/tfpowershell-settings/tfpowershell-settings.json @@ -0,0 +1,7 @@ +{ + "$schema": "https://json.schemastore.org/tfpowershell-settings.json", + "address": "registry.terraform.io/yournamespace/yourprovider", + "engine_version": "latest", + "name": "yourprovider", + "repository": "https://github.com/yourname/terraform-provider-yourprovider" +}