[Question] [Bug]: Inconsistent Relative Reference Resolution in Nested Schema Contexts
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
Hướng nghiên cứu
Bắt đầu với ngữ cảnh tái hiện trong OpenAPITools/openapi-generator#21492 và kiểm tra cách parentDirectory được xử lý khi phân giải các giá trị $ref tương đối thông qua các schema additionalProperties lồng nhau. Xác minh hành vi theo quy tắc tương đối theo tệp của OpenAPI 3.0, bao gồm cả các tham chiếu path-file và schema-file; được xem là hoàn tất khi các tham chiếu lồng nhau được phân giải nhất quán mà không xảy ra lỗi build.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Question
There seems to be a bug when resolving nested schemas.
OpenAPI Generator incorrectly resolves relative $ref paths in schema files when they are referenced through nested contexts (like additionalProperties). The reference resolution context switches from file-relative to root-relative depending on the nesting level, causing build failures when using standard file-relative references.
This creates inconsistent behavior where:
References from path files work correctly using file-relative paths (../components/schemas/...)
References from schema files fail when using file-relative paths (NestedData.yaml)
This violates the OpenAPI 3.0 specification where all relative references should be resolved from the containing file's location.
Any ideas? parentDirectory seems to be resolved wrongly in this case?
Affected Version
Latest
Context
This issue first reported here: https://github.com/OpenAPITools/openapi-generator/issues/21492 (the project uses this library)
# Example OpenAPI or Swagger definition (optional)
Additional Details
Checklist
- I have searched the existing issues and documentation before asking.
- I have provided enough information for others to understand my question.
- Ngôn ngữ chính
- Java
- Star
- 868
- Fork
- 560
- 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 41 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]: `ResolverFully` does not process OAS 3.1 combinators and skips nested OAS 3.1 schema-valued keywordsCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởBug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
swagger-api/swagger-parser#2403 ·
-
[Bug]: Regression: resolveFully fails when components key does not match external file basenameCó thể đã có người làm @goutamadwant đã nhận 35 ngày trước. Đang mởBug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 58/100
swagger-api/swagger-parser#2399 · 3 bình luận ·
Tất cả issue của swagger-api/swagger-parser
Issue tương tự
-
[i18n] 安装实例完成后的成功提示未正确本地化Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
PCL-Community/PCL-CE#3658 ·
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 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Team/Identity Server Core Type/Improvement U2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
wso2/product-is#28553 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Feature]: Page CreationĐang mởfrontend
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
Paul-Austin-Oswego-CSC480-HCI521/gift-app#116 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
dependencies java
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 62/100
micrometer-metrics/tracing#1588 ·
Maintainer thường phản hồi trong vòng 1 ngày