Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setting serializableModel to true to implement serilizable for modal classes not working #603

Open
SureshTak opened this issue Nov 18, 2021 · 2 comments

Comments

@SureshTak
Copy link

In the config Json, I added serializableModel: true but still classes are not generating with implement serializable. Is there any additional setting need to be done to have all classes implement Serializable interface.

{
  "name": "hello",
  "version": "0.1.0",
  "groupId": "com.hello",
  "artifactId": "0.1.0",
  "rootPackage": "com.networknt.eventuate.account.command",
  "handlerPackage":"com.networknt.eventuate.account.command.handler",
  "modelPackage":"com.hello",
  "serializableModel": true,
  "overwriteHandler": true,
  "overwriteHandlerTest": true,
  "overwriteModel": true,
  "httpPort": 8080,
  "enableHttp": false,
  "httpsPort": 8443,
  "enableHttps": false,
  "enableRegistry": false,
  "supportOracle": false,
  "supportMysql": false,
  "supportPostgresql": false,
  "supportH2ForTest": false,
  "supportClient": false
}
@SureshTak
Copy link
Author

I tried with latest fat jar codejen-cli.jar to see if it will resolve the issue but it with latest fat jar ,getting following error.

Invalid framework: swagger
avaliable frameworks:
        light-hybrid-4j-server
        light-graphql-4j
        openapi
        light-hybrid-4j-service
        openapi-spec
        openapikotlin

@stevehu
Copy link
Contributor

stevehu commented Nov 24, 2021

@SureshTak The swagger framework is removed as we only support OpenAPI 3.0 specification for codegen now. There are online tools to convert swagger spec to openapi spec.

For your first question, serializable is not supported for the POJO generation. We need to add this into the support if it is needed. From my experience, we don't need this interface unless we are still trying to build a Java EE application. What is your use case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants