OpenAPITools / OpenAPITools/openapi-generator

[REQ][Qt] Add allowReserved variable to mustache for operation parameter

オープン
#8,564 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

Enhancement: Feature
主要言語
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.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

org.openapitools.codegen.CodegenParamter から始め、io.swagger.v3.oas.models.parameters.Parameter と比較してから、AbstractCppCodegen.java の335行目付近を調べます。operation-parameter の値が Qt mustache template に到達する経路と、その値がグローバルな additionalProperties ではなくそのパラメーターにスコープされているかを追跡します。Qt templates がパラメーターのエンコーディング用に allowReserved を {{allowReserved}} として取得できれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
cpp, java
領域
devtools, tooling
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
38/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。