cloudflare / cloudflare/cloudflare-python

accounts/{account_id}/rules/lists/{list_id}/items body not supported

未關閉
#2,665 5 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

主要語言
Python
星號
509
分支
150
平均合併
3 小時 15 分鐘
30 天內合併 PR
1

描述

Confirm this is a Python library issue and not an underlying Cloudflare API issue.
  • This is an issue with the Python library
Describe the bug

hi
The openapi defintiion for accounts/{account_id}/rules/lists/{list_id}/items has support for a requestBody but the library (python one, but also go, curl...) does not reflect this (and does not support it).

This is might be an issue in the openapi.yaml definition.

tx

To Reproduce

import os
from cloudflare import Cloudflare

client = Cloudflare(
api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted
)
item = client.rules.lists.items.delete(
list_id="2c0fc9fa937b11eaa1b71c4d701ab86e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
body=[{"id":"1234567890abcd"}]
)

Code snippets

OS

macOS

Python version

3.9.0

Library version

v4.0.0

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

先比較 accounts/{account_id}/rules/lists/{list_id}/items 的 OpenAPI 定義與重現中使用的產生式 Python 用戶端方法。確認 requestBody 是缺少於 openapi.yaml,還是缺少於產生的支援程式碼中,然後驗證 delete 呼叫是否接受所示的 body 格式。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
python
領域
api
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。