
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
@nest-excalibur/crud-swagger
Advanced tools
For Document the API-REST paths on swagger, you need to make use of CrudDoc
decorator or CrudApi
decorator.
npm i @nest-excalibur/common-api --save-dev
npm i @nest-excalibur/crud-swagger
Example: For every CRUD method you should make a configuration. The follwing example shows a configuration object:
In another file (if you want), make the configuration as a constant.
import {CrudApiConfig} from '@nest-excalibur/crud-swagger/lib';
export const PRODUCT_SWAGGER_CONFIG: CrudApiConfig = {
createOne: { // MethodName
apiBody: {
type: ProductCrearDto
},
headers: [
{
name: 'X-MyHeader',
description: 'Custom header',
},
],
responses: [
{
type: ProductCreateDto,
status: HttpStatus.CREATED,
description: 'Created Product'
},
{
status: HttpStatus.BAD_REQUEST,
description: 'Data not valid',
}
]
},
updateOne: {
apiBody: {
type: ProductUpdateDto,
},
responses: [
{
type: ProductCreateDto,
status: HttpStatus.OK,
description: 'Updated product'
}
]
},
findAll: {
headers: [
{
name: 'X-MyHeader',
description: 'Custom header',
},
],
responses: [
{
type: ProductFindResponse,
status: HttpStatus.OK,
description: 'Fetched Products'
}
]
}
}
import {CrudDoc} from '@nest-excalibur/crud-swagger/lib';
@CrudDoc(
PRODUCT_SWAGGER_CONFIG,
)
@Controller('product')
export class ProductController extends CrudController<PostEntity>(options){
}
FAQs
Swagger extension for CrudController
The npm package @nest-excalibur/crud-swagger receives a total of 1 weekly downloads. As such, @nest-excalibur/crud-swagger popularity was classified as not popular.
We found that @nest-excalibur/crud-swagger demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.