Forum Discussion
Hello Bhushan-Chandra ,
I'd be glad to provide a comprehensive response on generating primitive types instead of wrapper classes in Swagger Codegen, combining the best aspects of previous responses and addressing potential issues.
Utilize the primitive option within the x-codegen-java extension.
Use the model_behavior option with the value primitive within the x-swagger-code-gen extension.
Consult the official Swagger Codegen documentation for your target language to determine if it supports a similar language-specific option for generating primitive types.
f language-specific options aren't available or don't work as expected, consider modifying the code generation templates. However, this approach requires more technical expertise and caution: Locate the template file responsible for generating model classes in your chosen language. Identify the logic for type conversion and modify it to produce primitive types instead of wrapper classes for specified properties.
Best Regards,
NYStateofHealth
Related Content
- 2 years ago
- 8 years ago
Recent Discussions
- 12 days ago
- 18 days ago