Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#121 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

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

調査の方向性

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

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

説明

enhancement

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.
主要言語
PHP
スター
500
フォーク
99
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトの環境構築ファイルはまだ確認していません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

cebe/php-openapi のほかの issue

cebe/php-openapi の issue をすべて見る

似ている issue

PHP の issue をもっと見る

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

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