diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/LocalDateProvider.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/LocalDateProvider.mustache deleted file mode 100644 index a3c2679abccb..000000000000 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/LocalDateProvider.mustache +++ /dev/null @@ -1,44 +0,0 @@ -package {{apiPackage}}; - -import com.sun.jersey.core.spi.component.ComponentContext; -import com.sun.jersey.spi.inject.Injectable; -import com.sun.jersey.spi.inject.PerRequestTypeInjectableProvider; - -import {{javaxPackage}}.ws.rs.QueryParam; -import {{javaxPackage}}.ws.rs.WebApplicationException; -import {{javaxPackage}}.ws.rs.core.Context; -import {{javaxPackage}}.ws.rs.core.Response; -import {{javaxPackage}}.ws.rs.core.Response.Status; -import {{javaxPackage}}.ws.rs.core.UriInfo; -import {{javaxPackage}}.ws.rs.ext.Provider; -import java.time.LocalDate; -import java.util.List; - -@Provider -public class LocalDateProvider extends PerRequestTypeInjectableProvider { - private final UriInfo uriInfo; - - public LocalDateProvider(@Context UriInfo uriInfo) { - super(LocalDate.class); - this.uriInfo = uriInfo; - } - - @Override - public Injectable getInjectable(final ComponentContext cc, final QueryParam a) { - return new Injectable() { - @Override - public LocalDate getValue() { - final List values = uriInfo.getQueryParameters().get(a.value()); - - if (values == null || values.isEmpty()) - return null; - if (values.size() > 1) { - throw new WebApplicationException(Response.status(Status.BAD_REQUEST). - entity(a.value() + " cannot contain multiple values").build()); - } - - return LocalDate.parse(values.get(0)); - } - }; - } -} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/OffsetDateTimeProvider.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/OffsetDateTimeProvider.mustache deleted file mode 100644 index e3866677f43b..000000000000 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/OffsetDateTimeProvider.mustache +++ /dev/null @@ -1,44 +0,0 @@ -package {{apiPackage}}; - -import com.sun.jersey.core.spi.component.ComponentContext; -import com.sun.jersey.spi.inject.Injectable; -import com.sun.jersey.spi.inject.PerRequestTypeInjectableProvider; - -import {{javaxPackage}}.ws.rs.QueryParam; -import {{javaxPackage}}.ws.rs.WebApplicationException; -import {{javaxPackage}}.ws.rs.core.Context; -import {{javaxPackage}}.ws.rs.core.Response; -import {{javaxPackage}}.ws.rs.core.Response.Status; -import {{javaxPackage}}.ws.rs.core.UriInfo; -import {{javaxPackage}}.ws.rs.ext.Provider; -import java.time.OffsetDateTime; -import java.util.List; - -@Provider -public class OffsetDateTimeProvider extends PerRequestTypeInjectableProvider { - private final UriInfo uriInfo; - - public OffsetDateTimeProvider(@Context UriInfo uriInfo) { - super(OffsetDateTime.class); - this.uriInfo = uriInfo; - } - - @Override - public Injectable getInjectable(final ComponentContext cc, final QueryParam a) { - return new Injectable() { - @Override - public OffsetDateTime getValue() { - final List values = uriInfo.getQueryParameters().get(a.value()); - - if (values == null || values.isEmpty()) - return null; - if (values.size() > 1) { - throw new WebApplicationException(Response.status(Status.BAD_REQUEST). - entity(a.value() + " cannot contain multiple values").build()); - } - - return OffsetDateTime.parse(values.get(0)); - } - }; - } -} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/api.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/api.mustache deleted file mode 100644 index 12bdd7986e9f..000000000000 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/api.mustache +++ /dev/null @@ -1,69 +0,0 @@ -package {{package}}; - -import {{modelPackage}}.*; -import {{package}}.{{classname}}Service; -import {{package}}.factories.{{classname}}ServiceFactory; - -import io.swagger.annotations.ApiParam; -import io.swagger.jaxrs.*; - -{{#imports}}import {{import}}; -{{/imports}} - -import java.util.Map; -import java.util.List; -import {{package}}.NotFoundException; - -import java.io.InputStream; - -import com.sun.jersey.multipart.FormDataParam; -import com.sun.jersey.multipart.FormDataBodyPart; - -import {{javaxPackage}}.ws.rs.core.Context; -import {{javaxPackage}}.ws.rs.core.Response; -import {{javaxPackage}}.ws.rs.core.SecurityContext; -import {{javaxPackage}}.ws.rs.*; -{{#useBeanValidation}} -import {{javaxPackage}}.validation.constraints.*; -import {{javaxPackage}}.validation.Valid; -{{/useBeanValidation}} - -@Path("{{commonPath}}") -{{#hasConsumes}}@Consumes({ {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} }){{/hasConsumes}} -{{#hasProduces}}@Produces({ {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} }){{/hasProduces}} -@io.swagger.annotations.Api(description = "the {{{baseName}}} API") -{{>generatedAnnotation}} -{{#operations}} -public class {{classname}} { - private final {{classname}}Service delegate = {{classname}}ServiceFactory.get{{classname}}(); - -{{#operation}} - @{{httpMethod}} - {{#subresourceOperation}}@Path("{{{path}}}"){{/subresourceOperation}} - {{#hasConsumes}}@Consumes({ {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} }){{/hasConsumes}} - {{#hasProduces}}@Produces({ {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} }){{/hasProduces}} - @io.swagger.annotations.ApiOperation(value = "{{{summary}}}", notes = "{{{notes}}}", response = {{{returnBaseType}}}.class{{#returnContainer}}, responseContainer = "{{{.}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = { - {{#authMethods}}@io.swagger.annotations.Authorization(value = "{{name}}"{{#isOAuth}}, scopes = { - {{#scopes}}@io.swagger.annotations.AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{^-last}}, - {{/-last}}{{/scopes}} - }{{/isOAuth}}){{^-last}}, - {{/-last}}{{/authMethods}} - }{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}"{{^-last}}, {{/-last}}{{/vendorExtensions.x-tags}} }) - {{#implicitHeadersParams.0}} - @io.swagger.annotations.ApiImplicitParams({ - {{#implicitHeadersParams}} - @io.swagger.annotations.ApiImplicitParam(name = "{{{baseName}}}", value = "{{{description}}}", {{#required}}required = true,{{/required}} dataType = "{{{dataType}}}", paramType = "header"){{^-last}},{{/-last}} - {{/implicitHeadersParams}} - }) - {{/implicitHeadersParams.0}} - @io.swagger.annotations.ApiResponses(value = { {{#responses}} - @io.swagger.annotations.ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}){{^-last}},{{/-last}}{{/responses}} }) - public Response {{nickname}}( - {{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}, - {{/allParams}}@Context SecurityContext securityContext) - throws NotFoundException { - return delegate.{{nickname}}({{#allParams}}{{#isFile}}{{paramName}}Bodypart{{/isFile}}{{^isFile}}{{paramName}}{{/isFile}},{{/allParams}}securityContext); - } -{{/operation}} -} -{{/operations}} diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/apiService.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/apiService.mustache deleted file mode 100644 index fb0e53912631..000000000000 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/apiService.mustache +++ /dev/null @@ -1,33 +0,0 @@ -package {{package}}; - -import {{package}}.*; -import {{modelPackage}}.*; - -import com.sun.jersey.multipart.FormDataParam; - -{{#imports}}import {{import}}; -{{/imports}} - -import java.util.List; -import {{package}}.NotFoundException; - -import java.io.InputStream; - -import com.sun.jersey.multipart.FormDataParam; -import com.sun.jersey.multipart.FormDataBodyPart; - -import {{javaxPackage}}.ws.rs.core.Response; -import {{javaxPackage}}.ws.rs.core.SecurityContext; -{{#useBeanValidation}} -import {{javaxPackage}}.validation.constraints.*; -import {{javaxPackage}}.validation.Valid; -{{/useBeanValidation}} -{{>generatedAnnotation}} -{{#operations}} -public abstract class {{classname}}Service { - {{#operation}} - public abstract Response {{nickname}}({{#allParams}}{{>serviceQueryParams}}{{>servicePathParams}}{{>serviceHeaderParams}}{{>serviceBodyParams}}{{>serviceFormParams}},{{/allParams}}SecurityContext securityContext) - throws NotFoundException; - {{/operation}} -} -{{/operations}} diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/apiServiceImpl.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/apiServiceImpl.mustache deleted file mode 100644 index 145e7fcf93cc..000000000000 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/apiServiceImpl.mustache +++ /dev/null @@ -1,37 +0,0 @@ -package {{package}}.impl; - -import {{package}}.*; -import {{modelPackage}}.*; - -import com.sun.jersey.multipart.FormDataParam; - -{{#imports}}import {{import}}; -{{/imports}} - -import java.util.List; -import {{package}}.NotFoundException; - -import java.io.InputStream; - -import com.sun.jersey.multipart.FormDataParam; -import com.sun.jersey.multipart.FormDataBodyPart; - -import {{javaxPackage}}.ws.rs.core.Response; -import {{javaxPackage}}.ws.rs.core.SecurityContext; -{{#useBeanValidation}} -import {{javaxPackage}}.validation.constraints.*; -import {{javaxPackage}}.validation.Valid; -{{/useBeanValidation}} -{{>generatedAnnotation}} -{{#operations}} -public class {{classname}}ServiceImpl extends {{classname}}Service { - {{#operation}} - @Override - public Response {{nickname}}({{#allParams}}{{>serviceQueryParams}}{{>servicePathParams}}{{>serviceHeaderParams}}{{>serviceBodyParams}}{{>serviceFormParams}}, {{/allParams}}SecurityContext securityContext) - throws NotFoundException { - // do some magic! - return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); - } - {{/operation}} -} -{{/operations}} diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/formParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/formParams.mustache deleted file mode 100644 index 1ac5c8f37a97..000000000000 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/formParams.mustache +++ /dev/null @@ -1 +0,0 @@ -{{#isFormParam}}{{^isFile}}{{^vendorExtensions.x-multipart}}@ApiParam(value = "{{{description}}}"{{#required}}, required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{.}}}"{{/defaultValue}}){{/vendorExtensions.x-multipart}}{{#vendorExtensions.x-multipart}}@FormDataParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/vendorExtensions.x-multipart}}{{^vendorExtensions.x-multipart}} {{#defaultValue}} @DefaultValue("{{{.}}}"){{/defaultValue}} @FormParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/vendorExtensions.x-multipart}}{{/isFile}}{{#isFile}}{{^isArray}}@FormDataParam("{{baseName}}") FormDataBodyPart {{paramName}}Bodypart{{/isArray}}{{#isArray}}@FormDataParam("{{baseName}}") List {{paramName}}Bodypart{{/isArray}}{{/isFile}}{{/isFormParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/pom.mustache deleted file mode 100644 index 076e126f0de7..000000000000 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/pom.mustache +++ /dev/null @@ -1,234 +0,0 @@ - - 4.0.0 - {{groupId}} - {{artifactId}} - jar - {{artifactId}} - {{artifactVersion}} - -{{#parentOverridden}} - - {{parentGroupId}} - {{parentArtifactId}} - {{parentVersion}} - -{{/parentOverridden}} - - - src/main/java - - - org.apache.maven.plugins - maven-war-plugin - 3.1.0 - - - maven-failsafe-plugin - 2.6 - - - - integration-test - verify - - - - - - org.eclipse.jetty - jetty-maven-plugin - ${jetty-version} - - - / - - target/${project.artifactId}-${project.version} - 8079 - stopit - 10 - - {{serverPort}} - 60000 - - -{{#useBeanValidation}} - - - jakarta.validation - jakarta.validation-api - ${beanvalidation-version} - - -{{/useBeanValidation}} - - - start-jetty - pre-integration-test - - start - - - 0 - true - - - - stop-jetty - post-integration-test - - stop - - - - - - org.codehaus.mojo - build-helper-maven-plugin - 1.9.1 - - - add-source - generate-sources - - add-source - - - - src/gen/java - - - - - - - - - - io.swagger - swagger-jersey-jaxrs - ${swagger-core-version} - - - org.slf4j - slf4j-log4j12 - ${slf4j-version} - - - com.sun.jersey - jersey-core - ${jersey-version} - - - com.sun.jersey - jersey-json - ${jersey-version} - - - com.sun.jersey - jersey-servlet - ${jersey-version} - - - com.sun.jersey.contribs - jersey-multipart - ${jersey-version} - - - com.sun.jersey - jersey-server - ${jersey-version} - - - jakarta.servlet - jakarta.servlet-api - ${servlet-api-version} - - - jakarta.annotation - jakarta.annotation-api - ${annotation-api-version} - - - junit - junit - ${junit-version} - test - - - com.sun.jersey - jersey-client - ${jersey-version} - test - - - com.fasterxml.jackson.datatype - jackson-datatype-joda - ${jackson-version} - - - com.fasterxml.jackson.jaxrs - jackson-jaxrs-json-provider - ${jackson-version} - - - com.fasterxml.jackson.datatype - jackson-datatype-jsr310 - ${jackson-version} - - - org.testng - testng - 6.8.8 - test - - - junit - junit - - - snakeyaml - org.yaml - - - bsh - org.beanshell - - - -{{#useBeanValidation}} - - - jakarta.validation - jakarta.validation-api - ${beanvalidation-version} - provided - -{{/useBeanValidation}} - - - - sonatype-snapshots - https://oss.sonatype.org/content/repositories/snapshots - - true - - - - - 1.8 - ${java.version} - ${java.version} - 1.5.22 -{{#useBeanValidation}} - 2.0.2 -{{/useBeanValidation}} - 9.2.9.v20150224 - 1.19.1 - 2.15.2 - 1.7.21 - 4.13.2 - 4.0.4 - UTF-8 - 1.3.5 - - diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/project/build.properties b/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/project/build.properties deleted file mode 100644 index a8c2f849be3c..000000000000 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/project/build.properties +++ /dev/null @@ -1 +0,0 @@ -sbt.version=0.12.0 diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/project/plugins.sbt b/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/project/plugins.sbt deleted file mode 100644 index 713b7f3e9935..000000000000 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/project/plugins.sbt +++ /dev/null @@ -1,9 +0,0 @@ -addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.8.4") - -libraryDependencies <+= sbtVersion(v => v match { - case "0.11.0" => "com.github.siasia" %% "xsbt-web-plugin" % "0.11.0-0.2.8" - case "0.11.1" => "com.github.siasia" %% "xsbt-web-plugin" % "0.11.1-0.2.10" - case "0.11.2" => "com.github.siasia" %% "xsbt-web-plugin" % "0.11.2-0.2.11" - case "0.11.3" => "com.github.siasia" %% "xsbt-web-plugin" % "0.11.3-0.2.11.1" - case x if (x.startsWith("0.12")) => "com.github.siasia" %% "xsbt-web-plugin" % "0.12.0-0.2.11.1" -}) \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/web.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/web.mustache deleted file mode 100644 index 2c859d04eb11..000000000000 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/web.mustache +++ /dev/null @@ -1,54 +0,0 @@ - - - - - jersey - com.sun.jersey.spi.container.servlet.ServletContainer - - com.sun.jersey.config.property.packages - io.swagger.jaxrs.json;io.swagger.jaxrs.listing;{{apiPackage}} - - - com.sun.jersey.spi.container.ContainerRequestFilters - com.sun.jersey.api.container.filter.PostReplaceFilter - - - com.sun.jersey.api.json.POJOMappingFeature - true - - 1 - - - - DefaultJaxrsConfig - io.swagger.jaxrs.config.DefaultJaxrsConfig - - api.version - 1.0.0 - - - swagger.api.title - {{{title}}} - - - swagger.api.basepath - {{{basePath}}} - - 2 - - - - jersey - {{contextPath}}/* - - - ApiOriginFilter - {{apiPackage}}.ApiOriginFilter - - - ApiOriginFilter - /* - -