Skip to content

Commit bfdc885

Browse files
committed
chore(3.2.0): update README, version bump
1 parent ba105da commit bfdc885

File tree

4 files changed

+54
-10
lines changed

4 files changed

+54
-10
lines changed

README.md

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@
4343
- [Params Options](#params-options)
4444
- [Validation Options](#validation-options)
4545
- [IntelliSense](#intellisense)
46-
- [Method Override](#method-override)
46+
- [Routes Override](#routes-override)
47+
- [Adding Routes](#adding-routes)
4748
- [Additional Decorators](#additional-decorators)
4849
- [Example Project](#example-project)
4950
- [Contribution](#contribution)
@@ -797,9 +798,9 @@ export class HeroesCrud {
797798
}
798799
```
799800

800-
### Method Override
801+
### Routes Override
801802

802-
List of composed base methods:
803+
List of composed base routes methods:
803804

804805
```typescript
805806
getManyBase(
@@ -910,7 +911,28 @@ export class HeroesCrud {
910911
}
911912
```
912913

913-
**_Notice:_** new custom route decorators were created to simplify process: `@ParsedQuery()`, `@ParsedParams`, `@ParsedBody()`, and`@ParsedOptions()`. But you still can add your param decorators to any of the methods, e.g. `@Param()`, `@Session()`, etc. Or any of your own cutom route decorators.
914+
**_Notice:_** new custom route decorators were created to simplify process: `@ParsedQuery()`, `@ParsedParams`, `@ParsedBody()`, and `@ParsedOptions()`. But you still can add your param decorators to any of the methods, e.g. `@Param()`, `@Session()`, etc. Or any of your own cutom route decorators.
915+
916+
### Adding Routes
917+
918+
Sometimes you might need to add a new route and to use `@ParsedQuery()`, `@ParsedParams`, `@ParsedOptions()` in it. You need to use `@UsePathInterceptors()` method decorator in order to do that:
919+
920+
```typescript
921+
...
922+
import { UsePathInterceptors } from '@nestjsx/crud';
923+
...
924+
925+
@UsePathInterceptors()
926+
@Get('/export/list.xlsx')
927+
async exportSome(
928+
@ParsedQuery() query: RestfulParamsDto,
929+
@ParsedOptions() options: CrudOptions,
930+
) {
931+
// some logic
932+
}
933+
```
934+
935+
By default this decorator will parse `query` and `param`. But you can specify what you need to parse by passing the appropriate argument (`@UsePathInterceptors('query')` or `@UsePathInterceptors('param')`).
914936

915937
### Additional Decorators
916938

dist/README.md

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@
4343
- [Params Options](#params-options)
4444
- [Validation Options](#validation-options)
4545
- [IntelliSense](#intellisense)
46-
- [Method Override](#method-override)
46+
- [Routes Override](#routes-override)
47+
- [Adding Routes](#adding-routes)
4748
- [Additional Decorators](#additional-decorators)
4849
- [Example Project](#example-project)
4950
- [Contribution](#contribution)
@@ -797,9 +798,9 @@ export class HeroesCrud {
797798
}
798799
```
799800

800-
### Method Override
801+
### Routes Override
801802

802-
List of composed base methods:
803+
List of composed base routes methods:
803804

804805
```typescript
805806
getManyBase(
@@ -910,7 +911,28 @@ export class HeroesCrud {
910911
}
911912
```
912913

913-
**_Notice:_** new custom route decorators were created to simplify process: `@ParsedQuery()`, `@ParsedParams`, `@ParsedBody()`, and`@ParsedOptions()`. But you still can add your param decorators to any of the methods, e.g. `@Param()`, `@Session()`, etc. Or any of your own cutom route decorators.
914+
**_Notice:_** new custom route decorators were created to simplify process: `@ParsedQuery()`, `@ParsedParams`, `@ParsedBody()`, and `@ParsedOptions()`. But you still can add your param decorators to any of the methods, e.g. `@Param()`, `@Session()`, etc. Or any of your own cutom route decorators.
915+
916+
### Adding Routes
917+
918+
Sometimes you might need to add a new route and to use `@ParsedQuery()`, `@ParsedParams`, `@ParsedOptions()` in it. You need to use `@UsePathInterceptors()` method decorator in order to do that:
919+
920+
```typescript
921+
...
922+
import { UsePathInterceptors } from '@nestjsx/crud';
923+
...
924+
925+
@UsePathInterceptors()
926+
@Get('/export/list.xlsx')
927+
async exportSome(
928+
@ParsedQuery() query: RestfulParamsDto,
929+
@ParsedOptions() options: CrudOptions,
930+
) {
931+
// some logic
932+
}
933+
```
934+
935+
By default this decorator will parse `query` and `param`. But you can specify what you need to parse by passing the appropriate argument (`@UsePathInterceptors('query')` or `@UsePathInterceptors('param')`).
914936

915937
### Additional Decorators
916938

dist/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nestjsx/crud",
3-
"version": "3.2.0-beta.2",
3+
"version": "3.2.0",
44
"description": "NestJs CRUD for RESTful APIs",
55
"main": "index.js",
66
"types": "index.d.ts",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nestjsx/crud",
3-
"version": "3.1.0",
3+
"version": "3.2.0",
44
"description": "Nest CRUD for RESTful APIs",
55
"scripts": {
66
"docker:up": "docker-compose up -d",

0 commit comments

Comments
 (0)