Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package io.quarkiverse.openapi.generator.deployment.codegen;

public class OpenApiGeneratorCodeGen extends OpenApiGeneratorCodeGenBase {
@Override
public String providerId() {
return OpenApiGeneratorOutputPaths.OPENAPI_PATH;
}

@Override
public String[] inputExtensions() {
return new String[] { JSON, YAML, YML };
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.Optional;
Expand Down Expand Up @@ -132,7 +133,7 @@ public boolean trigger(CodeGenContext context) throws CodeGenException {
.filter(Files::isRegularFile)
.filter(path -> {
String fileName = path.getFileName().toString();
return fileName.endsWith(inputExtension())
return Arrays.stream(this.inputExtensions()).anyMatch(fileName::endsWith)
&& !filesToExclude.contains(fileName)
&& (filesToInclude.isEmpty() || filesToInclude.contains(fileName));
}).toList();
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@

public class OpenApiGeneratorOutputPaths {

public static final String YAML_PATH = "open-api-yaml";
public static final String YML_PATH = "open-api-yml";
public static final String JSON_PATH = "open-api-json";
public static final String OPENAPI_PATH = "open-api";
public static final String STREAM_PATH = "open-api-stream";

private static final Collection<String> rootPaths = Arrays.asList(STREAM_PATH);
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
io.quarkiverse.openapi.generator.deployment.codegen.OpenApiGeneratorJsonCodeGen
io.quarkiverse.openapi.generator.deployment.codegen.OpenApiGeneratorYamlCodeGen
io.quarkiverse.openapi.generator.deployment.codegen.OpenApiGeneratorYmlCodeGen
io.quarkiverse.openapi.generator.deployment.codegen.OpenApiGeneratorCodeGen
io.quarkiverse.openapi.generator.deployment.codegen.OpenApiGeneratorStreamCodeGen
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class SimpleOpenApiTest {

@Test
void circuitBreaker() throws IOException {
Path generatedRestClient = Paths.get("target", "generated-sources", "open-api-json", "org", "acme",
Path generatedRestClient = Paths.get("target", "generated-sources", "open-api", "org", "acme",
"openapi", "simple", "api", "DefaultApi.java");

assertThat(generatedRestClient)
Expand Down