docs(reference): add marketplace.json schema specification#1117
docs(reference): add marketplace.json schema specification#1117mvanhorn wants to merge 1 commit into
Conversation
…#757) Adds a dedicated reference page documenting the marketplace.json schema APM consumes and produces, alongside the existing manifest and lockfile specs. The page covers all top-level and per-plugin fields, source types, source-key aliases for Copilot CLI compatibility, the metadata.pluginRoot semantics, validation against the canonical JSON Schema fixture, and versioning rules. The existing Marketplaces guide gets a single "See also" callout linking to the new reference. The canonical JSON Schema at tests/fixtures/schemas/claude-code-marketplace.schema.json remains the source of truth; this document is the human-readable mirror. Refs microsoft#757
There was a problem hiding this comment.
Pull request overview
Adds a dedicated human-readable reference for the marketplace.json schema to reduce the need to reverse-engineer the format from guides and fixtures, and links to it from the existing Marketplaces guide.
Changes:
- Added a new reference page documenting the
marketplace.jsonschema and source variants/aliases. - Added a "See also" tip in the Marketplaces guide linking to the new schema reference.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| docs/src/content/docs/reference/marketplace-schema.md | New reference page describing the marketplace.json schema, including fields, source types, aliases, examples, and validation guidance. |
| docs/src/content/docs/guides/marketplaces.md | Adds a tip callout linking readers to the new schema reference page. |
| | String `source` | `"./tools/local-plugin"` | None beyond the string itself. | Path to the plugin root, relative to the marketplace root. The canonical path form begins with `./`; APM also resolves bare names through `metadata.pluginRoot` as described in [section 5](#5-plugin-root-directory). | `"./tools/local-plugin"` | | ||
| | `github` | `{ "source": "github", "repo": "owner/repo" }` | `source`, `repo` | GitHub repository in `owner/repo` format. | `{ "source": "github", "repo": "acme/code-review-plugin" }` | | ||
| | `url` | `{ "source": "url", "url": "https://..." }` | `source`, `url` | Full Git repository URL, such as HTTPS or `git@` SSH syntax. | `{ "source": "url", "url": "https://github.com/acme/style-guide.git" }` | | ||
| | `git-subdir` | `{ "source": "git-subdir", "url": "owner/repo", "path": "plugins/tool" }` | `source`, `url`, `path` | Plugin located in a subdirectory of a larger repository. The repository is cloned sparsely so only the selected subdirectory is materialized. | `{ "source": "git-subdir", "url": "acme/monorepo", "path": "plugins/eslint-rules" }` | | ||
|
|
| ```json | ||
| { | ||
| "name": "Acme Plugins", | ||
| "owner": { "name": "Acme Corp" }, | ||
| "metadata": { "pluginRoot": "./plugins" }, | ||
| "plugins": [ | ||
| { "name": "my-tool", "source": "my-tool" } | ||
| ] | ||
| } |
…a validity Addresses two Copilot review findings on #1117: - String source description now explicitly states that the canonical JSON Schema requires the '^./' pattern; bare names are an APM runtime extension that does not conform to the canonical schema. - pluginRoot section example changed from bare name 'my-tool' to schema-valid './my-tool'; APM's bare-name extension is documented as a Note block so readers are not misled about schema validation. Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
This PR is superseded by #1634, which resolves the merge conflict caused by the deletion of |
|
Closing - we need to point users to the vendor's specifications, not maintain our own schema. So far, we have Claude and Codex pushing slight variations of the marketplace schema. |
Problem
Issue #757 calls out that there is no dedicated reference for the
marketplace.jsonschema. Authors and tooling have to reverse-engineer the format fromguides/marketplaces.md,guides/marketplace-authoring.md, and the JSON Schema fixture undertests/fixtures/.Change
Adds a new reference page at
docs/src/content/docs/reference/marketplace-schema.md(sidebar order 7), modelled onmanifest-schema.mdandlockfile-spec.md:<dl>header and a link to the canonical JSON Schema fixture.github,url,git-subdir, stringsource) plus thesource/repo/sha/url/pathalias table for Copilot CLI back-compat.metadata.pluginRootsemantics, with a worked example.jsonschema.The existing
guides/marketplaces.mdpage gets one Starlight:::tip"See also" callout linking to the new reference. No other prose was changed.Notes
tests/fixtures/schemas/claude-code-marketplace.schema.json. This page is the human-readable mirror, not a redefinition.repo/subdir) and the canonical schema uses Claude-Code names (url/path), the new reference documents the canonical names and lists the legacy aliases in §4.1.1 instead of contradicting the guide.Test plan
pnpm --dir docs build(or whatever the docs site uses) succeeds.examplesandexperimental(order 7).Refs #757