Skip to content

Commit 5533fa2

Browse files
authored
Add v0.1 endpoint stubs (#61)
This change is part of the work for #38 and adds stubs for official MCP Registry endpoints. It also adds deprecation notice to the original API. It's mostly to agree on paths and code organization.
1 parent 8c3cde9 commit 5533fa2

File tree

9 files changed

+448
-159
lines changed

9 files changed

+448
-159
lines changed

cmd/thv-registry-api/app/serve.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919

2020
"github.com/stacklok/toolhive-registry-server/pkg/config"
2121

22-
v1 "github.com/stacklok/toolhive-registry-server/internal/api/v1"
22+
"github.com/stacklok/toolhive-registry-server/internal/api"
2323
"github.com/stacklok/toolhive-registry-server/internal/service"
2424
thvk8scli "github.com/stacklok/toolhive/pkg/container/kubernetes"
2525
"github.com/stacklok/toolhive/pkg/logger"
@@ -201,13 +201,13 @@ func runServe(_ *cobra.Command, _ []string) error {
201201
}
202202

203203
// Create the registry server with middleware
204-
router := v1.NewServer(svc,
205-
v1.WithMiddlewares(
204+
router := api.NewServer(svc,
205+
api.WithMiddlewares(
206206
middleware.RequestID,
207207
middleware.RealIP,
208208
middleware.Recoverer,
209209
middleware.Timeout(serverRequestTimeout),
210-
v1.LoggingMiddleware,
210+
api.LoggingMiddleware,
211211
),
212212
)
213213

docs/thv-registry-api/docs.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/thv-registry-api/swagger.json

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

0 commit comments

Comments
 (0)