From 7ecaca0bb75bf625220e24cc4862fa496baa1249 Mon Sep 17 00:00:00 2001 From: Anton Averchenkov <84287187+averche@users.noreply.github.com> Date: Wed, 21 Feb 2024 14:13:47 -0500 Subject: [PATCH] openapi: Fix response fields for rekey operations (#25509) --- changelog/25509.txt | 3 +++ vault/logical_system_paths.go | 18 +++++++++--------- 2 files changed, 12 insertions(+), 9 deletions(-) create mode 100644 changelog/25509.txt diff --git a/changelog/25509.txt b/changelog/25509.txt new file mode 100644 index 0000000000..e668d1903d --- /dev/null +++ b/changelog/25509.txt @@ -0,0 +1,3 @@ +```release-note:bug +openapi: Fixing response fields for rekey operations +``` diff --git a/vault/logical_system_paths.go b/vault/logical_system_paths.go index 2aee94009b..50e6bb43c8 100644 --- a/vault/logical_system_paths.go +++ b/vault/logical_system_paths.go @@ -739,12 +739,12 @@ func (b *SystemBackend) configPaths() []*framework.Path { func (b *SystemBackend) rekeyPaths() []*framework.Path { respFields := map[string]*framework.FieldSchema{ - "nounce": { + "nonce": { Type: framework.TypeString, Required: true, }, "started": { - Type: framework.TypeString, + Type: framework.TypeBool, Required: true, }, "t": { @@ -984,7 +984,7 @@ func (b *SystemBackend) rekeyPaths() []*framework.Path { http.StatusOK: {{ Description: "OK", Fields: map[string]*framework.FieldSchema{ - "nounce": { + "nonce": { Type: framework.TypeString, Required: true, }, @@ -992,7 +992,7 @@ func (b *SystemBackend) rekeyPaths() []*framework.Path { Type: framework.TypeBool, }, "started": { - Type: framework.TypeString, + Type: framework.TypeBool, }, "t": { Type: framework.TypeInt, @@ -1061,12 +1061,12 @@ func (b *SystemBackend) rekeyPaths() []*framework.Path { http.StatusOK: {{ Description: "OK", Fields: map[string]*framework.FieldSchema{ - "nounce": { + "nonce": { Type: framework.TypeString, Required: true, }, "started": { - Type: framework.TypeString, + Type: framework.TypeBool, Required: true, }, "t": { @@ -1094,12 +1094,12 @@ func (b *SystemBackend) rekeyPaths() []*framework.Path { http.StatusOK: {{ Description: "OK", Fields: map[string]*framework.FieldSchema{ - "nounce": { + "nonce": { Type: framework.TypeString, Required: true, }, "started": { - Type: framework.TypeString, + Type: framework.TypeBool, Required: true, }, "t": { @@ -1128,7 +1128,7 @@ func (b *SystemBackend) rekeyPaths() []*framework.Path { http.StatusOK: {{ Description: "OK", Fields: map[string]*framework.FieldSchema{ - "nounce": { + "nonce": { Type: framework.TypeString, Required: true, },