Skip to content
This repository was archived by the owner on Feb 10, 2026. It is now read-only.

Commit 817e690

Browse files
Adds design and implementation to redirect preview VersionsByID to v1
This patch redirects `/resource/{id}/versions` to `/v1/resource/{id}/versions` Signed-off-by: Puneet Punamiya <ppunamiy@redhat.com>
1 parent 2e5513c commit 817e690

20 files changed

Lines changed: 191 additions & 1313 deletions

File tree

api/design/resource.go

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,19 @@ var _ = Service("resource", func() {
4545
})
4646
Required("id")
4747
})
48-
Result(types.ResourceVersions)
48+
Result(func() {
49+
Attribute("location", String, "Redirect URL", func() {
50+
Format(FormatURI)
51+
})
52+
Required("location")
53+
})
4954

5055
HTTP(func() {
5156
GET("/resource/{id}/versions")
57+
Response(StatusFound, func() {
58+
Header("location")
59+
})
5260

53-
Response(StatusOK)
54-
Response("internal-error", StatusInternalServerError)
55-
Response("not-found", StatusNotFound)
5661
})
5762
})
5863

api/gen/http/cli/hub/cli.go

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

api/gen/http/openapi.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)