nestia icon indicating copy to clipboard operation
nestia copied to clipboard

Add Typia Support to nest js event patterns and message patterns

Open denniarems opened this issue 1 year ago • 7 comments

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

denniarems avatar Jun 30 '23 11:06 denniarems

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

samchon avatar Jul 03 '23 23:07 samchon

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 avatar Jul 04 '23 01:07 denniarems

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

denniarems avatar Jul 04 '23 09:07 denniarems

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

samchon avatar Jul 24 '23 19:07 samchon

@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

jmroon avatar Oct 03 '23 03:10 jmroon

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

samchon avatar Oct 03 '23 20:10 samchon

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

bemyduo-admin avatar Nov 22 '23 02:11 bemyduo-admin