Skip to content

Incorrect return type definition for deleteKey #11

@CarstenLeue

Description

@CarstenLeue

The type definition for deleteKey is:

    deleteKey(params: IbmKeyProtectApiV2.DeleteKeyParams): Promise<IbmKeyProtectApiV2.Response<IbmKeyProtectApiV2.DeleteKey>>;

with IbmKeyProtectApiV2.DeleteKey:

    interface DeleteKey {
        /** The metadata that describes the resource array. */
        metadata: CollectionMetadata;
        /** A collection of resources. */
        resources: KeyWithPayload[];
    }

but the actually returned data is:

{
    "status": 204,
    "statusText": "No Content",
    "headers": {
        "access-control-allow-headers": "Origin, Content-Type, Bluemix-Space, Bluemix-Org, Authorization, Prefer, Request-Origin",
        "access-control-allow-methods": "GET, POST, DELETE, OPTIONS, HEAD",
        "access-control-allow-origin": "*",
        "access-control-expose-headers": "Correlation-Id, Key-Total",
        "bluemix-instance": "14f860fb-ef1c-4814-be09-58c6d269389a",
        "cache-control": "no-cache, no-store, must-revalidate",
        "correlation-id": "931bbe03-eb0b-4d5a-9374-23fd8200c213, 931bbe03-eb0b-4d5a-9374-23fd8200c213",
        "date": "Mon, 29 Nov 2021 16:05:32 GMT",
        "expires": "0",
        "pragma": "no-cache",
        "strict-transport-security": "max-age=31536000; includeSubDomains; preload",
        "connection": "close"
    },
    "result": ""
}

Clearly result is not of the specified data type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions