Describe the Bug
I am trying to retrieve the Default and Sensitive fields of a TaskParam in the task metadata, but the fields aren't defined in the TaskParam type.
|
// TaskParam in the task metadata |
|
type TaskParam struct { |
|
Description string `json:"description,omitempty"` |
|
Type string `json:"type,omitempty"` |
|
} |
The Puppet Orchestrator API returns these fields.
https://www.puppet.com/docs/pe/2023.7/orchestrator_api_tasks_endpoint#orchestrator_api_get_tasks_module_taskname
Expected Behavior
When retrieving tasks, the task's metadata for parameters should contain the Default and Sensitive fields (and their values) if populated.
type TaskParam struct {
Description string `json:"description,omitempty"`
Type string `json:"type,omitempty"`
Default interface{} `json:"default,omitempty"`
Sensitive bool `json:"sensitive,omitempty"`
}
Steps to Reproduce
Steps to reproduce the behavior:
- Call a Client's Task or TaskbyID method to retrieve a Task.
- The Task's TaskMetadata has a map of TaskParams, but they won't include Default or Sensitive fields even if the API call returns them.
Environment
- Version [e.g. 1.27.0] v1.11.0
- Platform [e.g. Ubuntu 18.04] macOS 14.4.1
Additional Context
I believe we just need to define the Default and Sensitive fields in the TaskParam type (as in the above example)
Describe the Bug
I am trying to retrieve the Default and Sensitive fields of a TaskParam in the task metadata, but the fields aren't defined in the TaskParam type.
go-pe-client/pkg/orch/tasks.go
Lines 117 to 121 in dfc740d
The Puppet Orchestrator API returns these fields.
https://www.puppet.com/docs/pe/2023.7/orchestrator_api_tasks_endpoint#orchestrator_api_get_tasks_module_taskname
Expected Behavior
When retrieving tasks, the task's metadata for parameters should contain the Default and Sensitive fields (and their values) if populated.
Steps to Reproduce
Steps to reproduce the behavior:
Environment
Additional Context
I believe we just need to define the Default and Sensitive fields in the TaskParam type (as in the above example)