microsoft/azure-pipelines-vscode

schema: `#/definitions/any` doesn't include all types

karunpoudel-chr opened this issue · 1 comments

#/definitions/any is defined as

"any": {
"anyOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"$ref": "#/definitions/any"
}
},
{
"type": "object",
"additionalProperties": true
}
]
},

One of the place it is used is to define default value of parameter

"default": {
"$ref": "#/definitions/any"
},

Default value can also be boolean or number depending upon the type of parameter.

Based on current schema, following parameter is invalid, although azure-pipelines.yml supports it.

parameters:
  - name: myBoolean
    displayName: myboolean
    type: boolean
    default: true

So #/definitions/any should probably be defined as:

    "any": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "number"
        },
        {
          "type": "boolean"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/definitions/any"
          }
        },
        {
          "type": "object",
          "additionalProperties": true
        }
      ]
    },

The same problem as #566.
I'm closing the issue.