Rename api/v1 -> api/v0 to match API paths (#320)

This PR renames the API paths from v1 to v0 to align with the actual API
versioning scheme.
This commit is contained in:
adam jones 2025-08-28 15:06:00 +01:00 • committed by GitHub
commit c0a94cca8c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,15 +1,15 @@
package service
import apiv1 "github.com/modelcontextprotocol/registry/pkg/api/v1"
import apiv0 "github.com/modelcontextprotocol/registry/pkg/api/v0"
// RegistryService defines the interface for registry operations
type RegistryService interface {
// List retrieves servers with unified format
List(cursor string, limit int) ([]apiv1.ServerRecord, string, error)
List(cursor string, limit int) ([]apiv0.ServerRecord, string, error)
// GetByID retrieves a single server by registry metadata ID with unified format
GetByID(id string) (*apiv1.ServerRecord, error)
GetByID(id string) (*apiv0.ServerRecord, error)
// Publish publishes a server with separated extensions
Publish(req apiv1.PublishRequest) (*apiv1.ServerRecord, error)
Publish(req apiv0.PublishRequest) (*apiv0.ServerRecord, error)
// EditServer updates an existing server with new details
EditServer(id string, req apiv1.PublishRequest) (*apiv1.ServerRecord, error)
EditServer(id string, req apiv0.PublishRequest) (*apiv0.ServerRecord, error)
}