From ea3723886ceab2926c2688558524a4747596d62d Mon Sep 17 00:00:00 2001 From: Amon Sawamura Date: Thu, 8 Jan 2026 00:28:47 +0900 Subject: [PATCH 1/5] docs(schema): add usage section to README MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add JSON Schema usage example and supported field types table to help users understand how to use the package. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- packages/microcms-api-schema-schema/README.md | 59 ++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) diff --git a/packages/microcms-api-schema-schema/README.md b/packages/microcms-api-schema-schema/README.md index 0842789..ebf6872 100644 --- a/packages/microcms-api-schema-schema/README.md +++ b/packages/microcms-api-schema-schema/README.md @@ -9,9 +9,66 @@ microCMS の API スキーマを定義するためのスキーマライブラリ ## インストール ```bash -pnpm add microcms-api-schema-schema +pnpm add @plainbrew/microcms-api-schema-schema ``` +## 使い方 + +### JSON Schema としての利用 + +`$schema` プロパティで JSON Schema を参照することで、エディタの補完やバリデーションを有効にできます。 + +```json +{ + "$schema": "./node_modules/@plainbrew/microcms-api-schema-schema/schema.json", + "apiFields": [ + { + "fieldId": "title", + "name": "タイトル", + "kind": "text", + "required": true + }, + { + "fieldId": "body", + "name": "本文", + "kind": "richEditorV2", + "required": false + }, + { + "fieldId": "thumbnail", + "name": "サムネイル", + "kind": "media", + "required": true, + "imageSizeValidation": { + "imageSize": { + "width": 1200, + "height": 630 + } + } + } + ], + "customFields": [] +} +``` + +### サポートされるフィールドタイプ + +| kind | 説明 | +| -------------- | ------------------------ | +| `text` | テキストフィールド | +| `textArea` | テキストエリア | +| `richEditor` | リッチエディタ(従来版) | +| `richEditorV2` | リッチエディタ(V2) | +| `media` | 画像 | +| `mediaList` | 画像リスト | +| `date` | 日付 | +| `boolean` | ブーリアン | +| `select` | セレクトフィールド | +| `number` | 数値 | +| `relation` | コンテンツ参照 | +| `relationList` | 複数コンテンツ参照 | +| `iframe` | 拡張フィールド | + ## 開発 ```bash From 68f43f68cc99488f1f108385d62c42c5caaff3e4 Mon Sep 17 00:00:00 2001 From: Amon Sawamura Date: Thu, 8 Jan 2026 00:30:09 +0900 Subject: [PATCH 2/5] docs(schema): fix field type descriptions to match source code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update field type descriptions based on comments in schema.ts 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- packages/microcms-api-schema-schema/README.md | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/packages/microcms-api-schema-schema/README.md b/packages/microcms-api-schema-schema/README.md index ebf6872..67ff4ab 100644 --- a/packages/microcms-api-schema-schema/README.md +++ b/packages/microcms-api-schema-schema/README.md @@ -53,21 +53,21 @@ pnpm add @plainbrew/microcms-api-schema-schema ### サポートされるフィールドタイプ -| kind | 説明 | -| -------------- | ------------------------ | -| `text` | テキストフィールド | -| `textArea` | テキストエリア | -| `richEditor` | リッチエディタ(従来版) | -| `richEditorV2` | リッチエディタ(V2) | -| `media` | 画像 | -| `mediaList` | 画像リスト | -| `date` | 日付 | -| `boolean` | ブーリアン | -| `select` | セレクトフィールド | -| `number` | 数値 | -| `relation` | コンテンツ参照 | -| `relationList` | 複数コンテンツ参照 | -| `iframe` | 拡張フィールド | +| kind | 説明 | +| -------------- | ------------------ | +| `text` | テキストフィールド | +| `textArea` | テキストエリア | +| `richEditorV2` | リッチエディタ | +| `richEditor` | 旧リッチエディタ | +| `media` | 画像 | +| `mediaList` | 複数画像 | +| `date` | 日時 | +| `boolean` | 真偽値 | +| `select` | セレクトフィールド | +| `number` | 数字 | +| `relation` | コンテンツ参照 | +| `relationList` | 複数コンテンツ参照 | +| `iframe` | 拡張フィールド | ## 開発 From 29931c44f69d0650d9aea222c29d04f0b0b5e70d Mon Sep 17 00:00:00 2001 From: Amon Sawamura Date: Thu, 8 Jan 2026 00:30:50 +0900 Subject: [PATCH 3/5] docs(schema): add npm command and -D flag for install MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- packages/microcms-api-schema-schema/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/microcms-api-schema-schema/README.md b/packages/microcms-api-schema-schema/README.md index 67ff4ab..8f21aed 100644 --- a/packages/microcms-api-schema-schema/README.md +++ b/packages/microcms-api-schema-schema/README.md @@ -9,7 +9,8 @@ microCMS の API スキーマを定義するためのスキーマライブラリ ## インストール ```bash -pnpm add @plainbrew/microcms-api-schema-schema +npm add -D @plainbrew/microcms-api-schema-schema +pnpm add -D @plainbrew/microcms-api-schema-schema ``` ## 使い方 From 8de363f50c9a67113e517869676e128ee03e4674 Mon Sep 17 00:00:00 2001 From: Amon Sawamura Date: Thu, 8 Jan 2026 00:31:54 +0900 Subject: [PATCH 4/5] docs(schema): fix npm command from add to install MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- packages/microcms-api-schema-schema/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/microcms-api-schema-schema/README.md b/packages/microcms-api-schema-schema/README.md index 8f21aed..fc14e4b 100644 --- a/packages/microcms-api-schema-schema/README.md +++ b/packages/microcms-api-schema-schema/README.md @@ -9,7 +9,7 @@ microCMS の API スキーマを定義するためのスキーマライブラリ ## インストール ```bash -npm add -D @plainbrew/microcms-api-schema-schema +npm install -D @plainbrew/microcms-api-schema-schema pnpm add -D @plainbrew/microcms-api-schema-schema ``` From dc0f15d87858e7c35e650468ef33849473668c54 Mon Sep 17 00:00:00 2001 From: Amon Sawamura Date: Thu, 8 Jan 2026 00:34:07 +0900 Subject: [PATCH 5/5] v0.0.1 --- packages/microcms-api-schema-schema/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/microcms-api-schema-schema/package.json b/packages/microcms-api-schema-schema/package.json index 103c397..49bd5bd 100644 --- a/packages/microcms-api-schema-schema/package.json +++ b/packages/microcms-api-schema-schema/package.json @@ -1,6 +1,6 @@ { "name": "@plainbrew/microcms-api-schema-schema", - "version": "0.0.1-alpha.0", + "version": "0.0.1", "description": "", "license": "MIT", "files": [