Allow a more convenient method of working with "x-" specifications
- Langage dominant
- PHP
- Étoiles
- 500
- Forks
- 99
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
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.
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Commencez par lire la spécification des extensions OpenAPI liée dans l’issue ainsi que le comportement existant de getSerializableData() de la bibliothèque. Suivez la manière dont les attributs de mots-clés sont exposés et dont isset() est utilisé pour ceux-ci. Le travail est considéré comme terminé lorsque les appelants peuvent accéder facilement aux noms d’extensions contenant des tirets sans obtenir l’erreur PHP signalée, tout en comprenant toujours le workaround de sérialisation existant.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- openapi, php
- Domaine
- api
- Type d'issue
- Fonctionnalité
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 30/100