Replies: 3 comments 3 replies
-
I think this is a very reasonable change, I'm in favor of it. Thanks for fleshing it out! Maybe we would still support I wonder if this introduces a need for handling redirects in the case of |
Beta Was this translation helpful? Give feedback.
-
Think this is perhaps lower priority given we're already 95% of the way there with #374 |
Beta Was this translation helpful? Give feedback.
-
The discussion on #396 with @rdimitrov convinced me that allowing renames might be a bad idea, despite the potential demand for them. In which case, I think I'm now much more aligned with the original proposal. I think it would be clean to entirely remove the notion of UUID's from the API spec? Thinking about it from the sub-registry perspective, it is quite odd to have to funnel that piece of data from the upstream down to sub-registry consumers. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Pre-submission Checklist
Your Idea
Problem
The current API uses opaque UUIDs for server retrieval (
/v0/servers/{id}
), but most clients actually want to fetch servers by their semantic identifiers - name and version. This creates unnecessary friction and requires additional API calls.Additionally, the ID is technically extra metadata specific to the official registry. This means it's not super clear how subregistries should handle this for custom packages added to them - which then makes the registry spec harder to interpret.
Proposed Change
Replace
/v0/servers/{id}
with/v0/servers/{name}/{version}
where:{name}
is the server's semantic name (e.g.,io.github.domdomegg/filesystem
){version}
is either a specific version (e.g.,1.2.3
) or the special stringlatest
latest
for a package, to avoid that conflictThere would still be conflicts if the name was the same between the official regsitry and a subregistry, although this is unlikely with namespacing and registries would have to more explicitly deal with this.
Benefits
1. More intuitive for clients
Current workflow for "get the latest version of filesystem server":
Proposed workflow:
# Single call (with URL encoded name) curl /v0/servers/io.github.domdomegg%2Ffilesystem/latest
2. Aligns with package manager conventions
This follows established patterns:
registry.npmjs.org/package-name/1.2.3
repo1.maven.org/maven2/group/artifact/version
registry-1.docker.io/library/nginx:latest
Implementation Notes
URL encoding
Server names contain slashes and may contain other special characters, so proper URL encoding is required:
io.github.user/server-name
→io.github.user%2Fserver-name
This is necessary to avoid ambiguity in parsing
/v0/servers/{name}/{version}
- without encoding, a name likeio.github.domdomegg/filesystem
in the URL/v0/servers/io.github.domdomegg/filesystem/latest
could be parsed as either:io.github.domdomegg/filesystem
, version:latest
✓io.github.domdomegg
, version:filesystem/latest
✗Scope
Beta Was this translation helpful? Give feedback.
All reactions