Skip to content

Commit 8db1d29

Browse files
committed
refactor: update registry type from 'docker-hub' to 'oci' across multiple files
1 parent b810634 commit 8db1d29

File tree

8 files changed

+195
-196
lines changed

8 files changed

+195
-196
lines changed

data/seed.json

Lines changed: 180 additions & 180 deletions
Large diffs are not rendered by default.

docs/server-json/examples.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ This will essentially instruct the MCP client to execute `dnx Knapcode.SampleMcp
131131
]
132132
},
133133
{
134-
"registry_type": "docker-hub",
134+
"registry_type": "oci",
135135
"registry_base_url": "https://docker.io",
136136
"identifier": "mcp/filesystem:1.0.2",
137137
"version": "1.0.2",
@@ -339,7 +339,7 @@ The `dnx` tool ships with the .NET 10 SDK, starting with Preview 6.
339339
},
340340
"packages": [
341341
{
342-
"registry_type": "docker-hub",
342+
"registry_type": "oci",
343343
"registry_base_url": "https://docker.io",
344344
"identifier": "example/database-manager-mcp",
345345
"version": "3.1.0",

docs/server-json/registry-schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"enum": [
2222
"npm",
2323
"pypi",
24-
"docker-hub",
24+
"oci",
2525
"nuget",
2626
"mcpb"
2727
]

docs/server-json/server.schema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@
8383
"properties": {
8484
"registry_type": {
8585
"type": "string",
86-
"description": "Registry type indicating how to download packages (e.g., 'npm', 'pypi', 'docker-hub', 'nuget', 'mcpb')",
87-
"examples": ["npm", "pypi", "docker-hub", "nuget", "mcpb"]
86+
"description": "Registry type indicating how to download packages (e.g., 'npm', 'pypi', 'oci', 'nuget', 'mcpb')",
87+
"examples": ["npm", "pypi", "oci", "nuget", "mcpb"]
8888
},
8989
"registry_base_url": {
9090
"type": "string",

docs/server-registry-api/openapi.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,11 +278,11 @@ components:
278278
properties:
279279
registry_type:
280280
type: string
281-
description: Registry type indicating how to download packages (e.g., 'npm', 'pypi', 'docker-hub', 'nuget', 'mcpb')
281+
description: Registry type indicating how to download packages (e.g., 'npm', 'pypi', 'oci', 'nuget', 'mcpb')
282282
examples:
283283
- "npm"
284284
- "pypi"
285-
- "docker-hub"
285+
- "oci"
286286
- "nuget"
287287
- "mcpb"
288288
registry_base_url:

internal/validators/validators.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,7 @@ func validatePackage(pkg *model.Package) error {
189189
return nil
190190
}
191191

192-
// For registry-based packages, no special validation needed
193-
// Registry types like "npm", "pypi", "docker-hub", "nuget" are all valid
192+
// For other registry-based packages, no special validation needed
194193
return nil
195194
}
196195

pkg/model/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ type ServerJSON struct {
2323

2424
// Package represents a package configuration
2525
type Package struct {
26-
// RegistryType indicates how to download packages (e.g., "npm", "pypi", "docker-hub", "mcpb")
26+
// RegistryType indicates how to download packages (e.g., "npm", "pypi", "oci", "mcpb")
2727
RegistryType string `json:"registry_type,omitempty" bson:"registry_type,omitempty"`
2828
// RegistryBaseURL is the base URL of the package registry
2929
RegistryBaseURL string `json:"registry_base_url,omitempty" bson:"registry_base_url,omitempty"`

tools/publisher/commands/init.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ import (
1515
)
1616

1717
const (
18-
RegistryTypeNPM = "npm"
19-
RegistryTypePyPi = "pypi"
20-
RegistryTypeDocker = "docker"
18+
RegistryTypeNPM = "npm"
19+
RegistryTypePyPi = "pypi"
20+
RegistryTypeOci = "oci"
2121
)
2222

2323
func InitCommand() error {
@@ -206,7 +206,7 @@ func detectPackageType() string {
206206

207207
// Check for Dockerfile
208208
if _, err := os.Stat("Dockerfile"); err == nil {
209-
return RegistryTypeDocker
209+
return RegistryTypeOci
210210
}
211211

212212
// Default to npm as most common
@@ -281,8 +281,8 @@ func createServerJSON(
281281
case RegistryTypePyPi:
282282
registryType = RegistryTypePyPi
283283
registryBaseURL = "https://pypi.org"
284-
case RegistryTypeDocker:
285-
registryType = "docker-hub"
284+
case RegistryTypeOci:
285+
registryType = RegistryTypeOci
286286
registryBaseURL = "https://docker.io"
287287
case "url":
288288
registryType = "url"

0 commit comments

Comments
 (0)