[Bug]: 2.1.48 2xx response written as $ref: '#/components/responses/X' generates void.
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- java
- Lĩnh vực
- api, backend-api-design
Hướng nghiên cứu
Start by locating how swagger-parser resolves $ref values under components/responses and how the resolved response schema reaches generated return types; the payload names no source files or tests. Compare parsing the referenced 202 response with the inline response schema shown in the report. Done means the referenced response retains its typed return value instead of producing void.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
2xx responses written as $ref: '#/components/responses/X' generate void / ApiResponse<Void>.
Affected Version
2.1.48
Steps to Reproduce
responses:
202:
$ref: '#/components/responses/RequestAcceptedResponse'
generates
/**
* Does a thing
* @param thing ID
* @throws ApiException If API call fails
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 202 </td><td> </td><td> - </td></tr>
<tr><td> 0 </td><td> </td><td> - </td></tr>
</table>
*/
public void doAThing(String thingID) throws ApiException {
doAThingWithHttpInfo(thingID);
}
responses:
202:
description: Request accepted. Confirmation of success/failure of request to be sent asynchronously via SNS.
content:
application/json:
schema:
$ref: '#/components/schemas/responseBody'
generates the expected response type.
Expected Behavior
parsing should not cause typed object references to generate void returns in client code
Actual Behavior
typed object references in the swagger schema generate void returns in client code
Environment
- Java version: JDK 17
- Build tool: Gradle 7.x, 8.x
- OS: AmazonLinux2 x86_64
Additional Context
NA
Checklist
- I have searched the existing issues and this is not a duplicate.
I've searched, but don't often work with swagger and don't have full visibility into the build toolchain being run.
If this smells like a duplicate to the maintainers, please feel free to resolve.
- I have provided sufficient information for maintainers to reproduce the issue.
As above, made my best effort in the time available.
- Ngôn ngữ chính
- Java
- Star
- 870
- Fork
- 565
- 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
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc 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.
Issue khác của swagger-api/swagger-parser
-
InlineModelResolver.uniqueName throws StringIndexOutOfBoundsException for titles starting with a separator (camelCaseFlattenNaming)Có thể đã có người làm @arimu1 đã nhận 55 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
swagger-api/swagger-parser#2386 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
swagger-api/swagger-parser#2168 ·
-
ResolveFully fails on internal references when the initial spec is read from a file URLCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
swagger-api/swagger-parser#1922 · 2 bình luận · 1 reaction ·
-
[Bug]: Discriminator mapping of a oneOf nested in array items gets a null key and is no longer updated after external ref resolution (regression since 2.1.36)Có thể đã có người làm @wyhasany đã nhận 10 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
swagger-api/swagger-parser#2406 · 1 bình luận ·
-
[Question]: Guidance on jackson-coreutils vulnerabilities in legacy Swagger compatibility dependencyĐang mởQuestion
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 8/100
swagger-api/swagger-parser#2405 ·
Tất cả issue của swagger-api/swagger-parser
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
checkstyle/checkstyle#22153 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Documentation Needs Triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
frankframework/frankframework#11908 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
ome/ome-codecs#48 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
tonihele/OpenKeeper#672 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
eclipse-ee4j/angus-mail#224 ·