CLI call to openapi-spec with security in path fails
まだ誰も着手していません。
評価
調査の方向性
src/spec/SecurityRequirements.php の64行目付近から始め、issue にある最小の example.spec.json を php-openapi の validate CLI コマンドで使用して失敗を再現します。セキュリティ要件がどのように変換されるかを追跡し、次に言及されているテストケースを追加して、セキュリティエントリが正しく表現された状態でバリデーションが成功することを確認します。
索引モデルが issue の本文から書いたものです。
説明
Type: Bug
Since: 1.8.0
Description:
The CLI call php-openapi validate example.spec.json fails due to the fact that the security in path is transformed to a list of arrays and not a list of objects in https://github.com/cebe/php-openapi/blob/893ab104be1f5dfe5a39766703f583584e43c6e1/src/spec/SecurityRequirements.php#L64
Minimal example.spec.json to reproduce:
{
"openapi": "3.0.0",
"info": {
"title": "My API",
"version": "1, 2"
},
"paths": {
"/v1/users/profile": {
"get": {
"operationId": "V1GetUserProfile",
"summary": "Returns the user profile",
"responses": {
"200": {
"description": "dummy"
}
},
"security": [
{
"test_test": ["test:scope:foo"]
}
]
}
}
},
"components": {
"securitySchemes": {
"test_test": {
"type": "oauth2",
"flows": {
"authorizationCode": {
"authorizationUrl": "https://example.com/openid-connect/auth",
"tokenUrl": "https://example.com/openid-connect/token",
"scopes": {
"test:scope:foo": "test_scope"
}
}
}
}
}
}
}
I'll provide a MR with test case and a fix if you like.
- 主要言語
- PHP
- スター
- 500
- フォーク
- 99
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
cebe/php-openapi のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
cebe/php-openapi#250 ·
-
BC break in 1.8 オープン
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
cebe/php-openapi#247 · コメント 1 件 · リアクション 1 件 ·
-
php 8.4 deprecations オープン
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
cebe/php-openapi#245 · コメント 3 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 55/100
cebe/php-openapi#238 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
cebe/php-openapi#236 ·
cebe/php-openapi の issue をすべて見る
似ている issue
-
sync-en
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
sync-en
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
-
Перевод устарел
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
bug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
az-digital/az_quickstart#6047 ·
-
bug needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100