Document the atomic component move (POST {component}/move)
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
- issue の種類
- ドキュメント
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
調査の方向性
content/4.api/にあるコンポーネントの位置とページデータに関する既存のドキュメントを読み、そのエンドポイントと並べてPOST {component IRI}/moveをドキュメント化してください。リクエストのバリエーション、アトミックな移動動作、レスポンス、検証エラーと認可エラー、issueで説明されているドラフトの扱いを記述してください。エンドポイントと例で、コンポーネントの移動や並べ替えの方法と、結果の状態を再読み込みする方法が説明されていれば完了です。
索引モデルが issue の本文から書いたものです。
説明
The API bundle now has an atomic component move (components-web-app/api-components-bundle#526, PR components-web-app/api-components-bundle#533), which the Nuxt module will use (cwa-nuxt-module #415). Please document it in content/4.api/ (component positions / page data):
Endpoint: POST {component IRI}/move (e.g. /component/html_contents/{id}/move, under the route import prefix), application/ld+json, available on every component resource like {component IRI}/usage.
Body:
{ "from": { "componentPosition": "<iri>" } | { "pageData": "<iri>", "property": "<name>" },
"to": { "componentGroup": "<iri>", "after": "<position iri>"?, "before": "<position iri>"? } | { "pageData": "<iri>", "property": "<name>" } }
What happens (one request, one database flush, so a component is never left in two places or deleted by a dropped connection):
- position → group: the same position is moved (its IRI is kept) and placed by
after/before, or at the end, exactly asPATCH <position> {componentGroup, after|before}; within the same group it is a reorder. - position → page data property: the property is set and the position removed; the component is not deleted even if that was its only use.
- page data property → group: a new static position is created and placed; the property is nulled.
- property → property: one is set and the other nulled, across two page data resources too. Dynamic (
pageDataProperty) positions are never changed.
Response: 200 with componentPosition (the moved or created position's IRI, null for a property target) and from/to echoed. Re-read the groups' /order and the page data for the new state.
Errors: 422 with violations at from, to, from.componentPosition, from.pageData, from.property, to.componentGroup, to.after, to.before, to.pageData, to.property: the same checks as the separate writes (allowedComponents, maxComponents, explicitAllowOnly, a component placed inside itself, anchors in the target group, the property's component class), plus the target being the source property, a dynamic or empty source position, an empty source property, a from that does not hold the component (a draft and its published component count as one), and a target property that already holds a component (refused rather than replaced). 403 when the caller is not granted one of the underlying writes (the position write and each page data PATCH, e.g. routable_security on unreachable page data); 401 for anonymous callers.
Drafts: moving by a draft's IRI moves the published component, and the published component is what is stored.
- 主要言語
- TypeScript
- スター
- 0
- フォーク
- 0
- 平均マージ
- 1時間 20分
- マージ済み PR(30日)
- 1
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
components-web-app/docs のほかの issue
-
Browser Tests page: the template's tests no longer use the sample content (components-web-app#177)オープン
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
components-web-app/docs#267 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
components-web-app/docs#266 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
components-web-app/docs#265 · コメント 1 件 ·
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
components-web-app/docs#263 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
components-web-app/docs#262 ·
components-web-app/docs の issue をすべて見る
似ている issue
-
docs(api): openapi.yaml still documents gif-tools optimize colors as 2-256 instead of 2, 4, 16, 256オープンarea: backend documentation priority: low
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
snapotter-hq/SnapOtter#2919 ·
メンテナーはふだん 1 日以内に返信
-
accepted :+1: bug db/redis
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
beekeeper-studio/beekeeper-studio#4882 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
ready-for-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
konflux-ci/konflux-ui#1630 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
ahmedkhaleel2004/gitdiagram#233 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
simkimsia/netlify-axi#19 ·
メンテナーはふだん 1 日以内に返信