Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kv.namespaces.bulk.delete is missing body param #953

Open
ottomated opened this issue Jun 17, 2024 · 2 comments
Open

kv.namespaces.bulk.delete is missing body param #953

ottomated opened this issue Jun 17, 2024 · 2 comments

Comments

@ottomated
Copy link

Seen here, the body param, which is a string array, is missing from the typescript definition. This is probably because it's a raw array without an object wrapper.

export interface BulkDeleteParams {
/**
* Identifier
*/
account_id: string;
}

@dgellow
Copy link

dgellow commented Jun 18, 2024

Hi @ottomated,

Thanks for reporting the issue. The body of the request is indeed missing from the SDK but is specified in the API spec as:

        "requestBody": {
          "content": {
            "application/json": { "schema": { "$ref": "#/components/schemas/workers-kv_bulk_delete" } }
          },
          "required": true
        },

And as you said, the schema is a top-level array:

      "workers-kv_bulk_delete": {
        "items": { "$ref": "#/components/schemas/workers-kv_key_name_bulk" },
        "type": "array"
      },

I opened a ticket internally and will keep this thread updated

@dgellow
Copy link

dgellow commented Jun 18, 2024

Based on our understanding of the HTTP spec (RFC9110) a DELETE method shouldn't have a request body param, it is likely to be an error in Cloudflare's OpenAPI spec file.

We are still discussing how to approach this situation, I will follow-up once I have more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants