Given this JSON:

      {
          "pipeline": {
              "agent": {
                  "type": "any",
                  "arguments": []
              },
              "stages": [
                  {
                      "name": "Stage 1",
                      "branches": [
                          {
                              "name": "default",
                              "steps": [
                                  {
                                      "name": "emailextrecipients",
                                      "arguments": [
                                          {
                                              "key": "recipientProviders",
                                              "value": {
                                                  "isLiteral": true,
                                                  "value": [
                                                      "asdf"
                                                  ]
                                              }
                                          }
                                      ]
                                  }
                              ]
                          }
                      ]
                  }
              ]
          }
      }
      

      I get this error: pipeline/stages/0/branches/0/steps/0 instance failed to match at least one schema, but the issue is specifically about an incorrect format of the recipientProviders argument.

          [JENKINS-41390] Argument not always in location of error

          Keith Zantow created issue -

          Andrew Bayer added a comment -

          So the problem is that you're passing an array in for pipeline/stages/0/branches/steps/0/arguments/0/value/value - arguments can be one of the following:

              "positionalArgumentList": {
                "description": "List of values used as positional parameters",
                "type": "array",
                "items": {
                  "$ref": "#/definitions/rawArgument"
                }
              },
              "singleArgument": {
                "description": "A single value used as a sole unnamed parameter",
                "$ref": "#/definitions/rawArgument"
              },
              "namedArgumentList": {
                "description": "Name/value argument pairs used as named parameters",
                "type": "array",
                "items": {
                  "$ref": "#/definitions/argumentValue"
                }
              }
          

          Where argumentValue and rawArgument are...

              "rawArgument": {
                "description": "The raw value of an argument, including whether it's a constant",
                "type": "object",
                "properties": {
                  "isLiteral": { "type": "boolean" },
                  "value": {
                    "type": [
                      "number",
                      "string",
                      "boolean"
                    ]
                  }
                },
          
                "required": ["isLiteral", "value"],
          
                "additionalProperties": false
          
              },
              "argumentValue": {
                "description": "The value for an argument",
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string"
                  },
                  "value": {
                    "$ref": "#/definitions/rawArgument"
                  }
                },
                "additionalProperties": false
              }
          

          So you are quite accurately violating the schema. =)

          Andrew Bayer added a comment - So the problem is that you're passing an array in for pipeline/stages/0/branches/steps/0/arguments/0/value/value - arguments can be one of the following: "positionalArgumentList" : { "description" : "List of values used as positional parameters" , "type" : "array" , "items" : { "$ref" : "#/definitions/rawArgument" } }, "singleArgument" : { "description" : "A single value used as a sole unnamed parameter" , "$ref" : "#/definitions/rawArgument" }, "namedArgumentList" : { "description" : "Name/value argument pairs used as named parameters" , "type" : "array" , "items" : { "$ref" : "#/definitions/argumentValue" } } Where argumentValue and rawArgument are... "rawArgument" : { "description" : "The raw value of an argument, including whether it's a constant" , "type" : "object" , "properties" : { "isLiteral" : { "type" : " boolean " }, "value" : { "type" : [ "number" , "string" , " boolean " ] } }, "required" : [ "isLiteral" , "value" ], "additionalProperties" : false }, "argumentValue" : { "description" : "The value for an argument" , "type" : "object" , "properties" : { "key" : { "type" : "string" }, "value" : { "$ref" : "#/definitions/rawArgument" } }, "additionalProperties" : false } So you are quite accurately violating the schema. =)

          Keith Zantow added a comment -

          Right, totally understood. The issue is, I believe the path should be pipeline/stages/0/branches/steps/0/arguments/0, rather than pipeline/stages/0/branches/steps/0 so someone could actually figure out the specific thing that is in violation.

          Keith Zantow added a comment - Right, totally understood. The issue is, I believe the path should be pipeline/stages/0/branches/steps/0/arguments/0 , rather than pipeline/stages/0/branches/steps/0 so someone could actually figure out the specific thing that is in violation.

          Andrew Bayer added a comment -

          Gotcha. Not sure why the schema validation is pointing to pipeline/stages/0/branches/steps/0 rather than pipeline/stages/0/branches/steps/0/arguments/0 - will dig.

          Andrew Bayer added a comment - Gotcha. Not sure why the schema validation is pointing to pipeline/stages/0/branches/steps/0 rather than pipeline/stages/0/branches/steps/0/arguments/0 - will dig.

          Andrew Bayer added a comment -

          kzantow - is this still an issue with 1.0 or later?

          Andrew Bayer added a comment - kzantow - is this still an issue with 1.0 or later?

          Andrew Bayer added a comment -

          ping?

          Andrew Bayer added a comment - ping?
          James Dumay made changes -
          Epic Link New: JENKINS-45423 [ 183591 ]
          Andrew Bayer made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

          Liam Newman added a comment -

          Bulk closing resolved issues.

          Liam Newman added a comment - Bulk closing resolved issues.
          Liam Newman made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]

            abayer Andrew Bayer
            kzantow Keith Zantow
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: