Fix misleading server.json schema URL label (#803)
The schema in this repo may contain unreleased changes, so labeling it with a dated version URL is misleading. Change to use a `draft` URL instead, and add documentation for the schema contribution process. - Update $id in server.schema.json to use draft URL - Update example $schema URL in openapi.yaml - Add Draft (Unreleased) section to CHANGELOG.md - Add CONTRIBUTING.md with process for making/releasing schema changes Written by Claude Code, reviewed and tweaked by me. Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
parent
d528ac5bbc
commit
51c70ba034
1 changed files with 53 additions and 5 deletions
|
|
@ -88,8 +88,12 @@ func main() {
|
|||
}
|
||||
}
|
||||
|
||||
// Build the JSON Schema document with dynamic version from OpenAPI spec
|
||||
schemaID := fmt.Sprintf("https://static.modelcontextprotocol.io/schemas/%s/server.schema.json", version)
|
||||
// Build the JSON Schema document with draft URL
|
||||
// The in-repo schema uses "draft" since it may contain unreleased changes.
|
||||
// When releasing, the schema is published to a versioned URL (e.g., 2025-10-17)
|
||||
// on https://github.com/modelcontextprotocol/static
|
||||
_ = version // version from OpenAPI spec available if needed
|
||||
schemaID := "https://static.modelcontextprotocol.io/schemas/draft/server.schema.json"
|
||||
jsonSchema := map[string]interface{}{
|
||||
"$comment": "This file is auto-generated from docs/reference/api/openapi.yaml. Do not edit manually. Run 'make generate-schema' to update.",
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
|
|
|
|||
Loading…
Reference in a new issue