OpenAPITools / OpenAPITools/openapi-generator

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

Aperta
#8,564 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Enhancement: Feature
Lingua principale
Java
Stelle
26.8k
Fork
7.7k
Metriche di merge delle PR
Metriche PR in attesa

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia con org.openapitools.codegen.CodegenParamter e confrontalo con io.swagger.v3.oas.models.parameters.Parameter, quindi esamina AbstractCppCodegen.java intorno alla riga 335. Traccia il percorso con cui i valori dei parametri dell’operazione raggiungono il Qt mustache template e verifica se il valore è circoscritto a quel parametro invece di essere globale in additionalProperties. Il lavoro è completato quando i Qt templates possono recuperare allowReserved come {{allowReserved}} per la codifica dei parametri.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
cpp, java
Ambito
devtools, tooling
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
38/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.