Skip to content

Conversation

@jonpryor
Copy link
Contributor

@jonpryor jonpryor commented Sep 6, 2022

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 for CGManifest.json.

Update xaprepare so that CGManifest.json 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 uses "version": 1,
    so use the same version.

  • "camelCase" all the JSON property names. From the
    JamieMagee/verify-cgmanifest README.md:

    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, our generated
bin/Build$(Configuration)/CGManifest.json reports no errors when
using https://www.jsonschemavalidator.net.

@jonpryor jonpryor requested a review from grendello as a code owner September 6, 2022 18:28
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 `xaprepare` so that `CGManifest.json` 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, our generated
`bin/Build$(Configuration)/CGManifest.json` reports no errors when
using <https://www.jsonschemavalidator.net>.

[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
@jonpryor jonpryor force-pushed the jonp-validate-cgmanifest.json branch from 034f911 to 11012bc Compare September 6, 2022 18:28
@jonpryor jonpryor merged commit 654d056 into dotnet:main Sep 6, 2022
grendello added a commit to grendello/xamarin-android that referenced this pull request Sep 7, 2022
* main:
  Bump to dotnet/installer@330dee3 (dotnet#7334)
  [xaprepare] CGManifest.json conforms to JSON schema (dotnet#7342)
grendello added a commit to grendello/xamarin-android that referenced this pull request Sep 7, 2022
* mm-runtime:
  Bump to dotnet/installer@330dee3 (dotnet#7334)
  [xaprepare] CGManifest.json conforms to JSON schema (dotnet#7342)
grendello added a commit to grendello/xamarin-android that referenced this pull request Sep 7, 2022
* mm-cleanup-and-enable:
  Bump to dotnet/installer@330dee3 (dotnet#7334)
  [xaprepare] CGManifest.json conforms to JSON schema (dotnet#7342)
@github-actions github-actions bot locked and limited conversation to collaborators Jan 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants