swagger-codegen-generators icon indicating copy to clipboard operation
swagger-codegen-generators copied to clipboard

Missing Jackson annotations for enum

Open gpor0 opened this issue 6 years ago • 3 comments

Generator does not generate all required imports for inner class enums. JsonCreator and JsonValue annotations are created but imports are missing leading into compile errors.

As found in pojo template there is only JsonProperty import present. https://github.com/swagger-api/swagger-codegen-generators/blob/117dbb52f2e8f27cdd760e955e306b670a21ed8a/src/main/resources/handlebars/JavaJaxRS/spec/pojo.mustache#L3

and enum template where JsonCreator is present: https://github.com/swagger-api/swagger-codegen-generators/blob/117dbb52f2e8f27cdd760e955e306b670a21ed8a/src/main/resources/handlebars/JavaJaxRS/enumClass.mustache#L35

gpor0 avatar Feb 09 '20 17:02 gpor0

This is the same as https://github.com/swagger-api/swagger-codegen/issues/8642 for 2.x

mcassidygamma avatar Jul 20 '20 18:07 mcassidygamma

https://github.com/swagger-api/swagger-codegen-generators/pull/732

mcassidygamma avatar Jul 20 '20 19:07 mcassidygamma

Created a new PR with all the latest changes from the master branch https://github.com/swagger-api/swagger-codegen-generators/pull/1045

mcassidygamma avatar May 26 '22 10:05 mcassidygamma