Skip to content

Commit 2276835

Browse files
committed
always add the full schema
1 parent 0896cf7 commit 2276835

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

internal/providers/schemas.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,15 @@ func (ss ProviderSchema) SchemaForActionType(typeName string) (schema ActionSche
5252
// empty schema if none is available.
5353
func (ss ProviderSchema) SchemaForListResourceType(typeName string) ListResourceSchema {
5454
schema, ok := ss.ListResourceTypes[typeName]
55+
ret := ListResourceSchema{FullSchema: schema.Body}
5556
if !ok || schema.Body == nil {
56-
return ListResourceSchema{}
57+
return ret
5758
}
5859
// The configuration for the list block is nested within a "config" block.
5960
configSchema, ok := schema.Body.BlockTypes["config"]
6061
if !ok {
61-
return ListResourceSchema{}
62+
return ret
6263
}
63-
return ListResourceSchema{ConfigSchema: &configSchema.Block, FullSchema: schema.Body}
64+
ret.ConfigSchema = &configSchema.Block
65+
return ret
6466
}

0 commit comments

Comments
 (0)