Missing functions to remove elements ?
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 25/100
Piste de recherche
Commencez par les exemples existants paths->removePath('/path') et operation-unset, puis examinez comment Components::$schemas, x-Webhooks et tags sont représentés. Reproduisez la notification de propriété surchargée et déterminez comment chaque élément peut être supprimé ; le travail est considéré comme terminé lorsque schemas, webhooks et tags peuvent être supprimés sans erreurs.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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
- Langage dominant
- PHP
- Étoiles
- 501
- Forks
- 99
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Préparer son environnement
- Fournit un Dockerfile ou un fichier Docker Compose
- Aucun modèle de pull request
- Aucun guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de cebe/php-openapi
-
Deprecated warnings in PHP 8.2Ouverte
Difficulté 3/5 1-2 jours Accessibilité débutants 48/100
cebe/php-openapi#250 ·
-
BC break in 1.8Ouverte
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 25/100
cebe/php-openapi#247 · 1 commentaire · 1 réaction ·
-
php 8.4 deprecationsOuverte
Difficulté 3/5 1-2 jours Accessibilité débutants 58/100
cebe/php-openapi#245 · 3 commentaires ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 52/100
cebe/php-openapi#242 · 6 commentaires · 1 réaction ·
-
Add support for empty Security Requirement Object (`{}`) in security requirementPeut-être pris @SOHELAHMED7 l’a pris il y a 522 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 55/100
cebe/php-openapi#238 ·
Toutes les issues de cebe/php-openapi
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 66/100
Automattic/blocks-engine#2866 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
community-scripts/ProxmoxVE#17944 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
EasyCorp/EasyAdminBundle#7861 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
Good first issue: add laravel-inertia stack budget preset (Laravel 11 + Inertia.js + PHP 8.3)Ouverteenhancement good first issue help wanted
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
-
backend gamification P0
Difficulté 2/5 1-3 heures Accessibilité débutants 66/100
semanadeinformatica/website#461 ·