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 <domdomegg@users.noreply.github.com>
This commit is contained in:
adam jones 2025-08-21 22:20:22 +01:00 • committed by GitHub
commit 6dad0e340a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -31,7 +31,7 @@ type PublishRequest struct {
type Repository struct {
URL string `json:"url" bson:"url"`
Source string `json:"source" bson:"source"`
ID string `json:"id" bson:"id"`
ID string `json:"id,omitempty" bson:"id,omitempty"`
}
// ServerList represents the response for listing servers as defined in the spec