if respKind != "" {
tmp["kind"] = respKind
}
+ if included, ok := tmp["included"]; ok && included == nil {
+ tmp["included"] = make([]interface{}, 0)
+ }
defaultItemKind := ""
if strings.HasSuffix(respKind, "List") {
defaultItemKind = strings.TrimSuffix(respKind, "List")
}
- if items, ok := tmp["items"].([]interface{}); ok {
+ var items, included []interface{}
+ var itemsOK, includedOK bool
+ items, itemsOK = tmp["items"].([]interface{})
+ included, includedOK = tmp["included"].([]interface{})
+ if includedOK && len(included) > 0 {
+ items = append(items, included...)
+ }
+
+ if itemsOK {
for i, item := range items {
// Fill in "kind" by inspecting UUID/PDH if
// possible; fall back on assuming each
var infixMap = map[string]interface{}{
"4zz18": arvados.Collection{},
+ "xvhdp": arvados.ContainerRequest{},
+ "dz642": arvados.Container{},
"j7d0g": arvados.Group{},
+ "8i9sb": arvados.Job{},
+ "d1hrv": arvados.PipelineInstance{},
+ "p5p6p": arvados.PipelineTemplate{},
+ "j58dm": arvados.Specimen{},
+ "q1cn2": arvados.Trait{},
+ "7fd4e": arvados.Workflow{},
}
var mungeKind = regexp.MustCompile(`\..`)