Add $schema to server.json specification to enable versioning, IDE autocomplete (#308)

## Summary
- Add optional `$schema` property to ServerDetail specification
- Update JSON Schema, OpenAPI spec, Go models, examples, and publisher
template
- Enable schema versioning and IDE validation support

## Changes
- Added `$schema` as optional string property with URI format in specs
- Updated Go ServerDetail struct with new Schema field
- Added `$schema` to examples and publisher template
- Copy schema file to ../static for GitHub Pages hosting

Fixes #139
This commit is contained in:
adam jones 2025-08-27 01:30:25 +01:00 • committed by GitHub
commit 5fb6ee2982
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 36 additions and 18 deletions

View file

@ -52,6 +52,7 @@ type Package struct {
}
type ServerJSON struct {
Schema string `json:"$schema"`
Name string `json:"name"`
Description string `json:"description"`
Status string `json:"status,omitempty"`
@ -489,6 +490,7 @@ func createServerStructure(
// Create server structure
return ServerJSON{
Schema: "https://static.modelcontextprotocol.io/schemas/2025-07-09/server.schema.json",
Name: name,
Description: description,
Status: status,

View file

@ -1,4 +1,5 @@
{
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-07-09/server.schema.json",
"description": "<your description here>",
"name": "io.github.<owner>/<server-name>",
"status": "active",