cancel
Showing results for 
Search instead for 
Did you mean: 

Codegen issues

Highlighted
Occasional Contributor

Codegen issues

My developers have raised a couple of issues with the code generated from Swaggerhub for the server (aspnet5 or aspnetcore). 

 

Firstly I've moved an enumerated attribute which is used in several definitions to a domain in order to separate this into it's own class which can be altered in isolation from the APIs. The models look good in the UI, attribute and enumerated values are there, but in the generated code this creates an empty class for the attribute. 

 

Additionally, when this attribute (or others) are defined in the actual API definition, codegen creates the attribute as a string value but does not add the enumerated literals. 

 

When we generate the client code (csharp) it works fine and picks up the enums. 

 

Is this working as expected? (and if so why)

Tags (1)
New Here?
Join us and watch the welcome video:
Announcements