integer value for clone depth is reporting as invalid (only likes string "full")

Issue #182 duplicate
Ryan H Becker created an issue

Similar to issues #66, #160, and #179, the yaml validation is not quite right for clone.depth values.

According to the docs

Use a whole number greater than zero or if you want to clone everything (which will have a speed impact) use full.

According to pipelines-schema.json

"depth": {
    "type": [
        "string",
        "integer"
    ],
    "enum": [
        "full"
    ],
    "minimum": 1
},

From my bitbucket-pipelines.yml file …

clone:
  depth: 1

Copied from vscode’s PROBLEMS view …

{
    "resource": "REDACTED-PATH/bitbucket-pipelines.yml",
    "owner": "_generated_diagnostic_collection_name_#1",
    "severity": 8,
    "message": "Value is not accepted. Valid values: \"full\".",
    "startLineNumber": 3,
    "startColumn": 10,
    "endLineNumber": 3,
    "endColumn": 11
}

It appears that the enum constraint is overriding the fact that type is supposed to allow string or integer.

Comments (1)

  1. Log in to comment