Skip to content

Commit e18e0c6

Browse files
committed
Migrate publisher to use pkg.Repository
Signed-off-by: Radoslav Dimitrov <[email protected]>
1 parent 85451ea commit e18e0c6

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

tools/publisher/main.go

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313
"os"
1414
"strings"
1515

16+
"github.com/modelcontextprotocol/registry/pkg/model"
1617
"github.com/modelcontextprotocol/registry/tools/publisher/auth"
1718
)
1819

@@ -27,10 +28,6 @@ const (
2728
)
2829

2930
// Server structure types for JSON generation
30-
type Repository struct {
31-
URL string `json:"url"`
32-
Source string `json:"source"`
33-
}
3431

3532
type VersionDetail struct {
3633
Version string `json:"version"`
@@ -63,13 +60,13 @@ type Package struct {
6360
}
6461

6562
type ServerJSON struct {
66-
Schema string `json:"$schema"`
67-
Name string `json:"name"`
68-
Description string `json:"description"`
69-
Status string `json:"status,omitempty"`
70-
Repository Repository `json:"repository"`
71-
VersionDetail VersionDetail `json:"version_detail"`
72-
Packages []Package `json:"packages"`
63+
Schema string `json:"$schema"`
64+
Name string `json:"name"`
65+
Description string `json:"description"`
66+
Status string `json:"status,omitempty"`
67+
Repository model.Repository `json:"repository"`
68+
VersionDetail VersionDetail `json:"version_detail"`
69+
Packages []Package `json:"packages"`
7370
}
7471

7572
func main() {
@@ -579,7 +576,7 @@ func createServerStructure(
579576
Name: name,
580577
Description: description,
581578
Status: status,
582-
Repository: Repository{
579+
Repository: model.Repository{
583580
URL: repoURL,
584581
Source: repoSource,
585582
},

0 commit comments

Comments
 (0)