api: the OpenAPI document allows null on_value and off_value for a flag, which the API refuses

未关闭
#1,571 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
30/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
openapi, python
领域
api

调研方向

Start with the FeatureFlagCreate and FeatureFlagUpdate schemas in docs/api/openapi-v1.full.json and docs/api/openapi-v1.stable.json, where on_value and off_value lack a type. Check the API's Python validation that returns null_not_allowed, and follow the #954 stability row as the format for any new entry. Done means both properties exclude null in the served document, a test pins that, and both snapshots are regenerated. The fix needs serial merge ordering and a fuzz run before merge, so confirm with maintainers first.

由索引模型根据 Issue 内容生成。

描述

bug post-launch

The served OpenAPI document leaves on_value and off_value on FeatureFlagCreate and FeatureFlagUpdate without a type, so it allows any JSON value, null included. The API refuses null for them: in a measured run, 135 of 150 flag creates that the document allows answered 422 with null_not_allowed.

Both snapshots (docs/api/openapi-v1.full.json and docs/api/openapi-v1.stable.json) carry the untyped properties since #1514, which is not yet in a release. The next release would publish them in the stable document; fixing them after that needs a stability row (the #954 row is the shape), with no behaviour change.

Expected

The document describes exactly what the API accepts for on_value and off_value, and a test pins it.

Notes

The fix changes the request side of the served document, so it is its own pull request, regenerates both snapshots (merged serially with the other snapshot pull requests) and dispatches the API fuzz run before merge.

Priority

LOW.

主要语言
Python
星标
0
派生
4
平均合并
5 小时 19 分钟
30 天内合并 PR
503

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Controlvar/controlvar 的其他 Issue

查看 Controlvar/controlvar 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。