hashicorp / hashicorp/vault-client-go

json: cannot unmarshal number into Go struct field AppRoleWriteSecretIdResponse.data.secret_id_ttl of type string

Open
#249 0 comments 5 reactions 0 assignees View on GitHub
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.