Commit 87738fb2 authored by nanahira's avatar nanahira

fix doc

parent 95bdd527
...@@ -33,6 +33,9 @@ export class User extends IdBase() { ...@@ -33,6 +33,9 @@ export class User extends IdBase() {
@EnumColumn(Gender, { description: 'User gender' }) @EnumColumn(Gender, { description: 'User gender' })
gender: Gender; gender: Gender;
@NotColumn()
somethingElse: any; // Would not come from client input, and would not go into OpenAPI document.
} }
``` ```
...@@ -51,6 +54,8 @@ export class UserService extends CrudService(User) { ...@@ -51,6 +54,8 @@ export class UserService extends CrudService(User) {
## Controller decorators ## Controller decorators
Would also register proper OpenAPI documentation for the controller.
```ts ```ts
const dec = new RestfulFactory(User); const dec = new RestfulFactory(User);
class UpdateUserDto extends dec.updateDto {} // to extract type and class class UpdateUserDto extends dec.updateDto {} // to extract type and class
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment