Octri

docs endpoints

次回の公開前に追加または削除対象としてマークされたエンドポイントの下書きを一覧表示します。これらは、API Studioで Add endpoint を実行したときに作成されるものと同じです。publishを実行するまでは、仕様書に変更は加えられません。実行すると、すべての下書きが新しいバージョンとして仕様書に書き込まれます。それまでは、閲覧者、SDK、MCPツールには何も表示されません。エンドポイントをご覧ください。

bash
octri docs endpoints [list | add | edit | remove | discard | publish]

octri docs endpoints add <METHOD> <path> --summary <text>

新しいエンドポイントの下書きを作成します。

引数

<METHOD>string必須

GET、POSTなど。大文字と小文字は区別されません。

<path>string必須

OpenAPIパス。例:/customers/{id}。

フラグ

--summary <text>string必須

エンドポイントの1行の要約。

--description <text>string

より詳細な説明。

octri docs endpoints edit <draftId>

下書きの要約または説明を変更します。

引数

<draftId>string必須

一覧から選択した下書き。

フラグ

--summary <text>string

新しい要約。

--description <text>string

新しい説明。

octri docs endpoints remove <METHOD> <path>

仕様書にあるエンドポイントを、次回の公開時に削除するようマークします。

引数

<METHOD>string必須

エンドポイントのメソッド。

<path>string必須

そのパス。

octri docs endpoints discard <draftId>

下書きを公開せずに破棄します。

引数

<draftId>string必須

下書き。

octri docs endpoints publish

すべての下書きを新しいバージョンとして仕様書に書き込み、そのバージョンによって開始されるパイプラインに続きます。仕様書がすでに下書きと一致している場合は、何も公開されません。

フラグ

--commit-to-githubbooleanデフォルト:the project's docs setting

新しい仕様書を接続先のリポジトリにコミットします。--no-commit-to-githubはコミットしません。

例

エンドポイントの下書きを作成

bash
octri docs endpoints add GET /customers/{id}/notes --summary "List a customer's notes"
Output
✔ Drafting GET /customers/{id}/notes
✔ Drafted GET /customers/{id}/notes 6aedf5d4f8a05765fb1944e7
  octri docs endpoints publish: write the drafts into the spec

下書きを一覧表示

bash
octri docs endpoints
Output
✔ Loading draft endpoints

Draft endpoints (1)
  CHANGE  ENDPOINT                   SUMMARY                  UPDATED  ID
  ──────  ─────────────────────────  ───────────────────────  ───────  ────────────────────────
  add     GET /customers/{id}/notes  List a customer's notes  0s ago   6aedf5d4f8a05765fb1944e7
  octri docs endpoints publish: write the drafts into the spec
  • octri specs status:1つの仕様書の解析ステータスと、その後に実行されるパイプライン内のすべてのジョブを表示します。
  • octri github connect:プロジェクトが参照する仕様書ファイルをGitHubリポジトリ内で指定します。