Repository: modelcontextprotocol/registry
File: internal/model/model.go (Go)

Code before:
package model

// AuthMethod represents the authentication method used
type AuthMethod string

const (
	// AuthMethodGitHub represents GitHub OAuth authentication
	AuthMethodGitHub AuthMethod = "github"
	// AuthMethodNone represents no authentication
	AuthMethodNone AuthMethod = "none"
)

// ServerStatus represents the lifecycle status of a server
type ServerStatus string

const (
	// ServerStatusActive represents an active server recommended for use
	ServerStatusActive ServerStatus = "active"
	// ServerStatusDeprecated represents a server no longer recommended for new usage
	ServerStatusDeprecated ServerStatus = "deprecated"
)

// Authentication holds information about the authentication method and credentials
type Authentication struct {
	Method  AuthMethod `json:"method,omitempty"`
	Token   string     `json:"token,omitempty"`
	RepoRef string     `json:"repo_ref,omitempty"`
}

// PublishRequest represents a request to publish a server to the registry
type PublishRequest struct {
	ServerDetail    `json:",inline"`
	AuthStatusToken string `json:"-"` // Used internally for device flows
}

// Repository represents a source code repository as defined in the spec
type Repository struct {
	URL    string `json:"url" bson:"url"`
	Source string `json:"source" bson:"source"`
	ID     string `json:"id" bson:"id"`
}

// ServerList represents the response for listing servers as defined in the spec
type ServerList struct {
	Servers    []Server `json:"servers" bson:"servers"`

Review comment (suggestion):
```suggestion
	// ServerStatusActive represents an actively maintained server (as asserted by the publisher)
	ServerStatusActive ServerStatus = "active"
	// ServerStatusDeprecated represents a server that is no longer actively maintained
	ServerStatusDeprecated ServerStatus = "deprecated"
```

Code after:
package model

// AuthMethod represents the authentication method used
type AuthMethod string

const (
	// AuthMethodGitHub represents GitHub OAuth authentication
	AuthMethodGitHub AuthMethod = "github"
	// AuthMethodNone represents no authentication
	AuthMethodNone AuthMethod = "none"
)

// ServerStatus represents the lifecycle status of a server
type ServerStatus string

const (
	// ServerStatusActive represents an actively maintained server (as asserted by the publisher)
	ServerStatusActive ServerStatus = "active"
	// ServerStatusDeprecated represents a server that is no longer actively maintained
	ServerStatusDeprecated ServerStatus = "deprecated"
)

// Authentication holds information about the authentication method and credentials
type Authentication struct {
	Method  AuthMethod `json:"method,omitempty"`
	Token   string     `json:"token,omitempty"`
	RepoRef string     `json:"repo_ref,omitempty"`
}

// PublishRequest represents a request to publish a server to the registry
type PublishRequest struct {
	ServerDetail    `json:",inline"`
	AuthStatusToken string `json:"-"` // Used internally for device flows
}

// Repository represents a source code repository as defined in the spec
type Repository struct {
	URL    string `json:"url" bson:"url"`
	Source string `json:"source" bson:"source"`
	ID     string `json:"id" bson:"id"`
}

// ServerList represents the response for listing servers as defined in the spec
type ServerList struct {
	Servers    []Server `json:"servers" bson:"servers"`