Skip to content

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

Closed
mvanhorn wants to merge 1 commit into
microsoft:mainfrom
mvanhorn:docs/marketplace-schema-757
Closed

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

Conversation

@mvanhorn

@mvanhorn mvanhorn commented May 3, 2026

Copy link
Copy Markdown
Contributor

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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" }
]
}
@danielmeppiel danielmeppiel self-assigned this Jun 3, 2026
danielmeppiel added a commit that referenced this pull request Jun 3, 2026
…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>
@danielmeppiel

Copy link
Copy Markdown
Collaborator

This PR is superseded by #1634, which resolves the merge conflict caused by the deletion of guides/marketplaces.md in main (commit 8b6c49e). All contributions from this PR have been cherry-picked into #1634, with the original author attribution preserved via Co-authored-by trailer. Two Copilot inline review findings (string source pattern and pluginRoot example) were also folded and six advisory panel recommendations applied. Thank you @mvanhorn for the contribution.

@danielmeppiel

Copy link
Copy Markdown
Collaborator

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.

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.

3 participants