-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Description
Description
Retrofit2 templates are using tab instead of 4-space for indentation
modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/api.mustache: "Content-Type:{{mediaType}}"
modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/ApiClient.mustache: baseUrl = baseUrl + "/";
modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/ApiClient.mustache: private final Gson gson;
modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/ApiClient.mustache: private final Type type;
modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/ApiClient.mustache: GsonResponseBodyConverterToString(Gson gson, Type type) {
modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/ApiClient.mustache: this.gson = gson;
modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/ApiClient.mustache: this.type = type;
modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/ApiClient.mustache: }
modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/ApiClient.mustache: @Override public T convert(ResponseBody value) throws IOException {
modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/ApiClient.mustache: String returned = value.string();
modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/ApiClient.mustache: try {
modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/ApiClient.mustache: return gson.fromJson(returned, type);
modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/ApiClient.mustache: }
modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/ApiClient.mustache: catch (JsonParseException e) {
modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/ApiClient.mustache: }
modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/ApiClient.mustache: public static GsonCustomConverterFactory create(Gson gson) {
modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/ApiClient.mustache: return new GsonCustomConverterFactory(gson);
modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/ApiClient.mustache: }
modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/ApiClient.mustache: private final Gson gson;
modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/ApiClient.mustache: private final GsonConverterFactory gsonConverterFactory;
modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/ApiClient.mustache: private GsonCustomConverterFactory(Gson gson) {
modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/ApiClient.mustache: if (gson == null) throw new NullPointerException("gson == null");
modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/ApiClient.mustache: this.gson = gson;
modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/ApiClient.mustache: this.gsonConverterFactory = GsonConverterFactory.create(gson);
modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/ApiClient.mustache: }
We'll need to update these files to use 4-space for indentation and then review the code to make sure the code is aligned properly
Swagger-codegen version
Master
Suggest a Fix
If anyone has cycle to contribute the enhancement, please reply to let us know.