The "any" definition in the schema does not allow for `number`
See original GitHub issueThe parameters in a template pipeline have a field, default
, defined as "any"
.
"any"
can be seen here:
https://github.com/microsoft/azure-pipelines-vscode/blob/2e9781b705725387964e1931d9f52ae455746ca1/service-schema.json#L30-L46
It does not include numeric types. The following pipeline therefore fails validation:
parameters:
- name: vals
default: [1, 2]
jobs:
- ${{ each val in parameter.vals }}:
- job: foo
steps:
- bash: echo ${{ val }}
My understanding is that the above is valid, and that these values will be coerced to strings appropriately.
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
Azure Pipelines Schema does not allow for "number" as a ...
The reason is that number is not listed in the allowed types for definitions/any , so the default parameter value is not allowed...
Read more >Understanding JSON Schema
JSON Schema is a powerful tool for validating the structure of JSON data. However, learning to use it by reading its.
Read more >Allow true and false for all schemas (except maybe the root ...
We should allow true and false anywhere a schema is allowed (although requiring an object schema for the root would be reasonable, if...
Read more >Numeric schema has no format defined
Define format of numeric properties in schemas. This ensures that only parameters of the expected format get passed to the backend. Numeric parameters...
Read more >How to define a JSON schema that requires at least one of ...
To require at least one of a set of properties, use required inside a series of anyOf options: { "type": "object", "anyOf": [...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Nope (most likely for compliance reasons even if there’s nothing stored in it).
This would be great! I’ll defer to @golubev-ivan on this.
I understand, it’s not very clear that this repository doesn’t own the schema. That’s something we can do better at clarifying. What makes it even trickier is that parts of the schema (builtin tasks at https://github.com/microsoft/azure-pipelines-tasks) are controllable.
This is getting into the weeds, but “accurate-yaml-validation” more-or-less covers three areas:
Essentially, it boils down to “this repository is an aggregator of validation-related issues for visibility. We can answer questions, but if you’re looking for something to be fixed, that ultimately needs to happen elsewhere”, elsewhere being Developer Community/azure-pipelines-tasks/azure-pipelines-language-server.
Hello @sirosen, I’m closing this ticket, since we can’t help you with issues that are related to the schema, our team doesn’t support Azure DevOps YAML schema. Extension in fact is the same consumer of ADO schema as you and all the questions related to schema outside our ownership.