array return types get assigned names that contain special characters, breaking tooling
Maintainer thường phản hồi trong vòng 9 ngày
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
- 45/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- java, openapi, spring, spring-boot
- Lĩnh vực
- api, backend-api-design
Hướng nghiên cứu
Start by tracing how springdoc derives OpenAPI schema component names for the shown ResponseEntity<ResponseEnvelope<Foo[]>> return type, then check the related schema naming tests. Reproduce the generated ResponseEnvelopeFoo[] name and determine whether the issue calls for changing that name or adding the suggested configuration and warning. Done means the chosen behavior is covered by a regression test; the issue does not name a file or test.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
this code:
// Foo[] is BAD and breaks our action!
@GetMapping
public ResponseEntity<ResponseEnvelope<Foo[]>> getFoos() {
...
}
gets parsed into this:
"ResponseEnvelopeFoo[]": {
"type": "object",
"properties": {
"status": { "type": "string", "enum": ["OK", "ERROR"] },
"httpCode": { "type": "integer", "format": "int32" },
"data": {
"type": "array",
"items": { "$ref": "#/components/schemas/Foo" }
},
"error": { "$ref": "#/components/schemas/ErrorDetails" }
}
}
which is of course valid json and allowed by the openapi spec, but it did break my tooling and it took me a good hour to figure out what happened.
if you don't consider this a bug and don't want to break backwards compatibility for this i understand, maybe add a configuration option <entityNamesMayContainSpecialCharacters>false</entityNamesMayContainSpecialCharacters> and add a console warning if an entity like this is generated? cheers
- Ngôn ngữ chính
- Java
- Star
- 3.7k
- Fork
- 605
- Merge trung bình
- 9 ngày 11 giờ
- Pull request đã merge (30 ngày)
- 14
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 springdoc/springdoc-openapi
-
Add support for OpenAPI spec 3.2Đang mởenhancement upstream
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
springdoc/springdoc-openapi#3324 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 9 ngày
-
enhancement upstream
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
springdoc/springdoc-openapi#3309 · 4 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 9 ngày
Tất cả issue của springdoc/springdoc-openapi
Issue tương tự
-
hermes-queue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
chrisalunlloyd2-sudo/mindpalace#337 ·
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
ucsb-cs156/proj-frontiers#844 ·
-
Update spring-ldap to 4.0.7Đang mởtype: dependency-upgrade
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 76/100
spring-projects/spring-security#20057 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Spark benchmarks crash with `[INVALID_DRIVER_MEMORY]` on JVMs whose default heap is below Spark's ~450 MB minimumCó thể đã có người làm @sendaoYan đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
moquette-io/moquette#980 ·