Documentation for ConfigurationSchema.json #963
-
I was trying to find out how the JSON schema in .NET Aspire components are linked toolwise. Sadly I did not find anything on https://learn.microsoft.com/de-de/dotnet/aspire/ or https://github.com/dotnet/aspire/blob/main/src/Components/README.md. After checking through GitHub, I recognized that the schemes are defined as Is Visual Studio just checking for these files or how is everything linked together? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Yes, VS is bringing in project targets that collect up the Our intent is to move this logic out of VS and into the base .NET SDK so that this mechanism can be used by any NuGet package to dynamically contribute JSON schema to related files within the projects the package is added to. The actual schema generation still needs to be triggered by some gesture, e.g. a JSON file being opened in the IDE, a target being run at the command line, etc. You should be able to point any JSON schema supporting editor at these generated files by way of the |
Beta Was this translation helpful? Give feedback.
Yes, VS is bringing in project targets that collect up the
JsonSchemaSegment
items that are added by the targets imported by the component packages. This is then processed when the appsettings.json file is opened and the schema is dynamically generated into a location under the theobj
directory and the editor is pointed at that file as the schema.Our intent is to move this logic out of VS and into the base .NET SDK so that this mechanism can be used by any NuGet package to dynamically contribute JSON schema to related files within the projects the package is added to. The actual schema generation still needs to be triggered by some gesture, e.g. a JSON file being opened in the IDE, a ta…