OpenAPITools / OpenAPITools/openapi-generator
[REQ][Qt] Add allowReserved variable to mustache for operation parameter
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Java
- Star
- 26.8k
- Fork
- 7.7k
- Chỉ số merge pull request
- Chỉ số pull request đang chờ
Mô tả
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.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với org.openapitools.codegen.CodegenParamter và so sánh nó với io.swagger.v3.oas.models.parameters.Parameter, sau đó kiểm tra AbstractCppCodegen.java quanh dòng 335. Theo dõi cách các giá trị của tham số thao tác đi tới Qt mustache template và liệu giá trị đó có được giới hạn trong tham số đó thay vì là toàn cục trong additionalProperties hay không. Hoàn thành khi Qt templates có thể lấy allowReserved dưới dạng {{allowReserved}} để mã hóa tham số.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- cpp, java
- Lĩnh vực
- devtools, tooling
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 38/100