Skip to content

Commit 20559c6

Browse files
jcjveraaveraj00
andauthored
Fix for GH issue #1047 (#1190)
Co-authored-by: veraj00 <[email protected]>
1 parent e5e7bb7 commit 20559c6

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

client/deployment/src/main/java/io/quarkiverse/openapi/generator/deployment/template/OpenApiNamespaceResolver.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package io.quarkiverse.openapi.generator.deployment.template;
22

3-
import java.io.File;
43
import java.lang.reflect.Method;
4+
import java.net.URI;
55
import java.nio.file.Path;
66
import java.util.ArrayList;
77
import java.util.Collections;
@@ -61,7 +61,7 @@ public boolean genDeprecatedApiAttr(final String pkg, final String classname,
6161

6262
@SuppressWarnings("unused")
6363
public String parseUri(String uri) {
64-
return OpenApiGeneratorOutputPaths.getRelativePath(Path.of(uri)).toString().replace(File.separatorChar, '/');
64+
return OpenApiGeneratorOutputPaths.getRelativePath(Path.of(URI.create(uri))).toString();
6565
}
6666

6767
@SuppressWarnings("unused")

client/deployment/src/main/java/io/quarkiverse/openapi/generator/deployment/wrapper/OpenApiClientGeneratorWrapper.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ public abstract class OpenApiClientGeneratorWrapper {
6464
GlobalSettings.setProperty(ONCE_LOGGER, verbose ? FALSE.toString() : TRUE.toString());
6565

6666
this.configurator = configurator;
67-
this.configurator.setInputSpec(specFilePath.toString());
67+
// toUri() for the input first to ensure consistent path names which became an issue with the 3.1.0 spec-parser
68+
this.configurator.setInputSpec(specFilePath.toUri().toString());
6869
this.configurator.setOutputDir(outputDir.toString());
6970
this.configurator.addAdditionalProperty(QUARKUS_GENERATOR_NAME,
7071
Collections.singletonMap("openApiSpecId", getSanitizedFileName(specFilePath)));

0 commit comments

Comments
 (0)