open-vault/builtin/credential/approle
Anton Averchenkov 545ee098ab
Add openapi response definitions to approle/path_role.go (#18198)
This PR modifies the path schema of `approle/path_role.go`, switching the old `Callbacks` to the equivalent `Operations` objects with a list of response fields for the 200 responses. This will allow us to generate a response structures in openapi.json. This PR is split out from #18055 along with #18192.

### Example

For `GET "/auth/approle/role/{role_name}/bind-secret-id"` path, it will update the response as follows:

```diff
        "responses": {
          "200": {
            "description": "OK",
++            "content": {
++              "application/json": {
++                "schema": {
++                  "$ref": "#/components/schemas/ApproleRoleBindSecretIdResponse"
++                }
++             }
            }
          }
        }
```

And will add the actual response structure:

```diff
++      "ApproleRoleBindSecretIdResponse": {
++        "type": "object",
++        "properties": {
++          "bind_secret_id": {
++            "type": "boolean",
++            "description": "Impose secret_id to be presented when logging in using this role. Defaults to 'true'."
++          }
++        }
++      },
```
2022-12-05 16:55:13 -05:00
..
cmd/approle Update to api 1.0.1 and sdk 0.1.8 2019-04-15 14:10:07 -04:00
backend.go Check if plugin version matches running version (#17182) 2022-09-21 12:25:04 -07:00
backend_test.go Return errInvalidCredentials when wrong credentials is provided for existent users (#17104) 2022-09-27 16:49:14 -07:00
path_login.go Return errInvalidCredentials when wrong credentials is provided for existent users (#17104) 2022-09-27 16:49:14 -07:00
path_login_test.go VAULT-6727 Adjust cert and approle role resolution, add more tests (#16341) 2022-07-20 09:24:06 -04:00
path_role.go Add openapi response definitions to approle/path_role.go (#18198) 2022-12-05 16:55:13 -05:00
path_role_test.go Return errInvalidCredentials when wrong credentials is provided for existent users (#17104) 2022-09-27 16:49:14 -07:00
path_tidy_user_id.go builtin: deprecate errwrap.Wrapf() throughout (#11430) 2021-04-22 11:20:59 -04:00
path_tidy_user_id_test.go builtin/credential/approle: fix dropped test errors (#11990) 2021-07-05 11:00:12 -04:00
validation.go VAULT-8518 Increase HMAC limit to 4096, and limit approle names to the same limit (#17768) 2022-11-02 10:42:09 -04:00
validation_test.go Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00