use of com.palantir.conjure.java.services.JerseyServiceGenerator in project conjure-java by palantir.
the class AsyncRequestProcessingTest method beforeClass.
@BeforeAll
public static void beforeClass() throws IOException {
ConjureDefinition def = Conjure.parse(ImmutableList.of(new File("src/test/resources/async-request-processing-test.yml")));
List<Path> files = new GenerationCoordinator(MoreExecutors.directExecutor(), ImmutableSet.of(new UndertowServiceGenerator(Options.builder().undertowServicePrefix(true).undertowListenableFutures(true).build()), new JerseyServiceGenerator(Options.empty()))).emit(def, folder);
validateGeneratorOutput(files, Paths.get("src/integrationInput/java/com/palantir/product"));
}
use of com.palantir.conjure.java.services.JerseyServiceGenerator in project conjure-java by palantir.
the class JerseyServiceGeneratorTests method testServiceGeneration.
private void testServiceGeneration(String conjureFile) throws IOException {
ConjureDefinition def = Conjure.parse(ImmutableList.of(new File("src/test/resources/" + conjureFile + ".yml")));
List<Path> files = new GenerationCoordinator(MoreExecutors.directExecutor(), ImmutableSet.of(new JerseyServiceGenerator(Options.builder().requireNotNullAuthAndBodyParams(true).build()))).emit(def, folder);
validateGeneratorOutput(files, Paths.get("src/test/resources/test/api"), ".jersey");
}
use of com.palantir.conjure.java.services.JerseyServiceGenerator in project conjure-java by palantir.
the class JerseyServiceGeneratorTests method testBinaryReturnResponse.
@Test
public void testBinaryReturnResponse() throws IOException {
ConjureDefinition def = Conjure.parse(ImmutableList.of(new File("src/test/resources/example-binary.yml")));
List<Path> files = new GenerationCoordinator(MoreExecutors.directExecutor(), ImmutableSet.of(new JerseyServiceGenerator(Options.builder().jerseyBinaryAsResponse(true).build()))).emit(def, folder);
validateGeneratorOutput(files, Paths.get("src/test/resources/test/api"), ".jersey.binary_as_response");
}
use of com.palantir.conjure.java.services.JerseyServiceGenerator in project conjure-java by palantir.
the class JerseyServiceGeneratorTests method testBinaryReturnInputStream.
@Test
public void testBinaryReturnInputStream() throws IOException {
ConjureDefinition def = Conjure.parse(ImmutableList.of(new File("src/test/resources/example-binary.yml")));
List<Path> files = new GenerationCoordinator(MoreExecutors.directExecutor(), ImmutableSet.of(new JerseyServiceGenerator(Options.empty()))).emit(def, folder);
validateGeneratorOutput(files, Paths.get("src/test/resources/test/api"), ".jersey.binary");
}
Aggregations