asyncapi / modelina

A library for generating typed models based on inputs such as AsyncAPI, OpenAPI, and JSON Schema documents with high customization
https://modelina.org
Apache License 2.0
317 stars 184 forks source link

can't create property of type Dictionary with c# generator #616

Closed michaelnurenberg closed 2 years ago

michaelnurenberg commented 2 years ago

Describe the bug

C# generator not creates properties with types Dictionary<>.

How to Reproduce

next file need to be generated from yml async api definition:

public class Node { public string Type { get; set; } public Guid NodeId { get; set; } public int NodeNumber { get; set; } public string NodeData { get; set; } public Dictionary<string, object> Instructions { get; set; } }

Expected behavior

expected a way to define in asyncapi schema the type like map/dictionary with key and value types. and add support to c# generator to generate model as attached above

jonaslagoni commented 2 years ago

Closing this one as duplicated issues was created: https://github.com/asyncapi/modelina/issues/615