craftsman icon indicating copy to clipboard operation
craftsman copied to clipboard

Exception during deserialization on Messages object

Open Christian-Schou opened this issue 1 year ago • 1 comments

I am trying to create an API using this official template: https://wrapt.dev/docs/message-template#add-message-template-properties when I add the Messages in the template definition, I get an exception.

Steps to reproduce

Command: craftsman new domain .\definition.yml

The .\definition.yml file contents:

DomainName: WeSendReportsCompany
BoundedContexts:
  - ProjectName: Reporting
    Producers:
      - EndpointRegistrationMethodName: SubmitReportRequest
        ExchangeName: report-requests
        MessageName: ISendReportRequest
        ExchangeType: fanout
        ProducerName: ReportWasRequested
        UsesDb: true
    Consumers:
      - EndpointRegistrationMethodName: AllReportsGetSentFromHereEndpoint
        ConsumerName: SenderOfAllReports
        ExchangeName: report-requests
        MessageName: ISendReportRequest
        QueueName: all-reports
        ExchangeType: fanout
    Messages:
      - Name: ISendReportRequest
        Properties:
          - Name: ReportId
            Type: guid
          - Name: Provider
            Type: string
          - Name: Target
            Type: string
    Bus:
      AddBus: true

Exception when executing the command: Error: (Line: 3, Col: 5, Idx: 77) - (Line: 3, Col: 5, Idx: 77): Exception during deserialization

I figured out it's the Messages part, as removing it makes craftsman parse the file without problems and scaffolds the project as expected.

Further technical details

Craftsman version (dotnet tool list -g): 0.28.0

Christian-Schou avatar Nov 27 '24 13:11 Christian-Schou

Thanks for the callout I'll look into this

pdevito3 avatar Nov 28 '24 03:11 pdevito3