Open Clockwork-Muse opened 1 year ago
Yes, I agree this is much needed :). Unfortunately not something this extension can handle - that knowledge comes from ADO itself, and you're correct in assuming that it does all the work necessary to generate that schema file.
I got this working 😃
The Azure DevOps schema would need to change:
{
"description": "Replace tokens in text based files",
"doNotSuggest": false,
"ignoreCase": "value",
"enum": [
"qetza.replacetokens.replacetokens-task.replacetokens@6",
"replacetokens@6"
]
},
"task": {
"description": "Replace Tokens\n\nReplace tokens in text based files",
"ignoreCase": "value",
"pattern": "^(qetza.replacetokens.replacetokens-task.)?replacetokens@6$"
},
I downloaded my org schema file, saved it locally, updated it and pointed the VSCode extension to my local file:
"azure-pipelines.customSchemaFile": "C:\\your-custom-schema.json"
The whole process (download + edit) could be scripted and ran regulary.
But of course it would be nice if the Azure DevOps team could expand their schema.
To allow for better discrimination of the source of tasks, it can be handy to include the fully qualified list of task names, eg:
Unfortunately this currently fails to validate:
Part of this is probably potentially due to the autogenerated (assumedly - I don't control it for my org) yaml schema, which looks like this:
So it has no concept that there could be a fully qualified name....