thenativeweb / node-cqrs-domain

Node-cqrs-domain is a node.js module based on nodeEventStore that. It can be very useful as domain component if you work with (d)ddd, cqrs, eventdenormalizer, host, etc.
http://cqrs.js.org/pages/domain.html
MIT License
269 stars 57 forks source link

default value command schema #146

Closed tommiii closed 5 years ago

tommiii commented 5 years ago

Is possible to add a default value in the command .json schema? I'm aiming to fire command to create an aggregate without defining all the fields.

adrai commented 5 years ago

not directly in the schema but you can always do it in the commandHandle... valueFromPayload || defaultValue

tommiii commented 5 years ago

awesome, thanks!