From cda3534eaf817c3da60eb50c5c73d0a946d2d8ac Mon Sep 17 00:00:00 2001 From: bnasslah Date: Mon, 23 Aug 2021 17:21:09 +0200 Subject: [PATCH] Inconsistent JSON ordering compared to springdoc-openapi. Fixes #45 --- .../org/springdoc/openapi/gradle/plugin/OpenApiGeneratorTask.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/org/springdoc/openapi/gradle/plugin/OpenApiGeneratorTask.kt b/src/main/kotlin/org/springdoc/openapi/gradle/plugin/OpenApiGeneratorTask.kt index 4c29b59..5e15b24 100644 --- a/src/main/kotlin/org/springdoc/openapi/gradle/plugin/OpenApiGeneratorTask.kt +++ b/src/main/kotlin/org/springdoc/openapi/gradle/plugin/OpenApiGeneratorTask.kt @@ -87,7 +87,7 @@ open class OpenApiGeneratorTask : DefaultTask() { private fun prettifyJson(response: Response): String { val gson = GsonBuilder().setPrettyPrinting().create() - val googleJsonObject = gson.fromJson(response.jsonObject.toString(), JsonObject::class.java) + val googleJsonObject = gson.fromJson(response.text, JsonObject::class.java) return gson.toJson(googleJsonObject) } }