/kavo-skills:swaggerfrom Kavo Developer Skills
Documents Kavo's optional @nestjs/swagger integration — install instructions, auto-documented routes vs manual additions, and wiring the docs endpoint.
Ships in Kavo Developer Skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
@nestjs/swagger is an optional peer of @kavo/nest — install it and
every generated route documents itself automatically; leave it out and
@Kavo costs nothing extra. No config flag turns this on or off: Kavo
detects the package at runtime (createRequire(...).require("@nestjs/swagger"),
cached, never throws if absent) and documents routes only when it's there.
Full detail: docs/internals/architecture/10-nestjs-integration.md §4.
npm install @nestjs/swagger
That's the only step — no @Kavo config option, no KavoModule option.
Existing @Kavo-decorated controllers pick up documentation the next time
the app boots with @nestjs/swagger present.
main.ts)This is plain Nest/Swagger, not Kavo-specific — SwaggerModule still needs
to be told to build and serve a document:
import { NestFactory } from "@nestjs/core";
import { DocumentBuilder, SwaggerModule } from "@nestjs/swagger";
import { AppModule } from "./app.module.js";
async function bootstrap(): Promise<void> {
const app = await NestFactory.create(AppModule);
const document = SwaggerModule.createDocument(
app,
new DocumentBuilder().setTitle("My API").setVersion("1.0.0").build(),
);
SwaggerModule.setup("docs", app, document); // → GET /docs
await app.listen(3000);
}
void bootstrap();
| Piece | Source |
|---|---|
| Operation id | <Entity>_<operationId> (e.g. User_findMany) |
:id path param | Every operation with an id in its route |
| Query params on list routes | filter/sort/fields/pagination/include shape (doc 05) |
| Request body schema | schema.input.<slot> when registered and it implements toJSONSchema() (ADR-0055); else the class-shaped schema for that slot, or the entity's ORM metadata (ApiBody) — see dto-slots |
| Error response schemas | Problem-details shape for 400/404, from the error catalog — see error-handling |
This applies identically whether the route came from plain generation,
@Override, or config-level operations.<id>.meta overrides — Swagger
metadata is applied through the same applyRouteDecorators step as the
route's method/param/status decorators.
schema with no toJSONSchema(). KavoSchema.safeParse alone gives
registerKavoSchemas nothing to introspect for docs — a schema documents
itself only if it also implements the optional toJSONSchema(): object
method (e.g. a thin wrapper calling Zod 4's z.toJSONSchema(schema)).
Without it, the schema still validates and narrows at runtime; the route
is documented from a class-shaped schema or the entity's ORM metadata instead, same as if no
schema were configured.filter[field][op]=
is documented as a generic shape, not expanded into one ApiQuery per
actual filterable/sortable field — that needs ORM metadata, which doesn't
exist yet at @Kavo decoration time (ADR-0012). If you want per-field
query docs today, add them yourself with plain @ApiQuery() on the
controller class.kavo-decorator's
section on those) get no automatic Swagger metadata — they're ordinary
Nest methods, so document them with plain @ApiOperation()/@ApiBody()
etc. exactly as you would on any non-@Kavo controller.graphql-binding) are a separate binding entirely
and are not covered by this REST-focused Swagger integration.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
15 skills in this plugin
/composite-primary-keysReference for composite primary key support in @kavo/typeorm — the compositeIdFields metadata field, the ~-delimited route-id encoding, the creatable/updatable split, and every place composite keys don't yet work (other ORM adapters, many-to-many array-mutation, @kavo/graphql). Use when an entity has more than one @PrimaryColumn, or when a route id, association, or array-mutation write on such an entity behaves unexpectedly./dto-slotsReference for Kavo's six optional schema slots (create/update/patch/query/item/list) — entity-derived defaults, the schemaShapeKeys narrowing rule, and serialization order. Use when configuring a DTO class or validator on @Kavo's schema option, or answering "why isn't my field showing/hiding" or "what shape does this response have" questions./npx claudepluginhub kavo-labs/kavo --plugin kavo-skillsOther plugins' skills for the same job