[RFC] Handle OpenAPI 3.1 BC Breaks
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- openapi, php
- Lĩnh vực
- api, backend-api-design
Hướng nghiên cứu
Bắt đầu bằng cách đọc các tệp đặc tả OpenAPI 3.0 hiện có và các thay đổi trong pull request 128, sau đó so sánh chúng với các breaking changes của OpenAPI 3.1 được liệt kê và các release notes được liên kết. RFC này chỉ hoàn tất sau khi các maintainer chọn và ghi lại một phương án để biểu diễn 3.1 mà không làm hỏng phần hỗ trợ 3.0 đã hoàn thành.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
It's nice to see the work for the OpenAPI 3.1 standard. I think a big part are the deprecated fields or type changes like:
- The nullable keyword has been removed from the Schema Object (null can be used as a type value).
- the type can be now an array with the type and
null - exclusiveMaximum and exclusiveMinimum cannot accept boolean values (following JSON Schema).
- See more at Stoplight Blog and OpenAPI Release Notes
How would you like to handle these breaking changes?
My first idea was to duplicate the spec files into a 3.0 and 3.1 Folder and use them according to the given OpenAPI version.
The positive parts are that static code analysis or the IDE knows which type of Object is used and the user don't have to handle multiple types. For example the type as string in OpenAPi 3.0 and type as array in OpenAPI 3.1 with null item. Also the spec could be validated and it's not necessary to add version switches for fields that are required or not.
The second Idea is to "convert" the Structure into the existing Spec Files. So a type with two items in OpenAPI would be an oneOf or if the type includes null the nullable flag would be added. But then you need to convert the items back to the new structure if you want to write a OpenAPI 3.1 file. The other part is, that you then support a converter from OpenAPI 3.0 to OpenAPI 3.1 and i don't think this is a feature to maintain in this library.
The last solution is to try to handle both versions into a single file. But that could be hard because of the breaking changes in OpenAPI 3.1. Even OpenAPI 3.1 didn't make a release without breaking changes. It could be complex to handle it here.
My preferred solution is version one because of the strict types and the clear break between Version 3.0 and 3.1
The Version and Specs for Version 3.0 are already feature complete and all changes effects only the new Spec files and couldn't break anything.
I look forward to your opinion. Maybe this should be clear before we make more changes into https://github.com/cebe/php-openapi/pull/128 ?
- Ngôn ngữ chính
- PHP
- Star
- 500
- Fork
- 99
- 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
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
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 cebe/php-openapi
-
Deprecated warnings in PHP 8.2 Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
cebe/php-openapi#250 ·
-
BC break in 1.8 Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
cebe/php-openapi#247 · 1 bình luận · 1 reaction ·
-
php 8.4 deprecations Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
cebe/php-openapi#245 · 3 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
cebe/php-openapi#242 · 6 bình luận · 1 reaction ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 55/100
cebe/php-openapi#238 ·
Tất cả issue của cebe/php-openapi
Issue tương tự
-
tooling
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
UX
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
ProfessionalWiki/NeoWiki#1525 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
bug customer-reported
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
MagnaCapax/PMSS#949 ·
-
responsive-media kses allow-list strips clipPathUnits, collapsing objectBoundingBox clip paths Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Automattic/static-site-importer#1829 ·