ScratchAddons / manifest-schema

Schema for the addon manifest files (addon.json) hosted on the main repository.
GNU General Public License v3.0
5 stars 10 forks source link
schema

Scratch Addons' addon manifest

Dist. Branch Update workflow status View on json-schema.app

This repository hosts the schema for Scratch Addons' addon manifest. For more information, there's the documentation for the manifest.

How-to

The simplest way to use the schema is to add the property of $schema with the URL.

As an example, add the pointed line to your manifest. This will use the latest version of the schema. Depending on your placement, you need to add a comma after the line.

{
    "$schema": "https://raw.githubusercontent.com/ScratchAddons/manifest-schema/dist/schema.json", // This one!
    "name": "...",
    ...
}

You can also add other variations of the schema, such as...

{
    // v1.19
    "$schema": "https://raw.githubusercontent.com/ScratchAddons/manifest-schema/master/1/1.19.json",

    // or...

    // v1.18
    "$schema": "https://raw.githubusercontent.com/ScratchAddons/manifest-schema/master/1/1.18.json",

    // or...

    // v1.17
    "$schema": "https://raw.githubusercontent.com/ScratchAddons/manifest-schema/master/1/1.17.json",

    // or...

    // latest
    "$schema": "https://raw.githubusercontent.com/ScratchAddons/manifest-schema/dist/schema.json",

    // (you only have to add one!)
}

Adding the schema is optional. On the main repo, this will be checked by the workflow, regardless of the presence of the $schema property.

Contributing

PRs and issues are welcome. If there are PRs on the main repo that require changes on the schema, you may also open a PR or an issue to handle the change.

Considerations

  1. For the description, mind the grammar.
    Most of the times it is a noun phrase, but sometimes it is a proper sentence. Either way, you need to use proper grammar on the description.
  2. Also mind the Addon Manifest page on the docs.
    You may refer to the page when in doubt, or you may change some parts of the page if there are inaccuracies.

Versioning

The versioning consist of the major version and the minor version. The major version is rarely bumped, because it is reserved for very, very, large changes, either on the schema or on SA itself.

In most times, you bump the minor once there is a new feature, but for Scratch Addons, you only bump the minor version when the new minor version of Scratch Addons requires changes on the schema.

For example, if a new feature (or multiple) on a certain minor version of SA require changes on the schema, you have to increment the minor version by 1.

This means that there's no need to bump if there are no necessary changes on the schema on a certain minor version of SA. This also means that the schema's versioning is seperate from SA's versioning. (e.q. SA 1.6.x doesn't need changes on the schema, so bumping is skipped and SA 1.7.x gets the previous schema version)

If the changes are patch-level (or not necessarily needed), such as bug/typo fixes and description changes, then it also doesn't need a bump on the minor version.

To bump a minor version, copy the latest schema and rename it to the new version number, along with replacing any instance of the old version number with the new one. It is suggested to commit this separately, before doing the relevant changes.

Folder structure

.
└── 📂 1 # Folder with major version as the name
    └── 📜 1.0.json # Schema with both major and minor versions as the name

License

This project is licensed under the terms of GNU General Public License v3.0.