Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/scratchaddons/manifest-schema

Schema for the addon manifest files (addon.json) hosted on the main repository.
https://github.com/scratchaddons/manifest-schema

schema

Last synced: about 5 hours ago
JSON representation

Schema for the addon manifest files (addon.json) hosted on the main repository.

Awesome Lists containing this project

README

        

# Scratch Addons' addon manifest

[![Dist. Branch Update workflow status](https://img.shields.io/github/actions/workflow/status/ScratchAddons/manifest-schema/update-dist.yml?label=dist&style=flat-square)](https://github.com/ScratchAddons/manifest-schema/actions/workflows/update-dist.yml)
[![View on json-schema.app](https://img.shields.io/badge/view-json--schema.app-blue?style=flat-square)](https://json-schema.app/view/%23?url=https%3A%2F%2Fraw.githubusercontent.com%2FScratchAddons%2Fmanifest-schema%2Fdist%2Fschema.json)

This repository hosts the schema for Scratch Addons' addon manifest. For more information, there's [the documentation for the manifest](https://scratchaddons.com/docs/reference/addon-manifest/).

- [View the changelog](https://github.com/ScratchAddons/manifest-schema/wiki/Changelog)
- [View the schema on json-schema.app](https://json-schema.app/view/%23?url=https%3A%2F%2Fraw.githubusercontent.com%2FScratchAddons%2Fmanifest-schema%2Fdist%2Fschema.json)

## 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.

```json5
{
"$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...

```json5
{
// 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](https://github.com/ScratchAddons/ScratchAddons), 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](https://github.com/ScratchAddons/ScratchAddons) 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](https://scratchaddons.com/docs/reference/addon-manifest/) 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

```bash
.
└── 📂 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.