Skip to content

Commit 6dad0e3

Browse files
Remove requirement of repository.id from server.json (#285)
Make repository.id optional by: - Removing 'id' from required fields in JSON schema - Adding omitempty tags to Go model structs - Updating examples to show simpler format without id This fixes publishing failures where the publisher tool doesn't generate repository.id but the schema requires it. Fixes #179 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: adam jones <[email protected]>
1 parent 75d1905 commit 6dad0e3

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

docs/server-json/examples.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
"status": "active",
1010
"repository": {
1111
"url": "https://github.com/modelcontextprotocol/servers",
12-
"source": "github",
13-
"id": "abc123de-f456-7890-ghij-klmnopqrstuv"
12+
"source": "github"
1413
},
1514
"version_detail": {
1615
"version": "1.0.2"

docs/server-json/schema.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
"type": "object",
99
"required": [
1010
"url",
11-
"source",
12-
"id"
11+
"source"
1312
],
1413
"properties": {
1514
"url": {

internal/model/model.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ type PublishRequest struct {
3131
type Repository struct {
3232
URL string `json:"url" bson:"url"`
3333
Source string `json:"source" bson:"source"`
34-
ID string `json:"id" bson:"id"`
34+
ID string `json:"id,omitempty" bson:"id,omitempty"`
3535
}
3636

3737
// ServerList represents the response for listing servers as defined in the spec

0 commit comments

Comments
 (0)