Missing functions to remove elements ?
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
Hướng nghiên cứu
Bắt đầu với các ví dụ hiện có về paths->removePath('/path') và operation-unset, sau đó kiểm tra cách Components::$schemas, x-Webhooks và tags được biểu diễn. Tái hiện thông báo về thuộc tính bị nạp chồng và xác định cách xóa từng phần tử; được coi là hoàn tất khi schemas, webhooks và tags có thể được xóa mà không gặp lỗi.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hi,
I've been working on a project that would allow to take a full OAS Definition file and create a stripped down version using only a subset of the original endpoints, tags, webhooks, etc.
I want to remove internal functions based on a "x-internal" attributes.
I also want to create different versions of an api definition based on a "x-presentations" attributes.
So Far, I was able to remove uneeded:
- "paths" using paths->removePath('/path')
- "operations" using unset(pathItem->post)
But now I am struggling to find a way to remove other types of elements.
For example:
- Trying to remove a schema using
unset($openapi->components->schemas['foo']);
Give an error: "PHP Notice: Indirect modification of overloaded property cebe\openapi\spec\Components::$schemas has no effect" - Trying to delete an element from x-Webhooks gives the same kind of error
- Tags doesn't seem to be possible at all since Tag Item are added to an unindexed array...
I am considering forking the project and starting to work on fixes for that but before I do I'd like to know:
1- If I'm doing something wrong and it's already possible to remove object. If so, I would appreciate a pointer.
2- If it's not possible, would you consider to improve the library to include the new functionality ? Or are you considering this as irrelevant to the project ? I'd be willing to help if you do.
If we can find a way to remove elements, I would also implement a function to remove unused elements automatically using a recursive referencing counter algorithm detecting unused elements.
Thanks in advance
- 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
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
OpenConext/OpenConext-engineblock#2122 ·
-
Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Automattic/safe-publish#594 ·