Relative references in $ref are not supported
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
- 38/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- java
- Lĩnh vực
- api, backend-api-design
Hướng nghiên cứu
Bắt đầu với các điểm vào của stack trace trong JsonRef.java, SchemaRepositoryImpl.java và OpenAPIVersion.java, sau đó kiểm tra OpenAPIContract.from và các bài kiểm thử phân giải tham chiếu xung quanh. Nếu có thể, hãy tái hiện lỗi với nhiều tệp OpenAPI và xác minh rằng các giá trị $ref tương đối được phân giải theo đặc tả OpenAPI mà không làm hỏng các tham chiếu nội bộ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Version
4.5.8
Context
Relative references in $ref are not supported (see OpenAPI spec https://spec.openapis.org/oas/latest.html#relative-references-in-uris) while it worked well with previous OpenAPI library.
The following exception is thrown:
java.lang.UnsupportedOperationException: Can't resolve 'the relative reference to a OpenAPI file ', only internal refs are supported.
at io.vertx.json.schema.impl.JsonRef.resolveUri(JsonRef.java:344)
at io.vertx.json.schema.impl.JsonRef.resolve(JsonRef.java:211)
at io.vertx.json.schema.impl.SchemaRepositoryImpl.resolve(SchemaRepositoryImpl.java:243)
at io.vertx.openapi.contract.OpenAPIVersion.lambda$resolve$3(OpenAPIVersion.java:86)
at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$1(ContextImpl.java:191)
at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:279)
at io.vertx.core.impl.ContextImpl.lambda$internalExecuteBlocking$2(ContextImpl.java:210)
at io.vertx.core.impl.TaskQueue.run(TaskQueue.java:76)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:833)
We work with more than one hundred of OpenAPI files. Most of them use relative references to components in other OpenAPI files.
They are provided by a third party.
It would be nice to support relative references from a configuration option.
It would avoid to update OpenAPI files in order to replace relative references by fake absolute ones and to add them by hand as additionalContractFiles in OpenAPIContract.from method.
Do you have a reproducer?
No
- Link to github project/gist
Steps to reproduce
Extra
- Anything that can be relevant such as OS version, JVM version
- Ngôn ngữ chính
- Java
- Star
- 15
- Fork
- 19
- 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
- Không 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 eclipse-vertx/vertx-openapi
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
eclipse-vertx/vertx-openapi#137 · 5 bình luận ·
-
Add OpenAPI 3.2 supportĐang mởenhancement help wanted
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
eclipse-vertx/vertx-openapi#136 · 1 bình luận ·
-
enhancement
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 38/100
eclipse-vertx/vertx-openapi#122 · 4 bình luận ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 48/100
eclipse-vertx/vertx-openapi#117 · 6 bình luận ·
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
eclipse-vertx/vertx-openapi#93 · 1 bình luận ·
Tất cả issue của eclipse-vertx/vertx-openapi
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
521xueweihan/HelloGitHub#4105 ·
-
Awaiting further input from submitter
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
Regression in 5.9.0: CuratorCache fails with ClassCastException when the client is not a CuratorFrameworkBaseCó thể đã có người làm @sftwnd đã 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
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày