openapi: Fix approle reponse duration types #25510
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixing the types of the various duration / TTL fields in AppRole responses
framework.TypeDurationSecond
=>framework.Int64
.Since the actual values returned in the AppRole responses are integers, switching to Int64 is more explicit and will fix the parsing issues in hashicorp/vault-client-go#249.
Background
framework.TypeDurationSecond
can be either a string (e.g.24h
) or an integer. It does not translate well into OpenAPI schema and we currently map it to a string:vault/sdk/framework/openapi.go
Lines 1065 to 1067 in 633dae1