vania_swagger 1.0.0
vania_swagger: ^1.0.0 copied to clipboard
Full OpenAPI 3.0 Swagger documentation for Vania framework - annotations, spec generation, and Swagger UI.
1.0.0 #
First stable release.
- Requires
vania2.0.0. - OpenAPI 3.1.0 output plus Swagger UI, served from the app's own
RouteratGET /docs,/docs/swagger.json, and/docs/swagger.yaml. No separateHttpServeron a second port, and the oldSwaggerUItype is gone. SwaggerModule.setup(controllers:, models:)collects routes and DTO schemas, withregisterRoute/registerModelas the explicit, AOT-safe path.- HTTP-verb annotations:
@ApiGet,@ApiPost,@ApiPut,@ApiPatch,@ApiDelete. ApiProperty.nameandApiSchema.nameare optional — the field or class name is used when omitted.- The UI is disabled when
APP_ENVisproductionby default, so a deployment does not publish its API surface by accident. - Fixed a crash when
basePathwas passed with a trailing slash. - Same-port UI.
SwaggerServiceProviderregistersGET /docs,GET /docs/swagger.json, andGET /docs/swagger.yamlon the app'sRouter— no more separateHttpServer.bind(..., 8080). The previousSwaggerUItype has been removed. - NestJS-style
SwaggerModule.setup(controllers:, models:)— walks controller instances and annotated DTO classes viadart:mirrorsand populatesSwaggerMetadata(). - New HTTP-verb annotations:
@ApiGet,@ApiPost,@ApiPut,@ApiPatch,@ApiDelete(all subclasses of@ApiRoute). - AOT-safe fallback —
SwaggerModule.registerRoute/SwaggerModule.registerModelwhendart:mirrorsisn't available. - OpenAPI 3.1.0 (bumped from 3.0.3).
- YAML output at
/docs/swagger.yamlvia a hand-rolled emitter — zero new deps. - Fix
basePath.substring(0, -1)crash when a trailing slash was passed. ApiProperty.nameandApiSchema.nameare now optional — when omitted, the field / class name is used.- Removed dead CDN "local-serve" placeholder JS from the old
SwaggerUI.