Nestia SDK Generator
Automatic SDK and Swagger generator for @nestia/core
.
With @nestia/core
, you can boost up validation speed maximum 15,000x times faster. However, as @nestjs/swagger
does not support @nestia/core
, you can't generate swagger documents from @nestjs/swagger
more.
Instead, I provide you @nestia/sdk
module, which can generate not only swagger documents, but also SDK (Software Development Kit) library.
Setup
Boilerplate Project
npx nestia start <directory>
Just run above command, then boilerplate project would be constructed.
Setup Wizard
npx nestia setup
When you want to use nestia
in orindary project, just type above command.
All installation and configuration processes would be automatically done.
Also, you can specify package manager by --manage
argument like below:
npx nestia setup --manager npm
npx nestia setup --manager pnpm
npx nestia setup --manager yarn
Sole Setup
If you want to install and setup @nestia/sdk
only, just do it.
npm install --save-dev @nestia/sdk
Usage
npx nestia <sdk|swagger> <source_directories_or_patterns> \
--exclude <exclude_directory_or_pattern> \
--out <output_directory_or_file>
npx nestia sdk "src/**/*.controller.ts" --out "src/api"
npx nestia swagger "src/controllers" --out "dist/swagger.json"
You can generate sdk or swagger documents by above commands.
If you've configured nestia.config.ts
file, you can omit all options like below. About the nestia.config.ts
file, read Guide Documents -> SDK Generator -> Configuration
npx nestia sdk
npx nestia swagger
If you want to know more, visit Guide Documents.
- Generators
- Advanced Usage