Missing functions to remove elements ?
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
Direzione di ricerca
Inizia con gli esempi esistenti paths->removePath('/path') e operation-unset, quindi esamina come sono rappresentati Components::$schemas, x-Webhooks e tags. Riproduci la notifica relativa alla proprietà sovraccaricata e determina come può essere rimosso ciascun elemento; il lavoro è completato quando schemas, webhooks e tags possono essere rimossi senza errori.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- PHP
- Stelle
- 500
- Fork
- 99
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di cebe/php-openapi
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
cebe/php-openapi#250 ·
-
BC break in 1.8 Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
cebe/php-openapi#247 · 1 commento · 1 reazione ·
-
php 8.4 deprecations Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 58/100
cebe/php-openapi#245 · 3 commenti ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
cebe/php-openapi#242 · 6 commenti · 1 reazione ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 55/100
cebe/php-openapi#238 ·
Tutte le issue di cebe/php-openapi
Issue simili
-
tooling
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
UX
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
ProfessionalWiki/NeoWiki#1525 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
bug customer-reported
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
MagnaCapax/PMSS#949 ·
-
responsive-media kses allow-list strips clipPathUnits, collapsing objectBoundingBox clip paths Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
Automattic/static-site-importer#1829 ·