Fixed createObjectStorageKeys response #324
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.
Reported in linode/linode-cli#199.
Creating a new object storage key with linode-cli did not return any response.
allOf
does not appear to be valid in a response (https://swagger.io/docs/specification/describing-responses/ mentions anyOf and oneOf, but not allOf.)Adding the secret_key property back to the ObjectStorageKey schema and removing it from the response schema for createObjectStorageKeys fixes that and allows linode-cli to return the secret key of the newly created key. For all other requests, the secret key is returned as
[REDACTED]
.To test, check out this branch locally, check out linode-cli, then run
make build SPEC=<path_to>/linode-api-docs/openapi.yaml
in the linode-cli directory. Runningpython3 -m linodecli object-storage keys-create
in the linode-cli directory should now return the secret key.