Skip to content

Commit 87b5d70

Browse files
authored
Merge pull request #33 from OpsLevel/kr/populate-properties
Populate Properties
2 parents 46d5966 + 10035fc commit 87b5d70

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
kind: Added
2+
body: Ensure that tool 'resourceDetails' populates the properties defined on a component
3+
time: 2025-05-02T12:41:42.102546-05:00

src/cmd/root.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,13 @@ var rootCmd = &cobra.Command{
181181
identifier := req.Params.Arguments["identifier"].(string)
182182
resourceType := opslevel.AliasOwnerTypeEnum(resourceTypeString)
183183
resp, err := client.GetAliasableResource(resourceType, identifier)
184-
return newToolResult(resp, err)
184+
switch v := resp.(type) {
185+
case *opslevel.Service:
186+
v.Properties, err = v.GetProperties(client, nil)
187+
return newToolResult(v, err)
188+
default:
189+
return newToolResult(resp, err)
190+
}
185191
})
186192

187193
// Register all documents, filtered by search term

0 commit comments

Comments
 (0)