Skip to content

Commit

Permalink
chore(3.2.0): update README, version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelyali committed Mar 27, 2019
1 parent ba105da commit bfdc885
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 10 deletions.
30 changes: 26 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
- [Params Options](#params-options)
- [Validation Options](#validation-options)
- [IntelliSense](#intellisense)
- [Method Override](#method-override)
- [Routes Override](#routes-override)
- [Adding Routes](#adding-routes)
- [Additional Decorators](#additional-decorators)
- [Example Project](#example-project)
- [Contribution](#contribution)
Expand Down Expand Up @@ -797,9 +798,9 @@ export class HeroesCrud {
}
```

### Method Override
### Routes Override

List of composed base methods:
List of composed base routes methods:

```typescript
getManyBase(
Expand Down Expand Up @@ -910,7 +911,28 @@ export class HeroesCrud {
}
```

**_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.
**_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.

### Adding Routes

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:

```typescript
...
import { UsePathInterceptors } from '@nestjsx/crud';
...

@UsePathInterceptors()
@Get('/export/list.xlsx')
async exportSome(
@ParsedQuery() query: RestfulParamsDto,
@ParsedOptions() options: CrudOptions,
) {
// some logic
}
```

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')`).

### Additional Decorators

Expand Down
30 changes: 26 additions & 4 deletions dist/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
- [Params Options](#params-options)
- [Validation Options](#validation-options)
- [IntelliSense](#intellisense)
- [Method Override](#method-override)
- [Routes Override](#routes-override)
- [Adding Routes](#adding-routes)
- [Additional Decorators](#additional-decorators)
- [Example Project](#example-project)
- [Contribution](#contribution)
Expand Down Expand Up @@ -797,9 +798,9 @@ export class HeroesCrud {
}
```

### Method Override
### Routes Override

List of composed base methods:
List of composed base routes methods:

```typescript
getManyBase(
Expand Down Expand Up @@ -910,7 +911,28 @@ export class HeroesCrud {
}
```

**_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.
**_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.

### Adding Routes

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:

```typescript
...
import { UsePathInterceptors } from '@nestjsx/crud';
...

@UsePathInterceptors()
@Get('/export/list.xlsx')
async exportSome(
@ParsedQuery() query: RestfulParamsDto,
@ParsedOptions() options: CrudOptions,
) {
// some logic
}
```

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')`).

### Additional Decorators

Expand Down
2 changes: 1 addition & 1 deletion dist/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nestjsx/crud",
"version": "3.2.0-beta.2",
"version": "3.2.0",
"description": "NestJs CRUD for RESTful APIs",
"main": "index.js",
"types": "index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nestjsx/crud",
"version": "3.1.0",
"version": "3.2.0",
"description": "Nest CRUD for RESTful APIs",
"scripts": {
"docker:up": "docker-compose up -d",
Expand Down

0 comments on commit bfdc885

Please sign in to comment.