Skip to content

docs(reference): add marketplace.json schema specification#1117

Open
mvanhorn wants to merge 1 commit intomicrosoft:mainfrom
mvanhorn:docs/marketplace-schema-757
Open

docs(reference): add marketplace.json schema specification#1117
mvanhorn wants to merge 1 commit intomicrosoft:mainfrom
mvanhorn:docs/marketplace-schema-757

Conversation

@mvanhorn
Copy link
Copy Markdown
Contributor

@mvanhorn mvanhorn commented May 3, 2026

Problem

Issue #757 calls out that there is no dedicated reference for the marketplace.json schema. Authors and tooling have to reverse-engineer the format from guides/marketplaces.md, guides/marketplace-authoring.md, and the JSON Schema fixture under tests/fixtures/.

Change

Adds a new reference page at docs/src/content/docs/reference/marketplace-schema.md (sidebar order 7), modelled on manifest-schema.md and lockfile-spec.md:

  • Working Draft framing with <dl> header and a link to the canonical JSON Schema fixture.
  • RFC 2119 conformance.
  • Top-level fields and the owner sub-object as labelled tables.
  • Per-plugin entry table covering all 26 keys defined in the canonical schema.
  • Source types (github, url, git-subdir, string source) plus the source / repo / sha / url / path alias table for Copilot CLI back-compat.
  • metadata.pluginRoot semantics, with a worked example.
  • Examples: minimal, full-featured, and a Copilot-CLI legacy form.
  • Validation snippet using jsonschema.
  • Versioning policy and references to Anthropic / Copilot upstream specs.

The existing guides/marketplaces.md page gets one Starlight :::tip "See also" callout linking to the new reference. No other prose was changed.

Notes

  • The canonical machine-readable schema is tests/fixtures/schemas/claude-code-marketplace.schema.json. This page is the human-readable mirror, not a redefinition.
  • Where the existing guide uses legacy Copilot-CLI key names (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.
  • New page appears in the Reference sidebar between examples and experimental (order 7).
  • "See also" callout in the Marketplaces guide links to the new page.

Refs #757

…#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
Copilot AI review requested due to automatic review settings May 3, 2026 11:29
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.json schema 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.

Comment on lines +126 to +130
| 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" }` |

Comment on lines +185 to +193
```json
{
"name": "Acme Plugins",
"owner": { "name": "Acme Corp" },
"metadata": { "pluginRoot": "./plugins" },
"plugins": [
{ "name": "my-tool", "source": "my-tool" }
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants