Forum Discussion

Kdonley's avatar
Kdonley
Occasional Visitor
5 years ago

The type 'addressFamily' already contains a definition for '_6'

Every time I use NSwagStudio to generate a new NSwagProxy.cs file I have the above error.  I have a duplicate of _6 and _7.  My development team always has to scroll through the file to delete these two extra lines.  The duplicates are also in the swagger UI Schema.  I'm not sure where this schema is being pulled from.  I've seen this in several other peoples swagger UI's. but can't find any solutions to this problem.  Any insight would be appreciated.  Thanks!

 

    [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v12.0.0.0)")]
    public enum AddressFamily
    {
        _0 = 0,
    
        _1 = 1,
    
        _2 = 2,
    
        _3 = 3,
    
        _4 = 4,
    
        _5 = 5,
    
        _6 = 6,
    
        _6 = 6,
    
        _7 = 7,
    
        _7 = 7,
    
        _8 = 8,
    
        _9 = 9,
    
        _10 = 10,
    
        _11 = 11,
    
        _12 = 12,
    
        _13 = 13,
    
        _14 = 14,
    
        _15 = 15,
    
        _16 = 16,
    
        _17 = 17,
    
        _18 = 18,
    
        _19 = 19,
    
        _21 = 21,
    
        _22 = 22,
    
        _23 = 23,
    
        _24 = 24,
    
        _25 = 25,
    
        _26 = 26,
    
        _28 = 28,
    
        _29 = 29,
    
        _65536 = 65536,
    
        _65537 = 65537,
    
        __1 = -1,
    
    }

No RepliesBe the first to reply