Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Yes, Swagger-codegen can be configured to use Jakarta libraries instead of Javavax. You can update the Maven or Gradle dependencies to use the Jakarta libraries and specify the appropriate generator option (-g flag) when running Swagger-codegen.

For example, if you want to generate Java server code using Jakarta libraries, you can use the following command:

java -jar swagger-codegen-cli.jar generate -i <swagger-file> -l java --library jakarta-resteasy -o <output-directory>

This will generate Java source code using the Jakarta RESTEasy library instead of the default JAX-RS library. You can find more information about configuring Swagger-codegen to use Jakarta libraries in the official documentation.