1
0
mirror of https://github.com/rancher/norman.git synced 2025-09-02 15:54:32 +00:00

Refactor types

This commit is contained in:
Darren Shepherd
2017-11-29 14:27:02 -07:00
parent ee148b4d18
commit 15e105a0ab
15 changed files with 89 additions and 43 deletions

View File

@@ -10,6 +10,7 @@ import (
"github.com/rancher/norman/parse"
"github.com/rancher/norman/parse/builder"
"github.com/rancher/norman/types"
"github.com/rancher/norman/types/definition"
"github.com/sirupsen/logrus"
)
@@ -90,7 +91,7 @@ func toString(val interface{}) string {
}
func (j *JSONResponseWriter) convert(b *builder.Builder, context *types.APIContext, input map[string]interface{}) *types.RawResource {
schema := context.Schemas.Schema(context.Version, fmt.Sprint(input["type"]))
schema := context.Schemas.Schema(context.Version, definition.GetFullType(input))
if schema == nil {
return nil
}