Skip to content

Commit ec56a24

Browse files
committed
feature(swagger) added path params to swagger explorer
1 parent 62e696c commit ec56a24

25 files changed

+633
-302
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ _Status codes:_ 200 | 404
194194
- [**`sort`**](#sort) (alias: `sort[]`) - sort GET result by some `field` in `ASC | DESC` order
195195
- [**`join`**](#join) (alias: `join[]`) - receive joined relational entities in GET result (with all or selected fields)
196196
- [**`limit`**](#limit) (alias `per_page`) - receive `N` amount of entities
197-
- [**`offset`**](#offset) (alias `skip`) - offset `N` amount of entities
197+
- [**`offset`**](#offset) - offset `N` amount of entities
198198
- [**`page`**](#page) - receive a portion of `limit` (`per_page`) entities (alternative to `offset`)
199199
- [**`cache`**](#cache) - reset cache (if was enabled) and receive entities from the DB
200200

@@ -816,11 +816,14 @@ enum CrudActions {
816816
`ACLGuard` dummy example:
817817

818818
```typescript
819+
import { Reflector } from '@nestjs/core';
819820
import { Injectable, CanActivate, ExecutionContext } from '@nestjs/common';
820821
import { FEAUTURE_NAME_METADATA, ACTION_NAME_METADATA } from '@nestjsx/crud';
821822

822823
@Injectable()
823824
export class ACLGuard implements CanActivate {
825+
constructor(private reflector: Reflector) {}
826+
824827
canActivate(ctx: ExecutionContext): boolean {
825828
const handler = ctx.getHandler();
826829
const controller = ctx.getClass();

dist/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ _Status codes:_ 200 | 404
194194
- [**`sort`**](#sort) (alias: `sort[]`) - sort GET result by some `field` in `ASC | DESC` order
195195
- [**`join`**](#join) (alias: `join[]`) - receive joined relational entities in GET result (with all or selected fields)
196196
- [**`limit`**](#limit) (alias `per_page`) - receive `N` amount of entities
197-
- [**`offset`**](#offset) (alias `skip`) - offset `N` amount of entities
197+
- [**`offset`**](#offset) - offset `N` amount of entities
198198
- [**`page`**](#page) - receive a portion of `limit` (`per_page`) entities (alternative to `offset`)
199199
- [**`cache`**](#cache) - reset cache (if was enabled) and receive entities from the DB
200200

@@ -816,11 +816,14 @@ enum CrudActions {
816816
`ACLGuard` dummy example:
817817

818818
```typescript
819+
import { Reflector } from '@nestjs/core';
819820
import { Injectable, CanActivate, ExecutionContext } from '@nestjs/common';
820821
import { FEAUTURE_NAME_METADATA, ACTION_NAME_METADATA } from '@nestjsx/crud';
821822

822823
@Injectable()
823824
export class ACLGuard implements CanActivate {
825+
constructor(private reflector: Reflector) {}
826+
824827
canActivate(ctx: ExecutionContext): boolean {
825828
const handler = ctx.getHandler();
826829
const controller = ctx.getClass();

dist/decorators/crud.decorator.d.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
import { ValidationPipeOptions } from '@nestjs/common';
2-
interface CrudOptions {
3-
validation?: ValidationPipeOptions;
4-
}
1+
import { CrudOptions } from '../interfaces';
2+
declare type BaseRouteName = 'getManyBase' | 'getOneBase' | 'createOneBase' | 'createManyBase' | 'updateOneBase' | 'deleteOneBase';
53
export declare const Crud: (dto: any, crudOptions?: CrudOptions) => (target: object) => void;
6-
export declare const Override: (name?: "getManyBase" | "getOneBase" | "createOneBase" | "updateOneBase" | "deleteOneBase") => (target: any, key: any, descriptor: PropertyDescriptor) => PropertyDescriptor;
4+
export declare const Override: (name?: BaseRouteName) => (target: any, key: any, descriptor: PropertyDescriptor) => PropertyDescriptor;
75
export {};

dist/decorators/crud.decorator.js

Lines changed: 61 additions & 96 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)