1
0
mirror of https://github.com/rancher/norman.git synced 2025-09-01 15:18:20 +00:00

Many enhancements

This commit is contained in:
Darren Shepherd
2017-12-11 20:58:43 -07:00
parent eef2c6ee6e
commit 406c0d9999
12 changed files with 63 additions and 47 deletions

View File

@@ -105,7 +105,7 @@ func Parse(rw http.ResponseWriter, req *http.Request, schemas *types.Schemas, ur
result.Method = http.MethodGet
result.URLBuilder, err = urlbuilder.New(req, types.APIVersion{}, result.Schemas)
result.Type = "apiRoot"
result.Schema = &builtin.APIRoot
result.Schema = result.Schemas.Schema(&builtin.Version, "apiRoot")
return result, nil
}
@@ -125,7 +125,7 @@ func Parse(rw http.ResponseWriter, req *http.Request, schemas *types.Schemas, ur
if result.Schema == nil {
result.Method = http.MethodGet
result.Type = "apiRoot"
result.Schema = &builtin.APIRoot
result.Schema = result.Schemas.Schema(&builtin.Version, "apiRoot")
result.ID = result.Version.Path
return result, nil
}