cwms/projects/projects.py::get_project uses the wrong API version for retrieval

未關閉
#289 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

@krowvin 已經在處理了。

開始於 2026年9月11日。

  • #319 來自 @krowvin —— 未關閉

評估

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

研究方向

從 cwms/projects/projects.py 開始,檢查專案擷取路徑,然後將其 API 版本與連結的 cwms-data-api 程式碼中的 ProjectController 參照進行比較。在進行任何變更之前查看 pull request #319;完成的標準是專案擷取不再要求不受支援的版本,且回報的格式錯誤已獲得解決。

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

描述

projects.py uses the default API version for retrieval, and causes the following error:
{"message":"Formatting error:No Format for this content-type and data-type : (application/json;version=2, cwms.cda.data.dto.project.Project)", "incidentIdentifier":"bf796eca-d668-4e14-923c-db78845580c0", "source":"Parser","details":{}}

After looking at CDA, it's expecting API version 1
https://github.com/USACE/cwms-data-api/blob/develop/cwms-data-api/src/main/java/cwms/cda/api/ProjectController.java#L159
https://github.com/USACE/cwms-data-api/blob/develop/cwms-data-api/src/main/java/cwms/cda/api/ProjectController.java#L183-L187

We can either update CDA to support a new version, or update projects.py to use the correct version.

主要語言
Python
星號
16
分支
11
平均合併
7 小時 35 分鐘
30 天內合併 PR
3

環境準備

  • 提供 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

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

HydrologicEngineeringCenter/cwms-python 的其他 Issue

查看 HydrologicEngineeringCenter/cwms-python 的全部 Issue

相似的 Issue

更多 Python Issue

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

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