Created by: rafaelsousa
Fixes #5444
When generating apis from the code, I was getting this issue :
[ERROR] /home/rsousa/Code/personalmanager/api/target/generated-sources/openapi/src/main/java/ca/renardnumerique/personalmanager/invoker/CustomInstantDeserializer.java:[31,8] ca.renardnumerique.personalmanager.invoker.CustomInstantDeserializer is not abstract and does not override abstract method withLeniency(java.lang.Boolean) in com.fasterxml.jackson.datatype.threetenbp.deser.ThreeTenDateTimeDeserializerBase [ERROR] /home/rsousa/Code/personalmanager/api/target/generated-sources/openapi/src/main/java/ca/renardnumerique/personalmanager/invoker/CustomInstantDeserializer.java:[150,33] withDateFormat(org.threeten.bp.format.DateTimeFormatter) in ca.renardnumerique.personalmanager.invoker.CustomInstantDeserializer cannot override withDateFormat(org.threeten.bp.format.DateTimeFormatter) in com.fasterxml.jackson.datatype.threetenbp.deser.ThreeTenDateTimeDeserializerBase return type com.fasterxml.jackson.databind.JsonDeserializer is not compatible with com.fasterxml.jackson.datatype.threetenbp.deser.ThreeTenDateTimeDeserializerBase [ERROR] /home/rsousa/Code/personalmanager/api/target/generated-sources/openapi/src/main/java/ca/renardnumerique/personalmanager/invoker/CustomInstantDeserializer.java:[149,3] method does not override or implement a method from a supertype [INFO] 3 errors [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 5.595 s [INFO] Finished at: 2020-11-10T13:50:37-05:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project api: Compilation failure: Compilation failure: [ERROR] /home/rsousa/Code/personalmanager/api/target/generated-sources/openapi/src/main/java/ca/renardnumerique/personalmanager/invoker/CustomInstantDeserializer.java:[31,8] ca.renardnumerique.personalmanager.invoker.CustomInstantDeserializer is not abstract and does not override abstract method withLeniency(java.lang.Boolean) in com.fasterxml.jackson.datatype.threetenbp.deser.ThreeTenDateTimeDeserializerBase [ERROR] /home/rsousa/Code/personalmanager/api/target/generated-sources/openapi/src/main/java/ca/renardnumerique/personalmanager/invoker/CustomInstantDeserializer.java:[150,33] withDateFormat(org.threeten.bp.format.DateTimeFormatter) in ca.renardnumerique.personalmanager.invoker.CustomInstantDeserializer cannot override withDateFormat(org.threeten.bp.format.DateTimeFormatter) in com.fasterxml.jackson.datatype.threetenbp.deser.ThreeTenDateTimeDeserializerBase [ERROR] return type com.fasterxml.jackson.databind.JsonDeserializer is not compatible with com.fasterxml.jackson.datatype.threetenbp.deser.ThreeTenDateTimeDeserializerBase [ERROR] /home/rsousa/Code/personalmanager/api/target/generated-sources/openapi/src/main/java/ca/renardnumerique/personalmanager/invoker/CustomInstantDeserializer.java:[149,3] method does not override or implement a method from a supertype [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
I modified the Mustache template in order to fix that.
PR checklist
-
Read the contribution guidelines. -
Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community. -
If contributing template-only or documentation-only changes which will change sample output, build the project beforehand. -
Run the shell script ./bin/generate-samples.sh
to update all Petstore samples related to your fix. This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master. These must match the expectations made by your contribution. You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example./bin/generate-samples.sh bin/configs/java*
. For Windows users, please run the script in Git BASH. -
File the PR against the correct branch: master
-
Copy the technical committee to review the pull request if your PR is targeting a particular programming language.
@bbdouglas @sreeshas @jfiala @lukoyanov @cbornet @jeff9finger @karismann @Zomzog @lwlee2608 @bkabrda