OpenAPITools / OpenAPITools/openapi-generator

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

Abierto
#8,564 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Enhancement: Feature
Lenguaje dominante
Java
Estrellas
26.8k
Forks
7.7k
Métricas de merge de PR
Métricas de PR pendientes

Descripción

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.

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza con org.openapitools.codegen.CodegenParamter y compáralo con io.swagger.v3.oas.models.parameters.Parameter; después, inspecciona AbstractCppCodegen.java alrededor de la línea 335. Sigue cómo los valores de los parámetros de operación llegan a la Qt mustache template y si el valor está asociado a ese parámetro en lugar de ser una propiedad global de additionalProperties. Se considera completado cuando las Qt templates pueden recuperar allowReserved como {{allowReserved}} para la codificación de parámetros.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
cpp, java
Área
devtools, tooling
Tipo de issue
Nueva funcionalidad
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
38/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.