swagger-api / swagger-codegen

swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition.
http://swagger.io
Apache License 2.0
16.81k stars 6.02k forks source link

Swagger Codegen no longer supports Java 7 #7259

Open wing328 opened 6 years ago

wing328 commented 6 years ago
Description

The latest Swagger Codegen no longer supports Java 7, which means users must have Java 8 or later installed in order to build the project locally in their environment.

If anyone has a compelling reason to use Java 7 for this project, please reply to let us know.

(The auto-generated Java API client still supports Java 6 or later)

Swagger-codegen version

latest master

wing328 commented 6 years ago

Some background information: we do have CircleCI to cover Java 7 and 8 but seems like it's not working as expected: https://github.com/swagger-api/swagger-codegen/blob/master/circle.yml#L42

If we continue to support Java8, we will need to leverage other CIs (e.g. Shippable) instead to make sure the project can be built by Java7.

jimschubert commented 6 years ago

@wing328 you can build with Docker to target Java 7 if you want to have that language support.

I think rather than supporting Java 7 in code, we could include build instructions via Docker only. This won't require users to have Java installed locally at all.

wing328 commented 6 years ago

@jimschubert thanks for the suggestion.

What about dropping Java 7 support in 3.0.0 release?

jimschubert commented 6 years ago

Yeah, considering you can compile via Docker I wouldn't consider installed Java version a blocker for development. It would be nice to use Java 8/9 features in code.

cbornet commented 6 years ago

+1 for Java8 and probably leverage lambdas and Optional. Java 9 seems a bit early for me though...

wing328 commented 6 years ago

Done via https://github.com/swagger-api/swagger-codegen/commit/0c9eb34e6fd64f50d03d40e3359a7a2efd07678c by @HugoMario

We'll drop Java 7 support in 3.0.0 release.