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
2 changes: 1 addition & 1 deletion bin/jaxrs-resteasy-joda-petstore-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ fi

# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="$@ generate -t modules/swagger-codegen/src/main/resources/JavaJaxRS -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l jaxrs-resteasy -o samples/server/petstore/jaxrs-resteasy/joda -DhideGenerationTimestamp=true -c ./bin/jaxrs-resteasy-joda-petstore-server.json"
ags="$@ generate --artifact-id swagger-jaxrs-resteasy-joda-server -t modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l jaxrs-resteasy -o samples/server/petstore/jaxrs-resteasy/joda -DhideGenerationTimestamp=true -c ./bin/jaxrs-resteasy-joda-petstore-server.json"

java $JAVA_OPTS -jar $executable $ags
2 changes: 1 addition & 1 deletion bin/jaxrs-resteasy-petstore-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ fi

# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="$@ generate -t modules/swagger-codegen/src/main/resources/JavaJaxRS -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l jaxrs-resteasy -o samples/server/petstore/jaxrs-resteasy/default -DhideGenerationTimestamp=true"
ags="$@ generate -t modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l jaxrs-resteasy -o samples/server/petstore/jaxrs-resteasy/default -DhideGenerationTimestamp=true"

java $JAVA_OPTS -jar $executable $ags
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ public class JodaDateTimeProvider implements ParamConverterProvider {

public static class JodaDateTimeConverter implements ParamConverter<DateTime> {

@Override
public DateTime fromString(String string) {
try {
DateTime dateTime = DateTime.parse(string);
Expand All @@ -26,13 +25,11 @@ public class JodaDateTimeProvider implements ParamConverterProvider {
}
}

@Override
public String toString(DateTime t) {
return t.toString();
}
}

@Override
public <T> ParamConverter<T> getConverter(Class<T> type, Type type1, Annotation[] antns) {
if (DateTime.class.equals(type)) {
return (ParamConverter<T>) new JodaDateTimeConverter();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ public class JodaLocalDateProvider implements ParamConverterProvider {

public static class JodaLocalDateConverter implements ParamConverter<LocalDate> {

@Override
public LocalDate fromString(String string) {
try {
LocalDate localDate = LocalDate.parse(string);
Expand All @@ -26,13 +25,11 @@ public class JodaLocalDateProvider implements ParamConverterProvider {
}
}

@Override
public String toString(LocalDate t) {
return t.toString();
}
}

@Override
public <T> ParamConverter<T> getConverter(Class<T> type, Type type1, Annotation[] antns) {
if (LocalDate.class.equals(type)) {
return (ParamConverter<T>) new JodaLocalDateConverter();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,16 @@ public class LocalDateProvider implements ParamConverterProvider {

public static class LocalDateConverter implements ParamConverter<LocalDate> {

@Override
public LocalDate fromString(String string) {
LocalDate localDate = LocalDate.parse(string);
return localDate;
}

@Override
public String toString(LocalDate t) {
return t.toString();
}
}

@Override
public <T> ParamConverter<T> getConverter(Class<T> type, Type type1, Annotation[] antns) {
if (LocalDate.class.equals(type)) {
return (ParamConverter<T>) new LocalDateConverter();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,16 @@ public class OffsetDateTimeProvider implements ParamConverterProvider {

public static class OffsetDateTimeConverter implements ParamConverter<OffsetDateTime> {

@Override
public OffsetDateTime fromString(String string) {
OffsetDateTime OffsetDateTime = OffsetDateTime.parse(string);
return OffsetDateTime;
OffsetDateTime offsetDateTime = OffsetDateTime.parse(string);
return offsetDateTime;
}

@Override
public String toString(OffsetDateTime t) {
return t.toString();
}
}

@Override
public <T> ParamConverter<T> getConverter(Class<T> type, Type type1, Annotation[] antns) {
if (OffsetDateTime.class.equals(type)) {
return (ParamConverter<T>) new OffsetDateTimeConverter();
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@javax.annotation.Generated(value = "{{generatorClass}}", date = "{{generatedDate}}")
{{^hideGenerationTimestamp}}@javax.annotation.Generated(value = "{{generatorClass}}", date = "{{generatedDate}}"){{/hideGenerationTimestamp}}
1 change: 0 additions & 1 deletion samples/client/petstore/dart/petstore/test/packages

This file was deleted.

1 change: 1 addition & 0 deletions samples/client/petstore/dart/petstore/test/packages
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
../packages
2 changes: 1 addition & 1 deletion samples/server/petstore/jaxrs-resteasy/default/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
</repository>
</repositories>
<properties>
<swagger-core-version>1.5.8</swagger-core-version>
<swagger-core-version>1.5.9</swagger-core-version>
<jetty-version>9.2.9.v20150224</jetty-version>
<resteasy-version>3.0.11.Final</resteasy-version>
<slf4j-version>1.6.3</slf4j-version>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.swagger.api;

@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:05.980+08:00")

public class ApiException extends Exception{
private int code;
public ApiException (int code, String msg) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import javax.servlet.*;
import javax.servlet.http.HttpServletResponse;

@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:05.980+08:00")

public class ApiOriginFilter implements javax.servlet.Filter {
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain) throws IOException, ServletException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import javax.xml.bind.annotation.XmlTransient;

@javax.xml.bind.annotation.XmlRootElement
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:05.980+08:00")

public class ApiResponseMessage {
public static final int ERROR = 1;
public static final int WARNING = 2;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.swagger.api;

@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:05.980+08:00")

public class NotFoundException extends ApiException {
private int code;
public NotFoundException (int code, String msg) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import io.swagger.api.factories.PetApiServiceFactory;

import io.swagger.model.Pet;
import java.io.File;
import io.swagger.model.ModelApiResponse;
import java.io.File;

import java.util.List;
import io.swagger.api.NotFoundException;
Expand All @@ -22,7 +22,7 @@
@Path("/pet")


@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:05.980+08:00")

public class PetApi {
private final PetApiService delegate = PetApiServiceFactory.getPetApi();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@


import io.swagger.model.Pet;
import java.io.File;
import io.swagger.model.ModelApiResponse;
import java.io.File;

import java.util.List;
import io.swagger.api.NotFoundException;
Expand All @@ -17,7 +17,7 @@
import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext;

@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:05.980+08:00")

public abstract class PetApiService {
public abstract Response addPet(Pet body,SecurityContext securityContext)
throws NotFoundException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
@Path("/store")


@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:05.980+08:00")

public class StoreApi {
private final StoreApiService delegate = StoreApiServiceFactory.getStoreApi();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext;

@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:05.980+08:00")

public abstract class StoreApiService {
public abstract Response deleteOrder(String orderId,SecurityContext securityContext)
throws NotFoundException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.swagger.api;

@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:05.980+08:00")

public class StringUtil {
/**
* Check if the given array contains the given value (with case-insensitive comparison).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
@Path("/user")


@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:05.980+08:00")

public class UserApi {
private final UserApiService delegate = UserApiServiceFactory.getUserApi();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext;

@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:05.980+08:00")

public abstract class UserApiService {
public abstract Response createUser(User body,SecurityContext securityContext)
throws NotFoundException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@



@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:05.980+08:00")

public class Category {

private Long id = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@



@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:05.980+08:00")

public class ModelApiResponse {

private Integer code = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@



@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:05.980+08:00")

public class Order {

private Long id = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@



@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:05.980+08:00")

public class Pet {

private Long id = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@



@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:05.980+08:00")

public class Tag {

private Long id = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@



@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:05.980+08:00")

public class User {

private Long id = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import io.swagger.api.PetApiService;
import io.swagger.api.impl.PetApiServiceImpl;

@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:05.980+08:00")

public class PetApiServiceFactory {

private final static PetApiService service = new PetApiServiceImpl();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import io.swagger.api.StoreApiService;
import io.swagger.api.impl.StoreApiServiceImpl;

@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:05.980+08:00")

public class StoreApiServiceFactory {

private final static StoreApiService service = new StoreApiServiceImpl();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import io.swagger.api.UserApiService;
import io.swagger.api.impl.UserApiServiceImpl;

@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:05.980+08:00")

public class UserApiServiceFactory {

private final static UserApiService service = new UserApiServiceImpl();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@


import io.swagger.model.Pet;
import java.io.File;
import io.swagger.model.ModelApiResponse;
import java.io.File;

import java.util.List;
import io.swagger.api.NotFoundException;
Expand All @@ -17,7 +17,7 @@
import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext;

@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:05.980+08:00")

public class PetApiServiceImpl extends PetApiService {
@Override
public Response addPet(Pet body,SecurityContext securityContext)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext;

@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:05.980+08:00")

public class StoreApiServiceImpl extends StoreApiService {
@Override
public Response deleteOrder(String orderId,SecurityContext securityContext)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext;

@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:05.980+08:00")

public class UserApiServiceImpl extends UserApiService {
@Override
public Response createUser(User body,SecurityContext securityContext)
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
8 changes: 4 additions & 4 deletions samples/server/petstore/jaxrs-resteasy/joda/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>io.swagger</groupId>
<artifactId>swagger-jaxrs-resteasy-joda</artifactId>
<artifactId>swagger-jaxrs-resteasy-joda-server</artifactId>
<packaging>war</packaging>
<name>swagger-jaxrs-resteasy-server</name>
<name>swagger-jaxrs-resteasy-joda-server</name>
<version>1.0.0</version>
<build>
<sourceDirectory>src/main/java</sourceDirectory>
Expand Down Expand Up @@ -145,11 +145,11 @@
</repository>
</repositories>
<properties>
<swagger-core-version>1.5.8</swagger-core-version>
<swagger-core-version>1.5.9</swagger-core-version>
<jetty-version>9.2.9.v20150224</jetty-version>
<resteasy-version>3.0.11.Final</resteasy-version>
<slf4j-version>1.6.3</slf4j-version>
<junit-version>4.8.1</junit-version>
<servlet-api-version>2.5</servlet-api-version>
</properties>
</project>
</project>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.swagger.api;

@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:16.906+08:00")

public class ApiException extends Exception{
private int code;
public ApiException (int code, String msg) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import javax.servlet.*;
import javax.servlet.http.HttpServletResponse;

@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:16.906+08:00")

public class ApiOriginFilter implements javax.servlet.Filter {
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain) throws IOException, ServletException {
Expand Down
Loading