Skip to content

Commit 524fa92

Browse files
dmartinoldmjbclaude
authored
Removing v0 APIs (#149)
* using UpstreamRegistry in test functions Signed-off-by: Daniele Martinoli <dmartino@redhat.com> * aligned toolhive test builder Signed-off-by: Daniele Martinoli <dmartino@redhat.com> * aligned toolhive test builder Signed-off-by: Daniele Martinoli <dmartino@redhat.com> * forcing API sources to have upstream format Signed-off-by: Daniele Martinoli <dmartino@redhat.com> * updated docs Signed-off-by: Daniele Martinoli <dmartino@redhat.com> * forcing API sources to have upstream format Signed-off-by: Daniele Martinoli <dmartino@redhat.com> * restored taskfile Signed-off-by: Daniele Martinoli <dmartino@redhat.com> * updated docs Signed-off-by: Daniele Martinoli <dmartino@redhat.com> * reduced cyclomatic complexity Signed-off-by: Daniele Martinoli <dmartino@redhat.com> * fixed test error, removed unneeded file Signed-off-by: Daniele Martinoli <dmartino@redhat.com> * restored v0 route to not break tests Signed-off-by: Daniele Martinoli <dmartino@redhat.com> * Simplified v0 API routes and fixed race condition in tests Removed deprecated server listing endpoints from v0 API routes, keeping only the registry info and OpenAPI spec endpoints. Fixed race condition in OpenAPI YAML endpoint by caching the spec using sync.Once to prevent concurrent access issues during parallel test execution. Updated Swagger documentation to reflect the removal of unused schema types (ServerDetailResponse, ServerSummaryResponse, EnvVarDetail, ListServersResponse) that were previously duplicated. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * restored taskfile Signed-off-by: Daniele Martinoli <dmartino@redhat.com> * restored taskfile Signed-off-by: Daniele Martinoli <dmartino@redhat.com> * using init() function to fetch openapi data Signed-off-by: Daniele Martinoli <dmartino@redhat.com> --------- Signed-off-by: Daniele Martinoli <dmartino@redhat.com> Co-authored-by: Don Browne <dmjb@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com>
1 parent d15206f commit 524fa92

File tree

5 files changed

+45
-1794
lines changed

5 files changed

+45
-1794
lines changed

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.

docs/thv-registry-api/swagger.yaml

Lines changed: 0 additions & 198 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,10 @@
11
components:
22
schemas:
3-
internal_api_v0.EnvVarDetail:
4-
properties:
5-
default:
6-
type: string
7-
description:
8-
type: string
9-
name:
10-
type: string
11-
required:
12-
type: boolean
13-
secret:
14-
type: boolean
15-
type: object
163
internal_api_v0.ErrorResponse:
174
properties:
185
error:
196
type: string
207
type: object
21-
internal_api_v0.ListServersResponse:
22-
properties:
23-
servers:
24-
items:
25-
$ref: '#/components/schemas/internal_api_v0.ServerSummaryResponse'
26-
type: array
27-
uniqueItems: false
28-
total:
29-
type: integer
30-
type: object
318
internal_api_v0.RegistryInfoResponse:
329
properties:
3310
last_updated:
@@ -39,67 +16,6 @@ components:
3916
version:
4017
type: string
4118
type: object
42-
internal_api_v0.ServerDetailResponse:
43-
properties:
44-
args:
45-
items:
46-
type: string
47-
type: array
48-
uniqueItems: false
49-
description:
50-
type: string
51-
env_vars:
52-
items:
53-
$ref: '#/components/schemas/internal_api_v0.EnvVarDetail'
54-
type: array
55-
uniqueItems: false
56-
image:
57-
type: string
58-
metadata:
59-
additionalProperties: {}
60-
type: object
61-
name:
62-
type: string
63-
permissions:
64-
additionalProperties: {}
65-
type: object
66-
repository_url:
67-
type: string
68-
status:
69-
type: string
70-
tags:
71-
items:
72-
type: string
73-
type: array
74-
uniqueItems: false
75-
tier:
76-
type: string
77-
tools:
78-
items:
79-
type: string
80-
type: array
81-
uniqueItems: false
82-
transport:
83-
type: string
84-
volumes:
85-
additionalProperties: {}
86-
type: object
87-
type: object
88-
internal_api_v0.ServerSummaryResponse:
89-
properties:
90-
description:
91-
type: string
92-
name:
93-
type: string
94-
status:
95-
type: string
96-
tier:
97-
type: string
98-
tools_count:
99-
type: integer
100-
transport:
101-
type: string
102-
type: object
10319
model.Argument:
10420
properties:
10521
choices:
@@ -492,100 +408,6 @@ paths:
492408
summary: Get OpenAPI specification
493409
tags:
494410
- system
495-
/api/v0/registry/servers:
496-
get:
497-
deprecated: true
498-
description: Get a list of all available MCP servers in the registry
499-
parameters:
500-
- description: Response format
501-
in: query
502-
name: format
503-
schema:
504-
default: toolhive
505-
enum:
506-
- toolhive
507-
- upstream
508-
type: string
509-
requestBody:
510-
content:
511-
application/json:
512-
schema:
513-
type: object
514-
responses:
515-
"200":
516-
content:
517-
application/json:
518-
schema:
519-
$ref: '#/components/schemas/internal_api_v0.ListServersResponse'
520-
description: OK
521-
"400":
522-
content:
523-
application/json:
524-
schema:
525-
$ref: '#/components/schemas/internal_api_v0.ErrorResponse'
526-
description: Bad Request
527-
"501":
528-
content:
529-
application/json:
530-
schema:
531-
$ref: '#/components/schemas/internal_api_v0.ErrorResponse'
532-
description: Not Implemented
533-
summary: List all servers
534-
tags:
535-
- servers
536-
/api/v0/registry/servers/{name}:
537-
get:
538-
deprecated: true
539-
description: Get detailed information about a specific MCP server
540-
parameters:
541-
- description: Server name
542-
in: path
543-
name: name
544-
required: true
545-
schema:
546-
type: string
547-
- description: Response format
548-
in: query
549-
name: format
550-
schema:
551-
default: toolhive
552-
enum:
553-
- toolhive
554-
- upstream
555-
type: string
556-
requestBody:
557-
content:
558-
application/json:
559-
schema:
560-
type: object
561-
responses:
562-
"200":
563-
content:
564-
application/json:
565-
schema:
566-
$ref: '#/components/schemas/internal_api_v0.ServerDetailResponse'
567-
description: OK
568-
"400":
569-
content:
570-
application/json:
571-
schema:
572-
$ref: '#/components/schemas/internal_api_v0.ErrorResponse'
573-
description: Bad Request
574-
"404":
575-
content:
576-
application/json:
577-
schema:
578-
$ref: '#/components/schemas/internal_api_v0.ErrorResponse'
579-
description: Not Found
580-
"501":
581-
content:
582-
application/json:
583-
schema:
584-
$ref: '#/components/schemas/internal_api_v0.ErrorResponse'
585-
description: Not Implemented
586-
summary: Get server by name
587-
tags:
588-
- servers
589411
/extension/v0/registries:
590412
get:
591413
description: List all registries
@@ -1191,26 +1013,6 @@ paths:
11911013
tags:
11921014
- registry
11931015
- official
1194-
/v0/publish:
1195-
post:
1196-
deprecated: true
1197-
description: Publish a new MCP server to the registry or update an existing
1198-
one
1199-
requestBody:
1200-
content:
1201-
application/json:
1202-
schema:
1203-
type: object
1204-
responses:
1205-
"501":
1206-
content:
1207-
application/json:
1208-
schema:
1209-
$ref: '#/components/schemas/internal_api_v0.ErrorResponse'
1210-
description: Not Implemented
1211-
summary: Publish MCP server (Not Implemented)
1212-
tags:
1213-
- servers
12141016
/version:
12151017
get:
12161018
deprecated: true

0 commit comments

Comments
 (0)