dotnet / vscode-dotnet-runtime

VSCode Extension for Installing .NET via VS Code
MIT License
128 stars 230 forks source link

Update distro schema file to account for changes in the file. #1801

Closed baronfel closed 1 month ago

baronfel commented 1 month ago

I was going to prospectively add support for Arch and found that

a) the schema file wasn't working for me, and b) once I got it working, it was out of date with the actual contents of the file due to some enhancements made recently.

So I updated the schema file to account for the primary change, which was making sure the preInstallCommands followed the same command structure as all the other commands.

I also used the ability of JSON Schema to name and reuse definitions to extract out the 2 most common types in use in this file:

This makes it much easier to reuse the content.

nagilson commented 1 month ago

Thanks for updating this, I didn't know about these formatting conventions for json schema and how you could define a type (hence why most of them dont use the CommandExecutorCommand type.) Is there a tool you're using for this that makes all of this useful?

baronfel commented 1 month ago

Nope, just my past experiences :) a lot of this is shared from hand-writing Swagger schemas about 10 years ago, so the idea of generating and reusing the shapes is very natural to me.