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
Expand Up @@ -12,9 +12,7 @@ import java.util.Set;
import {{rootJavaEEPackage}}.ws.rs.*;
import {{rootJavaEEPackage}}.ws.rs.core.Response;
import {{rootJavaEEPackage}}.ws.rs.core.MediaType;
{{^disableMultipart}}
import org.apache.cxf.jaxrs.ext.multipart.*;
{{/disableMultipart}}

{{#microprofileMutiny}}
import io.smallrye.mutiny.Uni;
{{/microprofileMutiny}}
Expand All @@ -29,6 +27,7 @@ import org.eclipse.microprofile.rest.client.annotation.RegisterProvider;
{{/microprofileRegisterExceptionMapper}}
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;


{{#appName}}
/**
* {{{appName}}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ package {{package}};

{{#imports}}import {{import}};
{{/imports}}
{{#isFile}}
import java.io.File;
{{/isFile}}
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Assertions;
Expand Down Expand Up @@ -70,7 +73,7 @@ public class {{classname}}Test {
public void {{operationId}}Test() {
// TODO: test validations
{{#allParams}}
{{^isFile}}{{{dataType}}} {{paramName}} = null;{{/isFile}}{{#isFile}}org.apache.cxf.jaxrs.ext.multipart.Attachment {{paramName}} = null;{{/isFile}}
{{^isFile}}{{{dataType}}} {{paramName}} = null;{{/isFile}}{{#isFile}}File {{paramName}} = null;{{/isFile}}
{{/allParams}}
//{{^vendorExtensions.x-java-is-response-void}}{{#microprofileMutiny}}Uni<{{{returnType}}}>{{/microprofileMutiny}}{{^microprofileMutiny}}{{{returnType}}}{{/microprofileMutiny}} response = {{/vendorExtensions.x-java-is-response-void}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
//{{#returnType}}Assertions.assertNotNull(response);{{/returnType}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{#isFormParam}}{{^isFile}}@Multipart(value = "{{baseName}}"{{^required}}, required = false{{/required}}) {{{dataType}}} {{paramName}}{{/isFile}}{{#isFile}} @Multipart(value = "{{baseName}}" {{^required}}, required = false{{/required}}) Attachment {{paramName}}Detail{{/isFile}}{{/isFormParam}}
{{#isFormParam}}{{^isFile}}{{#required}}{{#useBeanValidation}}@NotNull {{/useBeanValidation}}{{/required}}@FormParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/isFile}}{{#isFile}} {{#required}}{{#useBeanValidation}}@NotNull {{/useBeanValidation}}{{/required}}@FormParam("{{baseName}}") File {{paramName}}Detail{{/isFile}}{{/isFormParam}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{#isFormParam}}{{^isFile}}{{{dataType}}} {{paramName}}{{/isFile}}{{#isFile}} Attachment {{paramName}}Detail{{/isFile}}{{/isFormParam}}
{{#isFormParam}}{{^isFile}}{{{dataType}}} {{paramName}}{{/isFile}}{{#isFile}} File {{paramName}}Detail{{/isFile}}{{/isFormParam}}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<sourceDirectory>src/main/java</sourceDirectory>
<plugins>
<plugin>
<groupId>org.jboss.jandex</groupId>
<groupId>io.smallrye</groupId>
<artifactId>jandex-maven-plugin</artifactId>
<version>${jandex.maven.plugin.version}</version>
<executions>
Expand Down Expand Up @@ -101,13 +101,7 @@
<version>${smallrye.config.version}</version>
<scope>test</scope>
</dependency>
{{^disableMultipart}}
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-extension-providers</artifactId>
<version>${cxf.rt.rs.extension.providers.version}</version>
</dependency>
{{/disableMultipart}}

{{#jsonb}}
<dependency>
<groupId>jakarta.json.bind</groupId>
Expand Down Expand Up @@ -227,7 +221,6 @@
{{#useBeanValidation}}
<beanvalidation.version>3.0.2</beanvalidation.version>
{{/useBeanValidation}}
<cxf.version>3.2.7</cxf.version>
<jackson.jaxrs.version>2.17.1</jackson.jaxrs.version>
{{#jackson}}
<jackson.version>2.17.1</jackson.version>
Expand All @@ -241,11 +234,10 @@
<microprofile.rest.client.api.version>{{microprofileRestClientVersion}}</microprofile.rest.client.api.version>
<smallrye.rest.client.version>1.2.1</smallrye.rest.client.version>
<smallrye.config.version>1.3.5</smallrye.config.version>
<cxf.rt.rs.extension.providers.version>3.2.6</cxf.rt.rs.extension.providers.version>
<jaxb.core.version>2.2.11</jaxb.core.version>
<jaxb.impl.version>2.2.11</jaxb.impl.version>
<hibernate.validator.version>5.2.2.Final</hibernate.validator.version>
<jandex.maven.plugin.version>1.1.0</jandex.maven.plugin.version>
<jandex.maven.plugin.version>3.2.7</jandex.maven.plugin.version>
<maven.failsafe.plugin.version>2.6</maven.failsafe.plugin.version>
<build.helper.maven.plugin.version>1.9.1</build.helper.maven.plugin.version>
{{#microprofileMutiny}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<sourceDirectory>src/main/java</sourceDirectory>
<plugins>
<plugin>
<groupId>org.jboss.jandex</groupId>
<groupId>io.smallrye</groupId>
<artifactId>jandex-maven-plugin</artifactId>
<version>${jandex.maven.plugin.version}</version>
<executions>
Expand Down Expand Up @@ -101,13 +101,7 @@
<scope>test</scope>
</dependency>

{{^disableMultipart}}
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-extension-providers</artifactId>
<version>${cxf.rt.rs.extension.providers.version}</version>
</dependency>
{{/disableMultipart}}

{{#jsonb}}
<dependency>
<groupId>jakarta.json.bind</groupId>
Expand Down Expand Up @@ -245,7 +239,7 @@
<jaxb.core.version>3.0.2</jaxb.core.version>
<jaxb.impl.version>3.0.2</jaxb.impl.version>
<hibernate.validator.version>7.0.4.Final</hibernate.validator.version>
<jandex.maven.plugin.version>1.1.0</jandex.maven.plugin.version>
<jandex.maven.plugin.version>3.2.7</jandex.maven.plugin.version>
<maven.failsafe.plugin.version>2.6</maven.failsafe.plugin.version>
<build.helper.maven.plugin.version>1.9.1</build.helper.maven.plugin.version>
{{#microprofileMutiny}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<sourceDirectory>src/main/java</sourceDirectory>
<plugins>
<plugin>
<groupId>org.jboss.jandex</groupId>
<groupId>io.smallrye</groupId>
<artifactId>jandex-maven-plugin</artifactId>
<version>${jandex.maven.plugin.version}</version>
<executions>
Expand Down Expand Up @@ -90,11 +90,7 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-extension-providers</artifactId>
<version>${cxf.rt.rs.extension.providers.version}</version>
</dependency>

<!-- JSON processing: jackson -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
Expand Down Expand Up @@ -168,7 +164,7 @@
<jaxb.core.version>3.0.2</jaxb.core.version>
<jaxb.impl.version>3.0.2</jaxb.impl.version>
<hibernate.validator.version>7.0.4.Final</hibernate.validator.version>
<jandex.maven.plugin.version>1.1.0</jandex.maven.plugin.version>
<jandex.maven.plugin.version>3.2.7</jandex.maven.plugin.version>
<maven.failsafe.plugin.version>2.6</maven.failsafe.plugin.version>
<build.helper.maven.plugin.version>1.9.1</build.helper.maven.plugin.version>
<mutiny.version>1.10.0</mutiny.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@
import jakarta.ws.rs.*;
import jakarta.ws.rs.core.Response;
import jakarta.ws.rs.core.MediaType;
import org.apache.cxf.jaxrs.ext.multipart.*;

import io.smallrye.mutiny.Uni;


import org.eclipse.microprofile.rest.client.annotation.RegisterProvider;
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;


/**
* OpenAPI Petstore
*
Expand Down Expand Up @@ -121,7 +122,7 @@ public interface PetApi {
@POST
@Path("/{petId}")
@Consumes({ "application/x-www-form-urlencoded" })
Uni<Void> updatePetWithForm(@PathParam("petId") Long petId, @Multipart(value = "name", required = false) String name, @Multipart(value = "status", required = false) String status) throws ApiException, ProcessingException;
Uni<Void> updatePetWithForm(@PathParam("petId") Long petId, @FormParam("name") String name, @FormParam("status") String status) throws ApiException, ProcessingException;

/**
* uploads an image
Expand All @@ -133,5 +134,5 @@ public interface PetApi {
@Path("/{petId}/uploadImage")
@Consumes({ "multipart/form-data" })
@Produces({ "application/json" })
Uni<ModelApiResponse> uploadFile(@PathParam("petId") Long petId, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata, @Multipart(value = "file" , required = false) Attachment _fileDetail) throws ApiException, ProcessingException;
Uni<ModelApiResponse> uploadFile(@PathParam("petId") Long petId, @FormParam("additionalMetadata") String additionalMetadata, @FormParam("file") File _fileDetail) throws ApiException, ProcessingException;
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@
import jakarta.ws.rs.*;
import jakarta.ws.rs.core.Response;
import jakarta.ws.rs.core.MediaType;
import org.apache.cxf.jaxrs.ext.multipart.*;

import io.smallrye.mutiny.Uni;


import org.eclipse.microprofile.rest.client.annotation.RegisterProvider;
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;


/**
* OpenAPI Petstore
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@
import jakarta.ws.rs.*;
import jakarta.ws.rs.core.Response;
import jakarta.ws.rs.core.MediaType;
import org.apache.cxf.jaxrs.ext.multipart.*;

import io.smallrye.mutiny.Uni;


import org.eclipse.microprofile.rest.client.annotation.RegisterProvider;
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;


/**
* OpenAPI Petstore
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
Expand Down Expand Up @@ -188,7 +188,7 @@ public void uploadFileTest() {
// TODO: test validations
Long petId = null;
String additionalMetadata = null;
org.apache.cxf.jaxrs.ext.multipart.Attachment _file = null;
File _file = null;
//Uni<ModelApiResponse> response = api.uploadFile(petId, additionalMetadata, _file);
//Assertions.assertNotNull(response);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<sourceDirectory>src/main/java</sourceDirectory>
<plugins>
<plugin>
<groupId>org.jboss.jandex</groupId>
<groupId>io.smallrye</groupId>
<artifactId>jandex-maven-plugin</artifactId>
<version>${jandex.maven.plugin.version}</version>
<executions>
Expand Down Expand Up @@ -90,11 +90,7 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-extension-providers</artifactId>
<version>${cxf.rt.rs.extension.providers.version}</version>
</dependency>

<!-- JSON processing: jackson -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
Expand Down Expand Up @@ -174,7 +170,7 @@
<jaxb.core.version>3.0.2</jaxb.core.version>
<jaxb.impl.version>3.0.2</jaxb.impl.version>
<hibernate.validator.version>7.0.4.Final</hibernate.validator.version>
<jandex.maven.plugin.version>1.1.0</jandex.maven.plugin.version>
<jandex.maven.plugin.version>3.2.7</jandex.maven.plugin.version>
<maven.failsafe.plugin.version>2.6</maven.failsafe.plugin.version>
<build.helper.maven.plugin.version>1.9.1</build.helper.maven.plugin.version>
</properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@
import jakarta.ws.rs.*;
import jakarta.ws.rs.core.Response;
import jakarta.ws.rs.core.MediaType;
import org.apache.cxf.jaxrs.ext.multipart.*;



import org.eclipse.microprofile.rest.client.annotation.RegisterProvider;
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;


/**
* OpenAPI Petstore
*
Expand Down Expand Up @@ -120,7 +121,7 @@ public interface PetApi {
@POST
@Path("/{petId}")
@Consumes({ "application/x-www-form-urlencoded" })
void updatePetWithForm(@PathParam("petId") Long petId, @Multipart(value = "name", required = false) String name, @Multipart(value = "status", required = false) String status) throws ApiException, ProcessingException;
void updatePetWithForm(@PathParam("petId") Long petId, @FormParam("name") String name, @FormParam("status") String status) throws ApiException, ProcessingException;

/**
* uploads an image
Expand All @@ -132,5 +133,5 @@ public interface PetApi {
@Path("/{petId}/uploadImage")
@Consumes({ "multipart/form-data" })
@Produces({ "application/json" })
ModelApiResponse uploadFile(@PathParam("petId") Long petId, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata, @Multipart(value = "file" , required = false) Attachment _fileDetail) throws ApiException, ProcessingException;
ModelApiResponse uploadFile(@PathParam("petId") Long petId, @FormParam("additionalMetadata") String additionalMetadata, @FormParam("file") File _fileDetail) throws ApiException, ProcessingException;
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@
import jakarta.ws.rs.*;
import jakarta.ws.rs.core.Response;
import jakarta.ws.rs.core.MediaType;
import org.apache.cxf.jaxrs.ext.multipart.*;



import org.eclipse.microprofile.rest.client.annotation.RegisterProvider;
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;


/**
* OpenAPI Petstore
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@
import jakarta.ws.rs.*;
import jakarta.ws.rs.core.Response;
import jakarta.ws.rs.core.MediaType;
import org.apache.cxf.jaxrs.ext.multipart.*;



import org.eclipse.microprofile.rest.client.annotation.RegisterProvider;
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;


/**
* OpenAPI Petstore
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ public void uploadFileTest() {
// TODO: test validations
Long petId = null;
String additionalMetadata = null;
org.apache.cxf.jaxrs.ext.multipart.Attachment _file = null;
File _file = null;
//ModelApiResponse response = api.uploadFile(petId, additionalMetadata, _file);
//Assertions.assertNotNull(response);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<sourceDirectory>src/main/java</sourceDirectory>
<plugins>
<plugin>
<groupId>org.jboss.jandex</groupId>
<groupId>io.smallrye</groupId>
<artifactId>jandex-maven-plugin</artifactId>
<version>${jandex.maven.plugin.version}</version>
<executions>
Expand Down Expand Up @@ -90,11 +90,7 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-extension-providers</artifactId>
<version>${cxf.rt.rs.extension.providers.version}</version>
</dependency>

<!-- JSON processing: jackson -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
Expand Down Expand Up @@ -169,7 +165,7 @@
<jaxb.core.version>3.0.2</jaxb.core.version>
<jaxb.impl.version>3.0.2</jaxb.impl.version>
<hibernate.validator.version>7.0.4.Final</hibernate.validator.version>
<jandex.maven.plugin.version>1.1.0</jandex.maven.plugin.version>
<jandex.maven.plugin.version>3.2.7</jandex.maven.plugin.version>
<maven.failsafe.plugin.version>2.6</maven.failsafe.plugin.version>
<build.helper.maven.plugin.version>1.9.1</build.helper.maven.plugin.version>
<commons.lang3.version>3.17.0</commons.lang3.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@
import jakarta.ws.rs.*;
import jakarta.ws.rs.core.Response;
import jakarta.ws.rs.core.MediaType;
import org.apache.cxf.jaxrs.ext.multipart.*;



import org.eclipse.microprofile.rest.client.annotation.RegisterProvider;
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;


/**
* OpenAPI Petstore
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@
import jakarta.ws.rs.*;
import jakarta.ws.rs.core.Response;
import jakarta.ws.rs.core.MediaType;
import org.apache.cxf.jaxrs.ext.multipart.*;



import org.eclipse.microprofile.rest.client.annotation.RegisterProvider;
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;


/**
* OpenAPI Petstore
*
Expand Down
Loading
Loading