cebe / cebe/php-openapi

Allow a more convenient method of working with "x-" specifications

オープン
#121 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
enhancement
主要言語
PHP
スター
500
フォーク
99
PR マージ指標
30日以内にマージされた PR はありません

説明

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.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

まず、issue にリンクされている OpenAPI 拡張仕様と、ライブラリに既存の getSerializableData() の動作を読みます。キーワード属性がどのように公開され、どのように isset() がそれらに対して使われているかを追跡します。呼び出し側が、報告された PHP エラーなしにハイフンを含む拡張名へ簡単にアクセスでき、既存のシリアライズの workaround も引き続き理解されていれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
openapi, php
領域
api
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
30/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。