We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents abdacc9 + 8caa051 commit 6f00c65Copy full SHA for 6f00c65
src/main/kotlin/org/springdoc/openapi/gradle/plugin/OpenApiGeneratorTask.kt
@@ -74,7 +74,7 @@ open class OpenApiGeneratorTask : DefaultTask() {
74
logger.info("Generating OpenApi Docs..")
75
val response: Response = khttp.get(url)
76
77
- val isYaml = url.toLowerCase().contains(".yaml") || url.toLowerCase().endsWith("/yaml")
+ val isYaml = url.toLowerCase().matches(Regex(".+[./]yaml$"))
78
val apiDocs = if (isYaml) response.text else prettifyJson(response)
79
80
val outputFile = outputDir.file(fileName).get().asFile
0 commit comments