pdevito3 / craftsman

A .NET scaffolding tool to help you stop worrying about boilerplate and focus on your business logic 🚀
https://wrapt.dev
MIT License
1.12k stars 65 forks source link

Author cannot be null #122

Closed AlexanderNZ closed 12 months ago

AlexanderNZ commented 1 year ago

Hi there,

Just letting you know that I'm seeing the same issue reported here https://github.com/pdevito3/craftsman/issues/72#issuecomment-1103115068 - but on Mac

Steps to reproduce

On Mac Ventura 13.5.1 with Craftsman 0.22.1 create a yml file with contents:

DomainName: poc
BoundedContexts:
    - ProjectName: HumanContext
      Port: 8081
      DbContext:
        ContextName: HumanDbContext
        DatabaseName: HumanReadModel
        Provider: postgres
        NamingConvention: CamelCase
      Entities:
        - Name: Human
          Features:
            - Type: AddRecord
            - Type: GetRecord
            - Type: GetList
            - Type: UpdateRecord
            - Type: DeleteRecord
          Properties:
          - Name: PropertyName
            Type: string
            IsRequired: true
          - Name: lastName
            Type: string
            IsRequired: true
          - Name: irdNumber
            Type: int
            IsRequired: false
          - Name: activeContracts
            Relationship: 1tomany
            ForeignEntityName: Contract
            ForeignEntityPlural: Contracts
        - Name: Contract
          Features:
            - Type: AddRecord
            - Type: GetRecord
            - Type: GetList
            - Type: UpdateRecord
            - Type: DeleteRecord
          Properties:
          - Name: jobTitle
            Type: string
            IsRequired: true
          - Name: hourlyRate
            Type: int
            IsRequired: true
          - Name: contractedHoursPerUnitTime
            Type: int
            IsRequired: false
          - Name: unitTime
            SmartNames:
                - week
                - month
                - year

Run craftsman new domain poc.yml Craftsman outputs an error Error: Value cannot be null. (Parameter 'author')

pdevito3 commented 1 year ago

Thanks for the repro example, I'll take a look

diegogzzsal commented 1 year ago

Good morning, need to set the git global config for user and email for this to work. git config --global user.name "pepe la papa" git config --global user.email "algo@algo.com"

pdevito3 commented 12 months ago

Yup that would fix it @diegogzzsal. thanks for the callout!

I'm adding better handling for this in the next release