OPENAPI
v0.1.0 — OpenAPI 3.1 serializer + Swagger UI for Hyper. Pluggable SchemaConverter.
$ hyper add openapi
Copies 5 files into src/hyper/openapi/ and updates hyper.lock.json.
DEPS
- registry: core
FILES
- openapi/converter.ts
- openapi/generate.ts
- openapi/index.ts
- openapi/plugin.ts
- openapi/swagger.ts
README
@hyper/openapi
OpenAPI 3.1 serializer + Swagger UI for Hyper. Pluggable SchemaConverter.
Install
Components are installed as source into your repo, not pulled from npm. Pair openapi with a converter for your validation library:
bunx hyper add openapi openapi-zod
# or: bunx hyper add openapi openapi-arktype
# or: bunx hyper add openapi openapi-valibot
See hyperjs.ai for the full registry.
Usage
import { Hyper } from "@hyper/core"
import { openapiPlugin } from "@hyper/openapi"
import { zodConverter } from "@hyper/openapi-zod"
export default new Hyper()
.use(openapiPlugin({ converter: zodConverter }))
.listen(3000)
Docs
See the main README and docs/ for guides and integration recipes.
License
MIT
MANIFEST
- /r/openapi.json — latest
- /r/openapi@0.1.0.json — immutable