Menu

The docs allowed a path, the regexp didn't: fixing GitLab's NuGet group API
📰

The docs allowed a path, the regexp didn't: fixing GitLab's NuGet group API

DEV Community: ruby·Priyanshu Jha·about 11 hours ago
#iIKFLwn4
#devtoruby#devto#dev#group#path
Long article (1210 words) — no AI summary yet.
Reading 0:00
15s threshold

The docs for the group-level NuGet API said the id could be a group ID or a full group path. The code disagreed. A request with the path failed with {"error":"id is invalid"} before GitLab ever looked the group up.

This is the story of gitlab-org/gitlab!272719 . I'll cover the regexp that rejected a valid path, why I did not treat this as a docs-only correction, and the review that added a private-group example and a note about encoding / .

The issue: documented, then rejected

The issue was gitlab-org/gitlab#641185 , opened by Viktor Bogdan. The NuGet API documentation describes id as:

The group ID or full group path.

A numeric group ID worked. A path such as /api/v4/groups/example-group/-/packages/nuget/index.json did not.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.