You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pr 4085 creates Jackson annotations that use the name of the model. In some cases, it is not desired to use the model name in the annotation because the name specified there is used in the json payload.
Description
Follow-on to
#4085
#4226
pr 4085 creates Jackson annotations that use the name of the model. In some cases, it is not desired to use the model name in the annotation because the name specified there is used in the json payload.
Swagger-codegen version
2.2.2-SNAPSHOT
Swagger declaration file content or url
Related issues
#4085
#4226
Suggest a Fix
Currently (with pr 4226), with the Java language, this will generate the following annotations for BaseObj and SubObj.
In order to allow for a customized name in the
@Type
annotation, I suggest providing a vendor extension that can be used to specify the value.This would allow for the following annotations to be generated instead. I suggest "x-discriminator-value" as the name of the vendor extension.
Here is an example of the spec from above with the vendor extension and the code that would be generated.
The text was updated successfully, but these errors were encountered: