hashicorp / hashicorp/vault-client-go
json: cannot unmarshal number into Go struct field AppRoleWriteSecretIdResponse.data.secret_id_ttl of type string
- Dominant language
- Go
- Stars
- 133
- Forks
- 23
- PR merge metrics
- No merged PRs in 30d
Description
# Expected Behavior
get a AppRoleWriteSecretIdResponse struct
# Current Behavior
get a error
# Failure Information
json: cannot unmarshal number into Go struct field AppRoleWriteSecretIdResponse.data.secret_id_ttl of type string
## Steps to Reproduce
Please provide detailed steps for reproducing the issue.
1. create role
```
_, err = client.Auth.AppRoleWriteRole(ctx, "app", schema.AppRoleWriteRoleRequest{
TokenPolicies: []string{"default"},
})
if err != nil {
log.Panic("vault create role error", err)
return
}
```
2. create secret id
```
resp, err := client.Auth.AppRoleWriteSecretId(ctx, "app", schema.AppRoleWriteSecretIdRequest{})
if err != nil {
log.Panic("vault create secret id error", err)
return
}
```
...
# Additional Information
use last version
Contributor guide
Research direction
Trace AppRoleWriteSecretId and AppRoleWriteSecretIdResponse from the generated client and schema definitions, starting with the response field data.secret_id_ttl. Reproduce the role and secret-ID creation calls described in the issue, then verify that a numeric secret_id_ttl response unmarshals successfully without the reported error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100