OpenAPITools / OpenAPITools/openapi-generator
[REQ][Qt] Add allowReserved variable to mustache for operation parameter
还没有人认领这个 Issue。
- 主要语言
- Java
- 星标
- 26.8k
- 派生
- 7.7k
- PR 合并指标
- PR 指标待抓取
描述
Is your feature request related to a problem? Please describe.
I am working on parameter styling support for the Qt code generator. I came across the problem that the allowReserved variable is missing in the template. I need this variable for the parameter encoding, because they are either percent encoded or not.
Describe the solution you'd like
I would like to be able to retrieve the allowReserved variable in mustache with {{allowReserved}}
Describe alternatives you've considered
There are no alternatives as long is I am aware.
Additional context
I was searching the project and came across the class org.openapitools.codegen.CodegenParamter that is missing the allowReserved variable while the class io.swagger.v3.oas.models.parameters.Parameter contains it.
A solution that might work is to change the AbstractCppCodegen.java on line 335f. and retrieve the variable from the OpenAPI Object and put it in additionalProperties but I am not sure if thats the way to go because I would put it on a global mustache level and not on the parameter of the according operation.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 org.openapitools.codegen.CodegenParamter 开始,并将其与 io.swagger.v3.oas.models.parameters.Parameter 进行比较,然后检查 AbstractCppCodegen.java 第 335 行附近的内容。追踪操作参数值如何到达 Qt mustache template,以及该值是否限定于该参数,而不是全局的 additionalProperties。完成的标准是 Qt templates 可以将 allowReserved 作为 {{allowReserved}} 获取,用于参数编码。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- cpp, java
- 领域
- devtools, tooling
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 38/100