[Json-Schema] Nested resources lost externalDoc and description data
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 68/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- php
調査の方向性
Start by reading the change in src/Hydra/JsonSchema/SchemaFactory.ph introduced by #8652, which the report identifies as the source of the regression. Reproduce the example with nested SchemaThing resources and compare the generated JSON OpenAPI output before and after the change. Done means the nested resource retains its documentation and externalDocs data.
索引モデルが issue の本文から書いたものです。
説明
API Platform version(s) affected: 5.0.4
Description
We have some shared api schemas that are linked to schema.org specs, and the generated jsonopenapi spec file contained this information. But after updating to the latest version, we lost these details.
Both the documentation and externalDocs fields are now empty.
screenshots
Before:After:
How to reproduce
#[Get(provider: EntityStateProvider::class, processor: EntityStateProcessor::class)]
class Entity
{
public function __construct(
#[ApiProperty(identifier: true)]
public int $id,
#[ApiProperty(readableLink: true)]
public SchemaThing $thing
)
{
}
}
#[ApiResource(description: "A schema type", types: ['https://schema.org/Thing'], operations: [])]
class SchemaThing
{
#[ApiProperty(description: "The name of the item.", iris: ['https://schema.org/name'])]
public string $name;
#[ApiProperty(description: "An alias for the item.", iris: ['https://schema.org/alternateName'])]
public string $alternateName;
}
Additional Context
If I revert the change in src/Hydra/JsonSchema/SchemaFactory.ph by #8652 the issue is fixed
- 主要言語
- PHP
- スター
- 2.6k
- フォーク
- 989
- 平均マージ
- 2日 1時間
- マージ済み PR(30日)
- 104
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
api-platform/core のほかの issue
-
JSON:API: resource schemas (`*.jsonapi`) have `properties` but no `type: object`対応中かも @ousamabenyounes が 1 日前に担当しました。 オープン
難易度 2/5 1時間未満 初心者へのやさしさ 80/100
api-platform/core#8701 ·
メンテナーはふだん 1 日以内に返信
-
JSON:API: `JsonApiCollectionBaseSchemaNoPagination` declares `data` as `type: array` without `items`オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
api-platform/core#8699 ·
メンテナーはふだん 1 日以内に返信
-
api:openapi:export --spec-version=3.0.0 outputs `webhooks`, which is invalid in OpenAPI 3.0対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
api-platform/core#8690 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
api-platform/core#8680 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
api-platform/core#8725 ·
メンテナーはふだん 1 日以内に返信
api-platform/core の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 92/100
メンテナーはふだん 1 日以内に返信
-
Authentication / Authorization Feature: Volunteer
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
WordPress/mcp-adapter#399 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 80/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
freescout-help-desk/freescout#5750 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信