tsed icon indicating copy to clipboard operation
tsed copied to clipboard

[FEAT] Support CRUD controller

Open Romakita opened this issue 5 years ago • 4 comments

Information

As a developer I want to create a CRUD controller which follow the Rest API convention.

Example

import {CrudController, CrudService} from "@tsed/crud";

export class UserService implement CrudService<User> {
  
}

@CrudController({
   path: '/users',
   model: User
})
export class UsersCtrl {
   constructor(protected service: UserService) {}
}

CrudService interface

To be defined

Acceptance criteria

  • [ ] A new package is available on NPM @tsed/crud.
  • [ ] OpenSpec is correctly generated.
  • [ ] Validation is correctly executed based on the given Model.
  • [ ] Base methods can be overriden.

Romakita avatar Oct 27 '20 08:10 Romakita

Groups and RequiredGroups allow now this usage. We need a Partial decorator to finish this story.

Romakita avatar Mar 20 '21 09:03 Romakita

Hi. Could you describe a bit how to use Groups / RequiredGroups to allow this usage, please?

raduconst06 avatar Oct 22 '21 05:10 raduconst06

@petruconst It's described on the official doc: https://tsed.io/docs/model.html#requiredgroups

Romakita avatar Oct 22 '21 08:10 Romakita

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Mar 10 '22 22:03 stale[bot]

🎉 Are you happy?

If you appreciated the support, know that it is free and is carried out on personal time ;)

A support, even a little bit makes a difference for me and continues to bring you answers!

github opencollective

github-actions[bot] avatar Aug 27 '22 16:08 github-actions[bot]