Allow a more convenient method of working with "x-" specifications
- Lenguaje dominante
- PHP
- Estrellas
- 500
- Forks
- 99
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
First Point: Excellent project. I've written an OpenApi loader myself. Yours is much better.
Second Point: The openapi specification of keywords allows for the possibility of extending them with the "x-" syntax: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions
In a project I am working on we have made use of this feature. When using cebe/php-openapi I've run into a problem.
* openapi requires the use of the "x-" syntax
* php interprets "x-" not as a variable (or something similar) but sees the "-" as an operation. Particularly with the function isset()
* cebe/php-openapi relies on the native php convention variable/(class attribute names)
* When using isset() to determine if a keyword has been specified PHP reports an error. I have been able to work around this problem by using getSerializableData(). However it would be nice and more convenient if one could access openapi variables (keywords) which use a "-" as part of their name.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Comienza leyendo la especificación de extensiones de OpenAPI enlazada en el issue y el comportamiento existente de getSerializableData() de la biblioteca. Rastrea cómo se exponen los atributos de las palabras clave y cómo se utiliza isset() para ellos. Se considera terminado cuando los llamadores pueden acceder cómodamente a nombres de extensiones que contienen guiones sin producir el error de PHP indicado, y el workaround de serialización existente sigue entendiéndose.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- openapi, php
- Área
- api
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 30/100