@@ -67,7 +67,9 @@ protected override async Task<bool> Execute (Context context)
6767 using var json = File . CreateText ( jsonPath ) ;
6868
6969 json . WriteLine ( "{" ) ;
70- json . WriteLine ( " \" Registrations\" : [" ) ;
70+ json . WriteLine ( " \" $schema\" : \" https://json.schemastore.org/component-detection-manifest.json\" ," ) ;
71+ json . WriteLine ( " \" version\" : 1," ) ;
72+ json . WriteLine ( " \" registrations\" : [" ) ;
7173
7274 var properties = new Dictionary < string , string > ( ) ;
7375
@@ -100,8 +102,8 @@ void WriteComponent (TextWriter json, CGManifestEntry entry, Dictionary<string,
100102 entry . FillComponentProperties ( properties ) ;
101103
102104 json . WriteLine ( $ " {{") ;
103- json . WriteLine ( $ " \" Component \" : {{") ;
104- json . WriteLine ( $ " \" Type \" : \" { entry . Type . ToLowerInvariant ( ) } \" ,") ;
105+ json . WriteLine ( $ " \" component \" : {{") ;
106+ json . WriteLine ( $ " \" type \" : \" { entry . Type . ToLowerInvariant ( ) } \" ,") ;
105107 json . WriteLine ( $ " \" { entry . Type } \" : {{") ;
106108 bool firstProp = true ;
107109 foreach ( var key in properties . Keys . OrderBy ( p => p , StringComparer . OrdinalIgnoreCase ) ) {
@@ -116,7 +118,7 @@ void WriteComponent (TextWriter json, CGManifestEntry entry, Dictionary<string,
116118 json . WriteLine ( ) ;
117119 json . WriteLine ( $ " }}") ;
118120 json . WriteLine ( $ " }},") ;
119- json . WriteLine ( $ " \" DevelopmentDependency \" :{ dev } ") ;
121+ json . WriteLine ( $ " \" developmentDependency \" :{ dev } ") ;
120122 json . Write ( $ " }}") ;
121123 }
122124 }
@@ -145,7 +147,7 @@ public override string Name {
145147 }
146148 }
147149
148- public override string Type => "Git " ;
150+ public override string Type => "git " ;
149151
150152 public string RepositoryUrl { get ; private set ; } = String . Empty ;
151153 public string CommitHash { get ; private set ; } = String . Empty ;
@@ -157,8 +159,8 @@ public override string Name {
157159
158160 public override void FillComponentProperties ( Dictionary < string , string > properties )
159161 {
160- properties [ "RepositoryUrl " ] = RepositoryUrl ;
161- properties [ "CommitHash " ] = CommitHash ;
162+ properties [ "repositoryUrl " ] = RepositoryUrl ;
163+ properties [ "commitHash " ] = CommitHash ;
162164 }
163165
164166 const string Submodule = "submodule.external/" ;
@@ -256,7 +258,7 @@ sealed class MSBuildPackageReferenceInfo : CGManifestEntry {
256258 string name ;
257259
258260 public override string Name => name ;
259- public override string Type => "Nuget " ;
261+ public override string Type => "nuget " ;
260262
261263 public string Version { get ; private set ; }
262264
@@ -268,8 +270,8 @@ sealed class MSBuildPackageReferenceInfo : CGManifestEntry {
268270
269271 public override void FillComponentProperties ( Dictionary < string , string > properties )
270272 {
271- properties [ "Name " ] = Name ;
272- properties [ "Version " ] = Version ;
273+ properties [ "name " ] = Name ;
274+ properties [ "version " ] = Version ;
273275 }
274276
275277 static readonly XNamespace MSBuildXmlns = XNamespace . Get ( "http://schemas.microsoft.com/developer/msbuild/2003" ) ;
0 commit comments