Missing functions to remove elements ?
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
Línea de trabajo
Comienza con los ejemplos existentes de paths->removePath('/path') y operation-unset, y luego inspecciona cómo se representan Components::$schemas, x-Webhooks y tags. Reproduce el aviso de propiedad sobrecargada y determina cómo se puede eliminar cada elemento; se considera terminado cuando schemas, webhooks y tags se pueden eliminar sin errores.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- PHP
- Estrellas
- 500
- Forks
- 99
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de cebe/php-openapi
-
Deprecated warnings in PHP 8.2 Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 48/100
cebe/php-openapi#250 ·
-
BC break in 1.8 Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
cebe/php-openapi#247 · 1 comentario · 1 reacción ·
-
php 8.4 deprecations Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 58/100
cebe/php-openapi#245 · 3 comentarios ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 52/100
cebe/php-openapi#242 · 6 comentarios · 1 reacción ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 55/100
cebe/php-openapi#238 ·
Todos los issues de cebe/php-openapi
Issues similares
-
tooling
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
UX
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
ProfessionalWiki/NeoWiki#1525 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
bug customer-reported
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
MagnaCapax/PMSS#949 ·
-
responsive-media kses allow-list strips clipPathUnits, collapsing objectBoundingBox clip paths Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Automattic/static-site-importer#1829 ·