Replies: 1 comment 2 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.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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