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 摘要。