Skip to content

Commit 4d43c53

Browse files
author
Berchris Requiao
committed
Update the regex
1 parent 2f38cb8 commit 4d43c53

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/kotlin/org/springdoc/openapi/gradle/plugin/OpenApiGeneratorTask.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ open class OpenApiGeneratorTask : DefaultTask() {
7474
logger.info("Generating OpenApi Docs..")
7575
val response: Response = khttp.get(url)
7676

77-
val isYaml = url.toLowerCase().matches(Regex(".+\\.?yaml$"))
77+
val isYaml = url.toLowerCase().matches(Regex(".+[./]yaml$"))
7878
val apiDocs = if (isYaml) response.text else prettifyJson(response)
7979

8080
val outputFile = outputDir.file(fileName).get().asFile

0 commit comments

Comments
 (0)