Skip to content

Commit fcc33ce

Browse files
authored
[java-source-utils] Add $schema to CGManifest.json (#1035)
Context: https://www.jsonschemavalidator.net/ Context: https://github.com/JamieMagee/verify-cgmanifest Context: https://json.schemastore.org/component-detection-manifest.json Context: dotnet/android-libraries#608 There is a [JSON Schema][0] for `CGManifest.json`. Update `tools/java-source-utils/CGManifest.json` so that it conforms to the JSON schema. This involves three sets of changes: * Add a `$schema` property. * Add a `version` property; I can't find any actual documentation for this schema, but the [sample manifest][1] uses `"version": 1`, so use the same version. * "camelCase" all the JSON property names. From the [JamieMagee/verify-cgmanifest README.md][2]: > Component Detection will accept object properties in PascalCase, > but JSON schema does not have a case-insensitive mode. > Camel case is the most common way to write object properties in > JSON. With these changes, `CGManifest.json` reports no errors when using <https://www.jsonschemavalidator.net>. Co-authored-by: Jamie Magee <[email protected]> [0]: https://json.schemastore.org/component-detection-manifest.json [1]: https://github.com/JamieMagee/verify-cgmanifest/blob/2adfb450cd1f2170c3df120036f4a531285167ef/cgmanifest.sample.json [2]: https://github.com/JamieMagee/verify-cgmanifest/blob/2adfb450cd1f2170c3df120036f4a531285167ef/README.md
1 parent 58de60f commit fcc33ce

File tree

1 file changed

+18
-16
lines changed

1 file changed

+18
-16
lines changed
Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,28 @@
11
{
2-
"Registrations": [
2+
"$schema": "https://json.schemastore.org/component-detection-manifest.json",
3+
"version": 1,
4+
"registrations": [
35
{
4-
"Component": {
5-
"Type": "maven",
6-
"Maven": {
7-
"GroupId": "com.github.javaparser",
8-
"ArtifactId": "javaparser-core",
9-
"Version": "3.16.1"
6+
"component": {
7+
"type": "maven",
8+
"maven": {
9+
"groupId": "com.github.javaparser",
10+
"artifactId": "javaparser-core",
11+
"version": "3.16.1"
1012
}
1113
},
12-
"DevelopmentDependency":false
14+
"developmentDependency":false
1315
},
1416
{
15-
"Component": {
16-
"Type": "maven",
17-
"Maven": {
18-
"GroupId": "com.github.javaparser",
19-
"ArtifactId": "javaparser-symbol-solver-core",
20-
"Version": "3.16.1"
17+
"component": {
18+
"type": "maven",
19+
"maven": {
20+
"groupId": "com.github.javaparser",
21+
"artifactId": "javaparser-symbol-solver-core",
22+
"version": "3.16.1"
2123
}
2224
},
23-
"DevelopmentDependency":false
25+
"developmentDependency":false
2426
}
2527
]
26-
}
28+
}

0 commit comments

Comments
 (0)