ChangedSchema in a readOnly property for requestBody is not filtered out from the result.
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
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- java
- Lĩnh vực
- api, backend-api-design
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện vấn đề với các ví dụ Old API và New API, tập trung vào kết quả ChangedSchema và ChangedOpenApi đối với thuộc tính bar readOnly trong request body. Theo dõi cách schema Bar đã thay đổi được lọc khỏi các kiểm tra tương thích của request body nhưng vẫn còn trong ChangedSchema; được xem là hoàn tất khi danh sách thay đổi kết quả và đầu ra tương thích không còn báo cáo thay đổi đã được lọc đó.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Old API
{
"openapi":"3.0.0",
"info":{
"title":"API",
"version":"0.1.0"
},
"paths":{
"/resource":{
"post":{
"responses":{
"200":{
"description":"Created resource",
"content":{
"application/json":{
"schema":{
"$ref":"#/components/schemas/CreateResourceResponse"
}
}
}
}
},
"summary":"Create resource",
"requestBody":{
"content":{
"application/json":{
"schema":{
"$ref":"#/components/schemas/CreateResourceRequest"
}
}
},
"description":"Definition of the resource"
}
}
}
},
"components": {
"schemas": {
"CreateResourceResponse": {
"type": "object",
"properties": {
"resources": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"CreateResourceRequest": {
"type": "object",
"properties": {
"foo": {
"$ref": "#/components/schemas/Foo"
}
}
},
"Foo": {
"type": "object",
"properties": {
"bar": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Bar"
},
"readOnly": true
}
}
},
"Bar": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
}
}
}
}
}
New API
{
"openapi":"3.0.0",
"info":{
"title":"API",
"version":"0.1.0"
},
"paths":{
"/resource":{
"post":{
"responses":{
"200":{
"description":"Created resource",
"content":{
"application/json":{
"schema":{
"$ref":"#/components/schemas/CreateResourceResponse"
}
}
}
}
},
"summary":"Create resource",
"requestBody":{
"content":{
"application/json":{
"schema":{
"$ref":"#/components/schemas/CreateResourceRequest"
}
}
},
"description":"Definition of the resource"
}
}
}
},
"components": {
"schemas": {
"CreateResourceResponse": {
"type": "object",
"properties": {
"resources": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"CreateResourceRequest": {
"type": "object",
"properties": {
"foo": {
"$ref": "#/components/schemas/Foo"
}
}
},
"Foo": {
"type": "object",
"properties": {
"bar": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Bar"
},
"readOnly": true
}
}
},
"Bar": {
"type": "object",
"properties": {
"name": {
"type": "integer"
}
}
}
}
}
}
In this example, the property bar in Foo schema is a readOnly property and Foo is referenced by request body of the endpoint.
When Bar schema is changed, it's filtered out from the request body but the change exists in the list of ChangedSchema in ChangedOpenApi, which results incompatible changes but shows nothing.
==========================================================================
== API CHANGE LOG ==
==========================================================================
API
--------------------------------------------------------------------------
-- Result --
--------------------------------------------------------------------------
API changes broke backward compatibility
--------------------------------------------------------------------------
- Ngôn ngữ chính
- Java
- Star
- 1.1k
- Fork
- 190
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
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 OpenAPITools/openapi-diff
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
OpenAPITools/openapi-diff#506 ·
-
good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
OpenAPITools/openapi-diff#364 ·
-
bug OpenAP 3.1.0 Support
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
OpenAPITools/openapi-diff#910 · 1 bình luận ·
-
Render capabilities
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
OpenAPITools/openapi-diff#893 · 1 bình luận ·
-
Breaking/Non-Breaking classification
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
OpenAPITools/openapi-diff#886 ·
Tất cả issue của OpenAPITools/openapi-diff
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
elastic/gradle-plugins#157 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
cryptomator/hub#497 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
johanhaleby/occurrent#1120 ·