# Schema 查看

> 用 shoplazza schema 自省 Shoplazza CLI：列出主题、深入某条命令、直接在终端查看它接受的参数。

通过 Schema 自省探索可用的 API、命令及其参数。

```shell
shoplazza schema [路径] [参数]
```

| 参数 | 类型 | 说明 |
|------|------|------|
| `--view <部分>` | string | 过滤输出：`all`、`request` 或 `response`（默认：`all`） |
| `--jq, -q <表达式>` | string | jq 表达式，用于过滤 JSON 输出（如 `'.parameters'`）；在交互式终端中需要加 `--format json` |

## 示例

```shell
# 列出所有可用模块
shoplazza schema

# 列出模块下的命令
shoplazza schema products

# 查看命令详情（HTTP 方法、路径、参数、请求体、响应结构）
shoplazza schema products.list

# 仅查看请求参数
shoplazza schema products.create --view request

# 仅查看响应结构
shoplazza schema products.list --view response
```

## 用途

* **发现 API** — 在编写脚本前浏览可用命令
* **检查参数** — 在调用前确认必填字段
* **调试请求** — 了解预期的请求/响应格式
* **AI Agent 集成** — Agent 可动态自省 Schema 以发现能力
