samchon / nestia

NestJS Helper Libraries + TypeScript OpenAPI generator
https://nestia.io/
MIT License
1.79k stars 93 forks source link

Add Typia Support to nest js event patterns and message patterns #433

Open denniarems opened 1 year ago

denniarems commented 1 year ago

query on main repo https://github.com/samchon/typia/issues/697

currently nestia supports only or rest api (get,post,put ....)
but nest also have microservice decorators Link

@MessagePattern @EventPattern

it will be very helpfull for add typia decorater support for this two...

samchon commented 1 year ago

Can you show me an example and detailed feature what you want?

denniarems commented 1 year ago

Ok

On Tue, 4 Jul, 2023, 05:27 Jeongho Nam, @.***> wrote:

Can you show me an example and detailed feature what you want?

— Reply to this email directly, view it on GitHub https://github.com/samchon/nestia/issues/433#issuecomment-1619271219, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJM3EQSE4Y4PGKF2MLHIS43XONMABANCNFSM6AAAAAAZZW3S6Q . You are receiving this because you authored the thread.Message ID: @.***>

denniarems commented 1 year ago

So in here sending an event to microservice image and listens the event on microservice image

there is not type validation support for @MessagePattern and @EventPattern. we can make something like @TypedMicroCalls.Message and @TypedMicroCalls.Event right ? to make validations on both ends ? like SDK generator for clients...

samchon commented 1 year ago

Can you suggest a well-designed interface about that in @nestia/fetcher and generated SDK side?

jmroon commented 11 months ago

@denniarems you can just write a wrapper decorator for messagepattern which takes in a typia assertion function. I don't think there's any need for nestia to implement this

samchon commented 11 months ago

@jmroon Thanks for replying. @denniarems Do you agree?

bemyduo-admin commented 9 months ago

@samchon @jmroon Can you give an example of what this wrapper decorator would look like? Thanks! :)