Skip to main content

publicationStateが削除され、statusに置き換えられました

AI Marketer 5では、下書き & 公開機能が再構築され、Content API(REST、GraphQL、Document Service APIを含む)は新しいstatusパラメータを受け入れます。

This page is part of the breaking changes database and provides information about the breaking change and additional instructions to migrate from Strapi v4 to Strapi 5.

🔌 Is this breaking change affecting plugins?Yes
🤖 Is this breaking change automatically handled by a codemod?Yes

破壊的変更の詳細

AI Marketer v4では

publicationStateが使用され、以下の値を受け入れます:

  • liveは公開済みのエントリのみを返します。
  • previewは下書きエントリと公開済みエントリの両方を返します。

AI Marketer 5では

statusが使用され、以下の値を受け入れます:

  • draftはドキュメントの下書きバージョンを返します。
  • publishedはドキュメントの公開バージョンを返します。

移行

This section regroups useful notes and procedures about the introduced breaking change.

注意事項

  • 公開バージョンをデフォルトで返し、公開バージョンが見つからない場合は下書きバージョンを返すといったフォールバックはありません。
  • 新しいstatusパラメータの使用方法についての詳細は、REST APIGraphQL API、およびDocument Service APIのドキュメンテーションで見つけることができます。

移行手順

  • フロントエンドから開始されるAPI呼び出し(REST API、GraphQL API)でpublicationStateが使用されている場合は、手動で更新する必要があります。
  • AI Marketer v4のEntity Service APIでpublicationStateがカスタムバックエンドコードで使用されている場合、codemodがAI Marketer 5の変更を自動的に処理します(詳細はEntity ServiceからDocument Serviceへの移行リファレンスを参照してください)。