Allow custom marshalling / unmarshalling of IRIs for admin URLs
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 50/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- react, typescript
調査の方向性
この issue ではファイルやテストが指定されていないため、まず Hydra のデータプロバイダーファクトリと、現在の IRI からレコード ID への変換および管理 URL の構築を追跡します。完了条件は、ファクトリが提案された正規化フックと URL 解決フックを受け付け、より短い /greetings/1/show ルートを生成しながら、引き続きアイテムを取得できることです。
索引モデルが issue の本文から書いたものです。
説明
Description
Currently the client URLs get constructed from full IRIs which works, but it's kind of ugly.
It would be nice if the Hydra data provider allowed the user to marshall / unmarshall the IRI into a "nice" ID for the routing. It would mean the admin URL is not
https://localhost/admin#/greetings/%2Fgreetings%2F1/show
or
https://localhost/admin/greetings/%2Fgreetings%2F1/show
but could be:
https://localhost/admin/greetings/1/show
Example
// What the PR would add to the factory options:
dataProviderFactory({
entrypoint: '/api',
mercure: false,
// New: transform @id before it becomes record.id
normalizeId: (iri: string) => iri.split('/').pop(),
// New: reconstruct fetch URL from the normalized id
resolveItemUrl: (resource, id, entrypointUrl) =>
new URL(`${entrypointUrl}/${resource}/${id}`),
})
Rough idea and not great naming, but something like that would be nice.
- 主要言語
- TypeScript
- スター
- 516
- フォーク
- 134
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
api-platform/admin のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
api-platform/admin#616 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 64/100
api-platform/admin#660 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
api-platform/admin#631 · コメント 6 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
api-platform/admin#626 · コメント 1 件 · リアクション 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
api-platform/admin#615 · コメント 4 件 · リアクション 2 件 ·
api-platform/admin の issue をすべて見る
似ている issue
-
VerificationGate: ATTRIBUTION quote guard never matches a normal quotation (\b around the quote) オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
danielmiessler/LifeOS#2234 ·
-
T: Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
-
Mend: dependency security vulnerability untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100