Correct handling of `style` and `explode`.
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- typescript
- Lĩnh vực
- tooling
Hướng nghiên cứu
Start by locating the query-parameter generation entry point and its handling of OpenAPI parameter style and explode defaults. Compare the generated TypeScript with the OpenAPI 3.0 Parameter Object rules, then add or update tests so the intended output for form-style query parameters is explicit and covered.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
OpenAPI spec:
targets:
get:
tags:
- targets
operationId: getProductTargets
parameters:
- name: searchParameters
description: "Some description"
in: query
required: true
schema:
$ref: "..ProductTargetsSearch"
responses:
200:
description: "Some description"
content:
application/json:
schema:
$ref: "..GetProductTargetsResponse"
400:
description: "Some description"
content:
application/json:
schema:
$ref: "..ErrorDto"
500:
description: "Ошибка на сервере"
content:
application/json:
schema:
$ref: "..ErrorDto"
Generator emits type for queryParams:
export type GetProductTargetsQueryParams = {
/**
* Some description
*/
searchParameters: Schemas.ProductTargetsSearch;
};
But by spec https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.0.md#parameter-object
parameter in: query has default value of style - form. So explode default value is true for form style. Spec says:
When this is true, parameter values of type array or object generate separate parameters for each value of the array or key-value pair of the map
Should generator emit queryParam type with spreaded params? if no, why?
- Ngôn ngữ chính
- TypeScript
- Star
- 635
- Fork
- 82
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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.
Issue khác của fabien0102/openapi-codegen
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
fabien0102/openapi-codegen#343 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
fabien0102/openapi-codegen#342 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
fabien0102/openapi-codegen#356 ·
-
update dependencies & removed unused deprecatedCó thể đã có người làm @el-j đã nhận 14 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
fabien0102/openapi-codegen#354 ·
-
deepMerge mutates its arguments, corrupting request payloads across callsCó thể đã có người làm @richard-willis-chevin đã nhận 58 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
fabien0102/openapi-codegen#349 ·
Tất cả issue của fabien0102/openapi-codegen
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
paperclipai/paperclip#17151 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
AgoraIO-Extensions/agent-infra#3159 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
blocklist addition
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 66/100
MetaMask/eth-phishing-detect#304596 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
friction
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
kentcdodds/kody#4142 ·
-
[Bug] Statistics | Task statistics are always empty on MikroORM with MySQL or SQLiteCó thể đã có người làm @NdekoCode đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
ever-co/ever-gauzy#11214 ·
Maintainer thường phản hồi trong vòng 1 ngày