Skip to content

Repository files navigation

@lucid-softworks/http-openapi

Programmatic OpenAPI 3.1 document construction.

import { OpenApiBuilder } from "@lucid-softworks/http-openapi";

const document = new OpenApiBuilder({ title: "Users", version: "1.0.0" })
  .schema("User", { type: "object" })
  .operation("GET", "/users/{id}", { responses: { "200": {} } })
  .document();

Documents are cloned on output so callers cannot mutate builder state. Methods and paths are validated when registered.

Releases

Packages

Contributors

Languages