Oq:终端 OpenAPI 规范查看器
Oq: Terminal OpenAPI Spec Viewer

原始链接: https://github.com/plutov/oq

```yaml oq openapi.yaml # 或 cat openapi.yaml | oq # 或 curl https://api.example.com/openapi.json | oq ↑/↓ - 上下导航项目 Tab - 切换端点和组件视图 Enter 或 Space - 切换端点和组件详情的折叠/展开 q 或 Ctrl+C - 退出应用程序 oq 支持现代的主要 OpenAPI 规范版本: OpenAPI 3.0.x OpenAPI 3.1.x 支持 JSON 和 YAML 格式。 git clone [email protected]:plutov/oq.git cd oq go build -o oq . MIT 许可证 - 详情请见 LICENSE 文件。 欢迎贡献!请随时提交 issue 和 pull request。 贡献时: 确保测试通过:go test -v 使用 OpenAPI 3.0 和 3.1 示例进行测试 ```

## Oq:一个终端 OpenAPI 规范查看器 - 摘要 一个名为“Oq”的新工具([github.com/plutov](https://github.com/plutov))在 Hacker News 上分享,它提供了一个基于终端的 OpenAPI 规范查看器。用户称赞其易于浏览大型 YAML/JSON 规范文件的实用性,这对于以规范为真理来源的 API 接口的规范驱动开发至关重要。 一些评论者强调了他们使用 OpenAPI 生成客户端和服务器代码的工作流程,自动化样板代码并确保一致且可预测的 API。讨论围绕服务器/客户端生成工具(使用 Spring 和 Python 生成器通过 swagger-codegen)以及与现有项目也名为“oq”的潜在冲突。 开发者 der_gopher 正在考虑使用 Homebrew tap 以方便更新,承认当前二进制发布和校验和验证的局限性。进一步的讨论涉及对 OpenAPI 3.1 的支持以及基于规范执行 API 调用的工具,例如 [aep.dev](https://aep.dev)。
相关文章

原文

oq preview

oq openapi.yaml
# or
cat openapi.yaml | oq
# or
curl https://api.example.com/openapi.json | oq
  • ↑/↓ or k/j - Navigate up/down through items
  • Tab - Switch between Endpoints and Components views
  • Enter or Space - Toggle fold/unfold for endpoint and component details
  • q or Ctrl+C - Quit the application

oq supports both modern major OpenAPI specification versions:

  • OpenAPI 3.0.x
  • OpenAPI 3.1.x

Both JSON and YAML formats are supported.

git clone [email protected]:plutov/oq.git
cd oq
go build -o oq .

MIT License - see LICENSE file for details.

Contributions are welcome! Please feel free to submit issues and pull requests.

When contributing:

  1. Ensure tests pass: go test -v
  2. Test with both OpenAPI 3.0 and 3.1 examples
联系我们 contact @ memedata.com