forge README

项目的 README,来自 github.com/cloudflare/forge。合并为一个 markdown 文件:README.md。

Forge

Forge is a schema-first OpenAPI code generation and surface tooling framework. It provides a plugin-based architecture for resolving OpenAPI 3.x specifications, applying JSONPath-based overlays, and generating typed SDKs, CLI interfaces, runtime helpers, and documentation.

It's still early-days for Forge and we're laser focused on the first Forge output, the cf CLI. Rest assured, in short order we'll be making it easier and easier for other targets (namely, TypeScript, Go, Python, Terraform, etc. - and docs for all of the above), but that will track in parallel to us releasing those targets for our own SDKs. That's just how we do things at Cloudflare: we often open source as soon as we can (often, sooner than others might) and always test our products on ourselves first.

Documentation

The guides and reference for Forge, its model and its plugins are in the Forge documentation source. Start with About Forge and Get started.

Rust library

Forge's Rust package is named cloudflare-forge. Registry publishing is currently paused. Depend on the repository and rename the package to forge so Rust code imports its API through forge:::

[dependencies.forge]
package = "cloudflare-forge"
git = "https://github.com/cloudflare/forge"
default-features = false

The default cli feature also builds the forge command. Enable wasm to run WebAssembly plugins from a Rust host. The Rust API reference lists the public model and plugin interfaces.

License

Apache-2.0 © Cloudflare, Inc.

forge (cloudflare/forge)

正在搜索数据库…

这是什么?Forge 是一个 schema 优先的 OpenAPI 代码生成与接口工具框架,可以解析 OpenAPI 3.x 规范、应用 JSONPath overlay,并生成带类型的 SDK、CLI、运行时辅助函数和文档。
它是单个 CLI 应用,还是更大的东西?它是一个基于插件的框架,以 monorepo 多包形式发布,围绕一个核心 OpenAPI 解析器和 JSONPath overlay 引擎构建,而不是单个独立应用。
怎么从我的 OpenAPI 规范生成 SDK?安装独立的 Forge CLI,让它指向一个捆绑的 OpenAPI 规范来生成 TypeScript SDK;也可以用 '-' 通过 stdin 管道传入规范。
用这个需要 Docker 吗?完整的 SDK 生成需要 Docker;README 说明,在基本 CLI 用法之外,完整的生成流水线需要它。
Forge 现在能为 TypeScript 以外的语言生成 SDK 吗?monorepo 里有面向 Python、Go、Java、PHP、C#、Ruby、Rust 和 Swift 的 workspace 包装包,但 README 中记载为可独立使用的生成器只有 TypeScript 那一个。
CLI 的输出目录里有什么?里面有最终定稿的 OpenAPI 文档、生成的 SDK 源代码,以及一个 sdk-map.json 文件。
astro-fern 是干什么的?它是一个用于渲染基于 Fern 的 API 文档的通用 Astro 引擎,docs-site 包用它来构建 API 参考网站。
monorepo 里为什么有 fern-forge?fern-forge 是一个 astro-fern 扩展,负责校验并适配 Forge 的 OpenAPI 元数据,让它在基于 Fern 的文档站点中正确渲染。
能生成 TypeScript 以外语言的 SDK 吗?有面向 Python、Go、Java、PHP、C#、Ruby、Rust 和 Swift 的 workspace 包装包,但文档记载的独立生成器目前只覆盖 TypeScript。
大小
65.7 MB
星标
1.2K
时长
2个月
提交 · 90 天