Missing functions to remove elements ?
まだ誰も着手していません。
評価
調査の方向性
既存の paths->removePath('/path') と operation-unset の例から始め、その後、Components::$schemas、x-Webhooks、tags がどのように表現されているかを確認します。オーバーロードされたプロパティの通知を再現し、各要素を削除する方法を特定します。schemas、webhooks、tags をエラーなしで削除できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- PHP
- スター
- 500
- フォーク
- 99
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
cebe/php-openapi のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
cebe/php-openapi#250 ·
-
BC break in 1.8 オープン
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
cebe/php-openapi#247 · コメント 1 件 · リアクション 1 件 ·
-
php 8.4 deprecations オープン
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
cebe/php-openapi#245 · コメント 3 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
cebe/php-openapi#242 · コメント 6 件 · リアクション 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 55/100
cebe/php-openapi#238 ·
cebe/php-openapi の issue をすべて見る
似ている issue
-
needs-triage Platform(Default)
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
-
bug No Code Attached Yet
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
joomla/joomla-cms#48501 ·
-
sync-en
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
sync-en
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
-
Перевод устарел
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100