Open Dharam625 opened 2 months ago
I have the following open api specification written in yaml:
type: object additionalProperties: false properties: oddNumbers: type: array items: type: string pattern: '^[0-9]+$' maxLength: 19 example: ["1", "3", "5", "7", "9"]
Here is the generated c# code using NWag:
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class OddNumbers { [System.Text.Json.Serialization.JsonPropertyName("oddNumbers")] public System.Collections.Generic.List<string> OddNumbers1 { get; set; } }
As you can see, pattern and maxLength applied at each array item in open api specification is not carried through in generated code.
is this feature not supported currently in Nswag or there is some configuration setting i am missing ?
Any help is much appreciated :)
I have the following open api specification written in yaml:
Here is the generated c# code using NWag:
As you can see, pattern and maxLength applied at each array item in open api specification is not carried through in generated code.
is this feature not supported currently in Nswag or there is some configuration setting i am missing ?
Any help is much appreciated :)