UNPKG

@nestjs/swagger

Version:

OpenAPI for NestJS: generate the API document from controllers and decorators, serve Swagger UI, and derive request types with mapped types.

9 lines (8 loc) • 195 B
export function removeUndefinedKeys(obj) { Object.entries(obj).forEach(([key, value]) => { if (value === undefined) { delete obj[key]; } }); return obj; }