diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/apiService.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/apiService.mustache index 910ad5df8bb2..72e24c58c53b 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/apiService.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/apiService.mustache @@ -2,21 +2,34 @@ package {{package}}; import {{package}}.*; import {{modelPackage}}.*; -{{#operations}}{{#operation}}{{#isMultipart}}import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput; -{{/isMultipart}}{{/operation}}{{/operations}} +{{#vendorExtensions.x-enable-mcp-server}} +import io.quarkiverse.mcp.server.Tool; +import io.quarkiverse.mcp.server.ToolArg; +import jakarta.enterprise.context.ApplicationScoped; +import lombok.AllArgsConstructor; +{{/vendorExtensions.x-enable-mcp-server}} -{{#imports}}import {{import}}; +{{#operations}} +{{#operation}} +{{#isMultipart}} +import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput; +{{/isMultipart}} +{{/operation}} +{{/operations}} + +{{#imports}} +import {{import}}; {{/imports}} import java.util.List; import {{package}}.NotFoundException; - import java.io.InputStream; {{#useBeanValidation}} import {{javaxPackage}}.validation.constraints.*; import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} + import {{javaxPackage}}.ws.rs.core.Response; import {{javaxPackage}}.ws.rs.core.SecurityContext; @@ -24,9 +37,55 @@ import {{javaxPackage}}.ws.rs.core.SecurityContext; {{#operations}} public interface {{classname}}Service { - {{#operation}} - Response {{nickname}}({{#isMultipart}}MultipartFormDataInput input,{{/isMultipart}}{{#allParams}}{{>serviceQueryParams}}{{>servicePathParams}}{{>serviceHeaderParams}}{{>serviceBodyParams}}{{^isMultipart}}{{>serviceFormParams}},{{/isMultipart}}{{#isMultipart}}{{^isFormParam}},{{/isFormParam}}{{/isMultipart}}{{/allParams}}SecurityContext securityContext) - throws NotFoundException; - {{/operation}} + {{#operation}} + Response {{nickname}}( + {{#isMultipart}}MultipartFormDataInput input,{{/isMultipart}} + {{#allParams}} + {{>serviceQueryParams}}{{>servicePathParams}}{{>serviceHeaderParams}}{{>serviceBodyParams}}{{^isMultipart}}{{>serviceFormParams}},{{/isMultipart}}{{#isMultipart}}{{^isFormParam}},{{/isFormParam}}{{/isMultipart}} + {{/allParams}} + SecurityContext securityContext + ) throws NotFoundException; + + default Response {{nickname}}( + {{#isMultipart}}MultipartFormDataInput input,{{/isMultipart}} + {{#allParams}} + {{>serviceQueryParams}}{{>servicePathParams}}{{>serviceHeaderParams}}{{>serviceBodyParams}}{{^isMultipart}}{{>serviceFormParams}}{{^last}}, {{/last}}{{/isMultipart}}{{#isMultipart}}{{^isFormParam}}{{^last}}, {{/last}}{{/isFormParam}}{{/isMultipart}} + {{/allParams}} + String context + ) throws NotFoundException { + return {{nickname}}( + {{#isMultipart}}input,{{/isMultipart}} + {{#allParams}}{{paramName}},{{/allParams}} + (SecurityContext)null + ); + } + {{/operation}} +} +{{#vendorExtensions.x-enable-mcp-server}} +@ApplicationScoped +@AllArgsConstructor +class Mcp{{classname}}Service { + {{classname}}Service service; + + {{#operation}} + {{#vendorExtensions.x-enable-mcp-operation}} + @Tool(description = "{{summary}}") + public Response {{nickname}}( + {{#isMultipart}}MultipartFormDataInput input,{{/isMultipart}} + {{#allParams}} + @ToolArg(description = "{{description}}", required = false) + {{>serviceQueryParams}}{{>servicePathParams}}{{>serviceHeaderParams}}{{>serviceBodyParams}}{{^isMultipart}}{{>serviceFormParams}}{{^last}}, {{/last}}{{/isMultipart}}{{#isMultipart}}{{^isFormParam}}{{^last}}, {{/last}}{{/isFormParam}}{{/isMultipart}} + {{/allParams}} + String context + ) throws NotFoundException { + return service.{{nickname}}( + {{#isMultipart}}input,{{/isMultipart}} + {{#allParams}}{{paramName}},{{/allParams}} + (SecurityContext)null + ); + } + {{/vendorExtensions.x-enable-mcp-operation}} + {{/operation}} } +{{/vendorExtensions.x-enable-mcp-server}} {{/operations}} diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/PetApiService.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/PetApiService.java index 18582d0f4365..015b0ad1b557 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/PetApiService.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/PetApiService.java @@ -2,8 +2,8 @@ import org.openapitools.api.*; import org.openapitools.model.*; -import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput; +import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput; import java.io.File; import org.openapitools.model.ModelApiResponse; @@ -11,30 +11,158 @@ import java.util.List; import org.openapitools.api.NotFoundException; - import java.io.InputStream; import javax.validation.constraints.*; import javax.validation.Valid; + import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyServerCodegen", comments = "Generator version: 7.17.0-SNAPSHOT") public interface PetApiService { - Response addPet(Pet body,SecurityContext securityContext) - throws NotFoundException; - Response deletePet(Long petId,SecurityContext securityContext) - throws NotFoundException; - Response findPetsByStatus(List status,SecurityContext securityContext) - throws NotFoundException; - Response findPetsByTags(List tags,SecurityContext securityContext) - throws NotFoundException; - Response getPetById(Long petId,SecurityContext securityContext) - throws NotFoundException; - Response updatePet(Pet body,SecurityContext securityContext) - throws NotFoundException; - Response updatePetWithForm(Long petId,String name,String status,SecurityContext securityContext) - throws NotFoundException; - Response uploadFile(MultipartFormDataInput input,Long petId,SecurityContext securityContext) - throws NotFoundException; + Response addPet( + + Pet body, + SecurityContext securityContext + ) throws NotFoundException; + + default Response addPet( + + Pet body, + String context + ) throws NotFoundException { + return addPet( + + body, + (SecurityContext)null + ); + } + Response deletePet( + + Long petId, + SecurityContext securityContext + ) throws NotFoundException; + + default Response deletePet( + + Long petId, + String context + ) throws NotFoundException { + return deletePet( + + petId, + (SecurityContext)null + ); + } + Response findPetsByStatus( + + List status, + SecurityContext securityContext + ) throws NotFoundException; + + default Response findPetsByStatus( + + List status, + String context + ) throws NotFoundException { + return findPetsByStatus( + + status, + (SecurityContext)null + ); + } + Response findPetsByTags( + + List tags, + SecurityContext securityContext + ) throws NotFoundException; + + default Response findPetsByTags( + + List tags, + String context + ) throws NotFoundException { + return findPetsByTags( + + tags, + (SecurityContext)null + ); + } + Response getPetById( + + Long petId, + SecurityContext securityContext + ) throws NotFoundException; + + default Response getPetById( + + Long petId, + String context + ) throws NotFoundException { + return getPetById( + + petId, + (SecurityContext)null + ); + } + Response updatePet( + + Pet body, + SecurityContext securityContext + ) throws NotFoundException; + + default Response updatePet( + + Pet body, + String context + ) throws NotFoundException { + return updatePet( + + body, + (SecurityContext)null + ); + } + Response updatePetWithForm( + + Long petId, + String name, + String status, + SecurityContext securityContext + ) throws NotFoundException; + + default Response updatePetWithForm( + + Long petId, + String name, + String status, + String context + ) throws NotFoundException { + return updatePetWithForm( + + petId,name,status, + (SecurityContext)null + ); + } + Response uploadFile( + MultipartFormDataInput input, + Long petId, + + + SecurityContext securityContext + ) throws NotFoundException; + + default Response uploadFile( + MultipartFormDataInput input, + Long petId, + + + String context + ) throws NotFoundException { + return uploadFile( + input, + petId,additionalMetadata,_file, + (SecurityContext)null + ); + } } diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/StoreApiService.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/StoreApiService.java index 272a640d7461..26be6b361b1f 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/StoreApiService.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/StoreApiService.java @@ -9,22 +9,80 @@ import java.util.List; import org.openapitools.api.NotFoundException; - import java.io.InputStream; import javax.validation.constraints.*; import javax.validation.Valid; + import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyServerCodegen", comments = "Generator version: 7.17.0-SNAPSHOT") public interface StoreApiService { - Response deleteOrder(String orderId,SecurityContext securityContext) - throws NotFoundException; - Response getInventory(SecurityContext securityContext) - throws NotFoundException; - Response getOrderById(Long orderId,SecurityContext securityContext) - throws NotFoundException; - Response placeOrder(Order body,SecurityContext securityContext) - throws NotFoundException; + Response deleteOrder( + + String orderId, + SecurityContext securityContext + ) throws NotFoundException; + + default Response deleteOrder( + + String orderId, + String context + ) throws NotFoundException { + return deleteOrder( + + orderId, + (SecurityContext)null + ); + } + Response getInventory( + + SecurityContext securityContext + ) throws NotFoundException; + + default Response getInventory( + + String context + ) throws NotFoundException { + return getInventory( + + + (SecurityContext)null + ); + } + Response getOrderById( + + Long orderId, + SecurityContext securityContext + ) throws NotFoundException; + + default Response getOrderById( + + Long orderId, + String context + ) throws NotFoundException { + return getOrderById( + + orderId, + (SecurityContext)null + ); + } + Response placeOrder( + + Order body, + SecurityContext securityContext + ) throws NotFoundException; + + default Response placeOrder( + + Order body, + String context + ) throws NotFoundException { + return placeOrder( + + body, + (SecurityContext)null + ); + } } diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/UserApiService.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/UserApiService.java index 67e6e5d8870e..0720a37ee3e0 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/UserApiService.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/UserApiService.java @@ -9,30 +9,152 @@ import java.util.List; import org.openapitools.api.NotFoundException; - import java.io.InputStream; import javax.validation.constraints.*; import javax.validation.Valid; + import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyServerCodegen", comments = "Generator version: 7.17.0-SNAPSHOT") public interface UserApiService { - Response createUser(User body,SecurityContext securityContext) - throws NotFoundException; - Response createUsersWithArrayInput(List<@Valid User> body,SecurityContext securityContext) - throws NotFoundException; - Response createUsersWithListInput(List<@Valid User> body,SecurityContext securityContext) - throws NotFoundException; - Response deleteUser(String username,SecurityContext securityContext) - throws NotFoundException; - Response getUserByName(String username,SecurityContext securityContext) - throws NotFoundException; - Response loginUser(String username,String password,SecurityContext securityContext) - throws NotFoundException; - Response logoutUser(SecurityContext securityContext) - throws NotFoundException; - Response updateUser(String username,User body,SecurityContext securityContext) - throws NotFoundException; + Response createUser( + + User body, + SecurityContext securityContext + ) throws NotFoundException; + + default Response createUser( + + User body, + String context + ) throws NotFoundException { + return createUser( + + body, + (SecurityContext)null + ); + } + Response createUsersWithArrayInput( + + List<@Valid User> body, + SecurityContext securityContext + ) throws NotFoundException; + + default Response createUsersWithArrayInput( + + List<@Valid User> body, + String context + ) throws NotFoundException { + return createUsersWithArrayInput( + + body, + (SecurityContext)null + ); + } + Response createUsersWithListInput( + + List<@Valid User> body, + SecurityContext securityContext + ) throws NotFoundException; + + default Response createUsersWithListInput( + + List<@Valid User> body, + String context + ) throws NotFoundException { + return createUsersWithListInput( + + body, + (SecurityContext)null + ); + } + Response deleteUser( + + String username, + SecurityContext securityContext + ) throws NotFoundException; + + default Response deleteUser( + + String username, + String context + ) throws NotFoundException { + return deleteUser( + + username, + (SecurityContext)null + ); + } + Response getUserByName( + + String username, + SecurityContext securityContext + ) throws NotFoundException; + + default Response getUserByName( + + String username, + String context + ) throws NotFoundException { + return getUserByName( + + username, + (SecurityContext)null + ); + } + Response loginUser( + + String username, + String password, + SecurityContext securityContext + ) throws NotFoundException; + + default Response loginUser( + + String username, + String password, + String context + ) throws NotFoundException { + return loginUser( + + username,password, + (SecurityContext)null + ); + } + Response logoutUser( + + SecurityContext securityContext + ) throws NotFoundException; + + default Response logoutUser( + + String context + ) throws NotFoundException { + return logoutUser( + + + (SecurityContext)null + ); + } + Response updateUser( + + String username, + User body, + SecurityContext securityContext + ) throws NotFoundException; + + default Response updateUser( + + String username, + User body, + String context + ) throws NotFoundException { + return updateUser( + + username,body, + (SecurityContext)null + ); + } } diff --git a/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/api/PetApiService.java b/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/api/PetApiService.java index c73f3eafa704..a69cee54278d 100644 --- a/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/api/PetApiService.java +++ b/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/api/PetApiService.java @@ -2,8 +2,8 @@ import org.openapitools.api.*; import org.openapitools.model.*; -import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput; +import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput; import java.io.File; import org.openapitools.model.ModelApiResponse; @@ -11,30 +11,160 @@ import java.util.List; import org.openapitools.api.NotFoundException; - import java.io.InputStream; import javax.validation.constraints.*; import javax.validation.Valid; + import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyServerCodegen", comments = "Generator version: 7.17.0-SNAPSHOT") public interface PetApiService { - Response addPet(Pet body,SecurityContext securityContext) - throws NotFoundException; - Response deletePet(Long petId,String apiKey,SecurityContext securityContext) - throws NotFoundException; - Response findPetsByStatus(List status,SecurityContext securityContext) - throws NotFoundException; - Response findPetsByTags(List tags,SecurityContext securityContext) - throws NotFoundException; - Response getPetById(Long petId,SecurityContext securityContext) - throws NotFoundException; - Response updatePet(Pet body,SecurityContext securityContext) - throws NotFoundException; - Response updatePetWithForm(Long petId,String name,String status,SecurityContext securityContext) - throws NotFoundException; - Response uploadFile(MultipartFormDataInput input,Long petId,SecurityContext securityContext) - throws NotFoundException; + Response addPet( + + Pet body, + SecurityContext securityContext + ) throws NotFoundException; + + default Response addPet( + + Pet body, + String context + ) throws NotFoundException { + return addPet( + + body, + (SecurityContext)null + ); + } + Response deletePet( + + Long petId, + String apiKey, + SecurityContext securityContext + ) throws NotFoundException; + + default Response deletePet( + + Long petId, + String apiKey, + String context + ) throws NotFoundException { + return deletePet( + + petId,apiKey, + (SecurityContext)null + ); + } + Response findPetsByStatus( + + List status, + SecurityContext securityContext + ) throws NotFoundException; + + default Response findPetsByStatus( + + List status, + String context + ) throws NotFoundException { + return findPetsByStatus( + + status, + (SecurityContext)null + ); + } + Response findPetsByTags( + + List tags, + SecurityContext securityContext + ) throws NotFoundException; + + default Response findPetsByTags( + + List tags, + String context + ) throws NotFoundException { + return findPetsByTags( + + tags, + (SecurityContext)null + ); + } + Response getPetById( + + Long petId, + SecurityContext securityContext + ) throws NotFoundException; + + default Response getPetById( + + Long petId, + String context + ) throws NotFoundException { + return getPetById( + + petId, + (SecurityContext)null + ); + } + Response updatePet( + + Pet body, + SecurityContext securityContext + ) throws NotFoundException; + + default Response updatePet( + + Pet body, + String context + ) throws NotFoundException { + return updatePet( + + body, + (SecurityContext)null + ); + } + Response updatePetWithForm( + + Long petId, + String name, + String status, + SecurityContext securityContext + ) throws NotFoundException; + + default Response updatePetWithForm( + + Long petId, + String name, + String status, + String context + ) throws NotFoundException { + return updatePetWithForm( + + petId,name,status, + (SecurityContext)null + ); + } + Response uploadFile( + MultipartFormDataInput input, + Long petId, + + + SecurityContext securityContext + ) throws NotFoundException; + + default Response uploadFile( + MultipartFormDataInput input, + Long petId, + + + String context + ) throws NotFoundException { + return uploadFile( + input, + petId,additionalMetadata,_file, + (SecurityContext)null + ); + } } diff --git a/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/api/StoreApiService.java b/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/api/StoreApiService.java index 272a640d7461..26be6b361b1f 100644 --- a/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/api/StoreApiService.java +++ b/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/api/StoreApiService.java @@ -9,22 +9,80 @@ import java.util.List; import org.openapitools.api.NotFoundException; - import java.io.InputStream; import javax.validation.constraints.*; import javax.validation.Valid; + import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyServerCodegen", comments = "Generator version: 7.17.0-SNAPSHOT") public interface StoreApiService { - Response deleteOrder(String orderId,SecurityContext securityContext) - throws NotFoundException; - Response getInventory(SecurityContext securityContext) - throws NotFoundException; - Response getOrderById(Long orderId,SecurityContext securityContext) - throws NotFoundException; - Response placeOrder(Order body,SecurityContext securityContext) - throws NotFoundException; + Response deleteOrder( + + String orderId, + SecurityContext securityContext + ) throws NotFoundException; + + default Response deleteOrder( + + String orderId, + String context + ) throws NotFoundException { + return deleteOrder( + + orderId, + (SecurityContext)null + ); + } + Response getInventory( + + SecurityContext securityContext + ) throws NotFoundException; + + default Response getInventory( + + String context + ) throws NotFoundException { + return getInventory( + + + (SecurityContext)null + ); + } + Response getOrderById( + + Long orderId, + SecurityContext securityContext + ) throws NotFoundException; + + default Response getOrderById( + + Long orderId, + String context + ) throws NotFoundException { + return getOrderById( + + orderId, + (SecurityContext)null + ); + } + Response placeOrder( + + Order body, + SecurityContext securityContext + ) throws NotFoundException; + + default Response placeOrder( + + Order body, + String context + ) throws NotFoundException { + return placeOrder( + + body, + (SecurityContext)null + ); + } } diff --git a/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/api/UserApiService.java b/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/api/UserApiService.java index 1a0ed58706cc..10cdea6aa059 100644 --- a/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/api/UserApiService.java +++ b/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/api/UserApiService.java @@ -9,30 +9,152 @@ import java.util.List; import org.openapitools.api.NotFoundException; - import java.io.InputStream; import javax.validation.constraints.*; import javax.validation.Valid; + import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyServerCodegen", comments = "Generator version: 7.17.0-SNAPSHOT") public interface UserApiService { - Response createUser(User body,SecurityContext securityContext) - throws NotFoundException; - Response createUsersWithArrayInput(List<@Valid User> body,SecurityContext securityContext) - throws NotFoundException; - Response createUsersWithListInput(List<@Valid User> body,SecurityContext securityContext) - throws NotFoundException; - Response deleteUser(String username,SecurityContext securityContext) - throws NotFoundException; - Response getUserByName(String username,SecurityContext securityContext) - throws NotFoundException; - Response loginUser(String username,String password,SecurityContext securityContext) - throws NotFoundException; - Response logoutUser(SecurityContext securityContext) - throws NotFoundException; - Response updateUser(String username,User body,SecurityContext securityContext) - throws NotFoundException; + Response createUser( + + User body, + SecurityContext securityContext + ) throws NotFoundException; + + default Response createUser( + + User body, + String context + ) throws NotFoundException { + return createUser( + + body, + (SecurityContext)null + ); + } + Response createUsersWithArrayInput( + + List<@Valid User> body, + SecurityContext securityContext + ) throws NotFoundException; + + default Response createUsersWithArrayInput( + + List<@Valid User> body, + String context + ) throws NotFoundException { + return createUsersWithArrayInput( + + body, + (SecurityContext)null + ); + } + Response createUsersWithListInput( + + List<@Valid User> body, + SecurityContext securityContext + ) throws NotFoundException; + + default Response createUsersWithListInput( + + List<@Valid User> body, + String context + ) throws NotFoundException { + return createUsersWithListInput( + + body, + (SecurityContext)null + ); + } + Response deleteUser( + + String username, + SecurityContext securityContext + ) throws NotFoundException; + + default Response deleteUser( + + String username, + String context + ) throws NotFoundException { + return deleteUser( + + username, + (SecurityContext)null + ); + } + Response getUserByName( + + String username, + SecurityContext securityContext + ) throws NotFoundException; + + default Response getUserByName( + + String username, + String context + ) throws NotFoundException { + return getUserByName( + + username, + (SecurityContext)null + ); + } + Response loginUser( + + String username, + String password, + SecurityContext securityContext + ) throws NotFoundException; + + default Response loginUser( + + String username, + String password, + String context + ) throws NotFoundException { + return loginUser( + + username,password, + (SecurityContext)null + ); + } + Response logoutUser( + + SecurityContext securityContext + ) throws NotFoundException; + + default Response logoutUser( + + String context + ) throws NotFoundException { + return logoutUser( + + + (SecurityContext)null + ); + } + Response updateUser( + + String username, + User body, + SecurityContext securityContext + ) throws NotFoundException; + + default Response updateUser( + + String username, + User body, + String context + ) throws NotFoundException { + return updateUser( + + username,body, + (SecurityContext)null + ); + } } diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/api/PetApiService.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/api/PetApiService.java index c73f3eafa704..a69cee54278d 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/api/PetApiService.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/api/PetApiService.java @@ -2,8 +2,8 @@ import org.openapitools.api.*; import org.openapitools.model.*; -import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput; +import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput; import java.io.File; import org.openapitools.model.ModelApiResponse; @@ -11,30 +11,160 @@ import java.util.List; import org.openapitools.api.NotFoundException; - import java.io.InputStream; import javax.validation.constraints.*; import javax.validation.Valid; + import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyServerCodegen", comments = "Generator version: 7.17.0-SNAPSHOT") public interface PetApiService { - Response addPet(Pet body,SecurityContext securityContext) - throws NotFoundException; - Response deletePet(Long petId,String apiKey,SecurityContext securityContext) - throws NotFoundException; - Response findPetsByStatus(List status,SecurityContext securityContext) - throws NotFoundException; - Response findPetsByTags(List tags,SecurityContext securityContext) - throws NotFoundException; - Response getPetById(Long petId,SecurityContext securityContext) - throws NotFoundException; - Response updatePet(Pet body,SecurityContext securityContext) - throws NotFoundException; - Response updatePetWithForm(Long petId,String name,String status,SecurityContext securityContext) - throws NotFoundException; - Response uploadFile(MultipartFormDataInput input,Long petId,SecurityContext securityContext) - throws NotFoundException; + Response addPet( + + Pet body, + SecurityContext securityContext + ) throws NotFoundException; + + default Response addPet( + + Pet body, + String context + ) throws NotFoundException { + return addPet( + + body, + (SecurityContext)null + ); + } + Response deletePet( + + Long petId, + String apiKey, + SecurityContext securityContext + ) throws NotFoundException; + + default Response deletePet( + + Long petId, + String apiKey, + String context + ) throws NotFoundException { + return deletePet( + + petId,apiKey, + (SecurityContext)null + ); + } + Response findPetsByStatus( + + List status, + SecurityContext securityContext + ) throws NotFoundException; + + default Response findPetsByStatus( + + List status, + String context + ) throws NotFoundException { + return findPetsByStatus( + + status, + (SecurityContext)null + ); + } + Response findPetsByTags( + + List tags, + SecurityContext securityContext + ) throws NotFoundException; + + default Response findPetsByTags( + + List tags, + String context + ) throws NotFoundException { + return findPetsByTags( + + tags, + (SecurityContext)null + ); + } + Response getPetById( + + Long petId, + SecurityContext securityContext + ) throws NotFoundException; + + default Response getPetById( + + Long petId, + String context + ) throws NotFoundException { + return getPetById( + + petId, + (SecurityContext)null + ); + } + Response updatePet( + + Pet body, + SecurityContext securityContext + ) throws NotFoundException; + + default Response updatePet( + + Pet body, + String context + ) throws NotFoundException { + return updatePet( + + body, + (SecurityContext)null + ); + } + Response updatePetWithForm( + + Long petId, + String name, + String status, + SecurityContext securityContext + ) throws NotFoundException; + + default Response updatePetWithForm( + + Long petId, + String name, + String status, + String context + ) throws NotFoundException { + return updatePetWithForm( + + petId,name,status, + (SecurityContext)null + ); + } + Response uploadFile( + MultipartFormDataInput input, + Long petId, + + + SecurityContext securityContext + ) throws NotFoundException; + + default Response uploadFile( + MultipartFormDataInput input, + Long petId, + + + String context + ) throws NotFoundException { + return uploadFile( + input, + petId,additionalMetadata,_file, + (SecurityContext)null + ); + } } diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/api/StoreApiService.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/api/StoreApiService.java index 272a640d7461..26be6b361b1f 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/api/StoreApiService.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/api/StoreApiService.java @@ -9,22 +9,80 @@ import java.util.List; import org.openapitools.api.NotFoundException; - import java.io.InputStream; import javax.validation.constraints.*; import javax.validation.Valid; + import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyServerCodegen", comments = "Generator version: 7.17.0-SNAPSHOT") public interface StoreApiService { - Response deleteOrder(String orderId,SecurityContext securityContext) - throws NotFoundException; - Response getInventory(SecurityContext securityContext) - throws NotFoundException; - Response getOrderById(Long orderId,SecurityContext securityContext) - throws NotFoundException; - Response placeOrder(Order body,SecurityContext securityContext) - throws NotFoundException; + Response deleteOrder( + + String orderId, + SecurityContext securityContext + ) throws NotFoundException; + + default Response deleteOrder( + + String orderId, + String context + ) throws NotFoundException { + return deleteOrder( + + orderId, + (SecurityContext)null + ); + } + Response getInventory( + + SecurityContext securityContext + ) throws NotFoundException; + + default Response getInventory( + + String context + ) throws NotFoundException { + return getInventory( + + + (SecurityContext)null + ); + } + Response getOrderById( + + Long orderId, + SecurityContext securityContext + ) throws NotFoundException; + + default Response getOrderById( + + Long orderId, + String context + ) throws NotFoundException { + return getOrderById( + + orderId, + (SecurityContext)null + ); + } + Response placeOrder( + + Order body, + SecurityContext securityContext + ) throws NotFoundException; + + default Response placeOrder( + + Order body, + String context + ) throws NotFoundException { + return placeOrder( + + body, + (SecurityContext)null + ); + } } diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/api/UserApiService.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/api/UserApiService.java index e3d14ce41ea9..ce289f2988a8 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/api/UserApiService.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/api/UserApiService.java @@ -9,30 +9,152 @@ import java.util.List; import org.openapitools.api.NotFoundException; - import java.io.InputStream; import javax.validation.constraints.*; import javax.validation.Valid; + import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyServerCodegen", comments = "Generator version: 7.17.0-SNAPSHOT") public interface UserApiService { - Response createUser(User body,SecurityContext securityContext) - throws NotFoundException; - Response createUsersWithArrayInput(List<@Valid User> body,SecurityContext securityContext) - throws NotFoundException; - Response createUsersWithListInput(List<@Valid User> body,SecurityContext securityContext) - throws NotFoundException; - Response deleteUser(String username,SecurityContext securityContext) - throws NotFoundException; - Response getUserByName(String username,SecurityContext securityContext) - throws NotFoundException; - Response loginUser(String username,String password,SecurityContext securityContext) - throws NotFoundException; - Response logoutUser(SecurityContext securityContext) - throws NotFoundException; - Response updateUser(String username,User body,SecurityContext securityContext) - throws NotFoundException; + Response createUser( + + User body, + SecurityContext securityContext + ) throws NotFoundException; + + default Response createUser( + + User body, + String context + ) throws NotFoundException { + return createUser( + + body, + (SecurityContext)null + ); + } + Response createUsersWithArrayInput( + + List<@Valid User> body, + SecurityContext securityContext + ) throws NotFoundException; + + default Response createUsersWithArrayInput( + + List<@Valid User> body, + String context + ) throws NotFoundException { + return createUsersWithArrayInput( + + body, + (SecurityContext)null + ); + } + Response createUsersWithListInput( + + List<@Valid User> body, + SecurityContext securityContext + ) throws NotFoundException; + + default Response createUsersWithListInput( + + List<@Valid User> body, + String context + ) throws NotFoundException { + return createUsersWithListInput( + + body, + (SecurityContext)null + ); + } + Response deleteUser( + + String username, + SecurityContext securityContext + ) throws NotFoundException; + + default Response deleteUser( + + String username, + String context + ) throws NotFoundException { + return deleteUser( + + username, + (SecurityContext)null + ); + } + Response getUserByName( + + String username, + SecurityContext securityContext + ) throws NotFoundException; + + default Response getUserByName( + + String username, + String context + ) throws NotFoundException { + return getUserByName( + + username, + (SecurityContext)null + ); + } + Response loginUser( + + String username, + String password, + SecurityContext securityContext + ) throws NotFoundException; + + default Response loginUser( + + String username, + String password, + String context + ) throws NotFoundException { + return loginUser( + + username,password, + (SecurityContext)null + ); + } + Response logoutUser( + + SecurityContext securityContext + ) throws NotFoundException; + + default Response logoutUser( + + String context + ) throws NotFoundException { + return logoutUser( + + + (SecurityContext)null + ); + } + Response updateUser( + + String username, + User body, + SecurityContext securityContext + ) throws NotFoundException; + + default Response updateUser( + + String username, + User body, + String context + ) throws NotFoundException { + return updateUser( + + username,body, + (SecurityContext)null + ); + } }