cancel
Showing results for 
Search instead for 
Did you mean: 

SwaggerUI multiple values generated

SOLVED
Highlighted
New Contributor

SwaggerUI multiple values generated

I have a simple ASP.Net Core project with a simple controller. Nothing special. But when I load it up with swagger in the json file in the generated attributes I have a lot of duplicated value, for example: 

TypeAttributesinteger($int32)Enum:
[ 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 7, 8, 16, 24, 32, 32, 128, 256, 1024, 2048, 4096, 8192, 16384, 65536, 131072, 196608, 196608, 262144, 264192, 1048576, 12582912 ]

If I generate a C# code from this with NSwagStudio I will get a lot of duplicated values, and the code will not compile. Any ideas how can I not generate these numbers?

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Moderator

Re: SwaggerUI multiple values generated

Hi @DenesIsti,

 

This looks like a bug in the library/framework that you use to generate the OpenAPI definition (probably Swashbuckle). You should open a ticket with that library/framework.


Helen Kosova
SmartBear Documentation Team Lead
________________________
Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today

View solution in original post

Highlighted
New Contributor

Re: SwaggerUI multiple values generated

Thanks, will post an issue on Swashbuckle.

View solution in original post

2 REPLIES 2
Highlighted
Moderator

Re: SwaggerUI multiple values generated

Hi @DenesIsti,

 

This looks like a bug in the library/framework that you use to generate the OpenAPI definition (probably Swashbuckle). You should open a ticket with that library/framework.


Helen Kosova
SmartBear Documentation Team Lead
________________________
Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today

View solution in original post

Highlighted
New Contributor

Re: SwaggerUI multiple values generated

Thanks, will post an issue on Swashbuckle.

View solution in original post

New Here?
Join us and watch the welcome video:
Top Kudoed Authors