1
0
mirror of https://github.com/rancher/steve.git synced 2025-09-20 19:08:46 +00:00

Change routes to all be under /v1

This commit is contained in:
Darren Shepherd
2019-08-07 09:07:11 -07:00
parent 1dc21e0576
commit 6023e23a0d
3 changed files with 11 additions and 12 deletions

View File

@@ -146,11 +146,11 @@ func (a *apiServer) Schema(base string, schema *types.Schema) string {
gvr := attributes.GVR(schema)
if gvr.Group == "" && gvr.Version != "" && gvr.Resource != "" {
return urlbuilder.ConstructBasicURL(base, "api", gvr.Version, gvr.Resource)
return urlbuilder.ConstructBasicURL(base, gvr.Version, gvr.Resource)
}
if gvr.Resource != "" {
return urlbuilder.ConstructBasicURL(base, "apis", gvr.Group, gvr.Version, gvr.Resource)
return urlbuilder.ConstructBasicURL(base, "v1", "apis", gvr.Group, gvr.Version, gvr.Resource)
}
return urlbuilder.ConstructBasicURL(base, "v1", schema.PluralName)