[2.1.0-beta.6 and oas-3.1.0] Request body property data type change is detected as compatible or no_change
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
- 38/100
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện báo cáo với old.yml và new.yml bằng lệnh Docker openapi-diff đã nêu, so sánh kết quả của OpenAPI 3.1.0 với hành vi của 3.0.3. Theo dõi việc so sánh kiểu của schema request-body và thêm phạm vi kiểm thử hồi quy cho các thay đổi string/object và string/integer; hoàn tất khi các thay đổi này được báo cáo là không tương thích.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
- string to object (actual: compatible, expected: incompatible)
- string to integer/integer to string (actual: no_change, expected: incompatible)
Case 1:
old.yml
openapi: 3.1.0
info:
title: Demo API
version: v1
paths:
/endpoint:
post:
requestBody:
content:
application/json:
schema:
type: object
required:
- requiredProp
- requiredToRemoveProp
- dataTypeChangedRequiredProp
- requiredToOptionalProp
properties:
requiredProp:
type: string
optionalProp:
type: string
optionalToRemoveProp:
type: string
requiredToRemoveProp:
type: string
dataTypeChangedRequiredProp:
type: string
dataTypeChangedOptionalProp:
type: string
optionalToRequiredProp:
type: string
requiredToOptionalProp:
type: string
responses:
default:
description: successful operation
content:
application/json:
schema:
type: object
properties:
status:
type: integer
format: int64
example: 201
new.yml
openapi: 3.1.0
info:
title: Demo API
version: v1
paths:
/endpoint:
post:
requestBody:
content:
application/json:
schema:
type: object
required:
- requiredProp
- requiredToRemoveProp
- dataTypeChangedRequiredProp
- requiredToOptionalProp
properties:
requiredProp:
type: string
optionalProp:
type: string
optionalToRemoveProp:
type: string
requiredToRemoveProp:
type: string
dataTypeChangedRequiredProp:
type: object
properties:
id:
type: string
dataTypeChangedOptionalProp:
type: string
optionalToRequiredProp:
type: string
requiredToOptionalProp:
type: string
responses:
default:
description: successful operation
content:
application/json:
schema:
type: object
properties:
status:
type: integer
format: int64
example: 201
Case 2:
old.yml
openapi: 3.1.0
info:
title: Demo API
version: v1
paths:
/endpoint:
post:
requestBody:
content:
application/json:
schema:
type: object
required:
- requiredProp
- requiredToRemoveProp
- dataTypeChangedRequiredProp
- requiredToOptionalProp
properties:
requiredProp:
type: string
optionalProp:
type: string
optionalToRemoveProp:
type: string
requiredToRemoveProp:
type: string
dataTypeChangedRequiredProp:
type: integer
dataTypeChangedOptionalProp:
type: string
optionalToRequiredProp:
type: string
requiredToOptionalProp:
type: string
responses:
default:
description: successful operation
content:
application/json:
schema:
type: object
properties:
status:
type: integer
format: int64
example: 201
new.yml
openapi: 3.1.0
info:
title: Demo API
version: v1
paths:
/endpoint:
post:
requestBody:
content:
application/json:
schema:
type: object
required:
- requiredProp
- requiredToRemoveProp
- dataTypeChangedRequiredProp
- requiredToOptionalProp
properties:
requiredProp:
type: string
optionalProp:
type: string
optionalToRemoveProp:
type: string
requiredToRemoveProp:
type: string
dataTypeChangedRequiredProp:
type: string
dataTypeChangedOptionalProp:
type: string
optionalToRequiredProp:
type: string
requiredToOptionalProp:
type: string
responses:
default:
description: successful operation
content:
application/json:
schema:
type: object
properties:
status:
type: integer
format: int64
example: 201
Examples are having data-type change only for required property but tested the same for optional property giving same output
Command used: docker run --rm -t -v $(pwd):/specs openapitools/openapi-diff:2.1.0-beta.6 /specs/old.yml /specs/new.yml --state
EDIT: The same changes are considered as incompatible with openapi: 3.0.3 and below
- Ngôn ngữ chính
- Java
- Star
- 1.1k
- Fork
- 191
- 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
- Có Dockerfile hoặc 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 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 ·
-
Property `type` change on referenced component schema is silently ignoredCó thể đã có người làm @Inf1mum đã nhận 2 ngày trước. Đang mở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 ·
-
Changes reported in operations but only securityScheme changedCó thể đã có người làm @Inf1mum đã nhận 5 ngày trước. Đang mở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 · 2 bình luận ·
-
[Bug] Backward compatibility check fails on reordered discriminator mappingsCó thể đã có người làm @MoChiUaena đã nhận 47 ngày trước. Đang mở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ự
-
bug emitter:client:csharp
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
microsoft/typespec#12572 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
GCC 15.2: -Wcast-qual warning - cast discards const qualifier from pointer target type (H5trace.c)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] RemotingHelper.connect swaps the socket send and receive buffer configurationCó thể đã có người làm @amalsaidov đã nhận hôm nay. Đang mở
Độ 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
-
needs-area-label
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 2 ngày
-
area/ai area/backend component/zeebe kind/task
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày