File tree Expand file tree Collapse file tree 21 files changed +135
-111
lines changed
modules/swagger-codegen/src/main/resources/JavaJaxRS
jaxrs/src/gen/java/io/swagger/model
jaxrs-resteasy/src/gen/java/io/swagger Expand file tree Collapse file tree 21 files changed +135
-111
lines changed Original file line number Diff line number Diff line change
1
+ /**
2
+ * { {^description} }Gets or Sets { {{name} }}{ {/description} }{ {#description} }{ {{description} }}{ {/description} }
3
+ */
4
+ public enum { {#datatypeWithEnum} }{ {.} }{ {/datatypeWithEnum} }{ {^datatypeWithEnum} }{ {classname} }{ {/datatypeWithEnum} } {
5
+ {{#allowableValues} }
6
+ { {#enumVars} }
7
+ { {{name} }}({ {{value} }}){ {^-last} },
1
8
2
- public enum { {{datatypeWithEnum} }} {
3
- {{#allowableValues} }{ {#enumVars} }{ {{name} }}("{ {{value} }}"){ {^-last} },
4
- { {/-last} }{ {#-last} };{ {/-last} }{ {/enumVars} }{ {/allowableValues} }
9
+ { {/-last} }{ {#-last} };
10
+ { {/-last} }
11
+ { {/enumVars} }
12
+ { {/allowableValues} }
13
+ private { {datatype} } value;
5
14
6
- private String value;
7
-
8
- { {{datatypeWithEnum} }}(String value) {
15
+ { {#datatypeWithEnum} }{ {.} }{ {/datatypeWithEnum} }{ {^datatypeWithEnum} }{ {classname} }{ {/datatypeWithEnum} }({ {datatype} } value) {
9
16
this.value = value;
10
17
}
11
18
12
19
@Override
13
20
@JsonValue
14
21
public String toString() {
15
- return value;
22
+ return String.valueOf( value) ;
16
23
}
17
24
}
Original file line number Diff line number Diff line change
1
+ /**
2
+ * { {^description} }Gets or Sets { {{name} }}{ {/description} }{ {#description} }{ {{description} }}{ {/description} }
3
+ */
4
+ public enum { {#datatypeWithEnum} }{ {.} }{ {/datatypeWithEnum} }{ {^datatypeWithEnum} }{ {classname} }{ {/datatypeWithEnum} } {
5
+ {{#allowableValues} }
6
+ { {#enumVars} }
7
+ { {{name} }}({ {{value} }}){ {^-last} },
1
8
2
- public enum { {{datatypeWithEnum} }} {
3
- {{#allowableValues} }{ {#enumVars} }{ {{name} }}("{ {{value} }}"){ {^-last} },
4
- { {/-last} }{ {#-last} };{ {/-last} }{ {/enumVars} }{ {/allowableValues} }
9
+ { {/-last} }{ {#-last} };
10
+ { {/-last} }
11
+ { {/enumVars} }
12
+ { {/allowableValues} }
13
+ private { {datatype} } value;
5
14
6
- private String value;
7
-
8
- { {{datatypeWithEnum} }}(String value) {
15
+ { {#datatypeWithEnum} }{ {.} }{ {/datatypeWithEnum} }{ {^datatypeWithEnum} }{ {classname} }{ {/datatypeWithEnum} }({ {datatype} } value) {
9
16
this.value = value;
10
17
}
11
18
12
19
@Override
13
20
@JsonValue
14
21
public String toString() {
15
- return value;
22
+ return String.valueOf( value) ;
16
23
}
17
24
}
Original file line number Diff line number Diff line change 1
1
package io .swagger .api ;
2
2
3
- @ javax .annotation .Generated (value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen" , date = "2016-04-22T19:32:21.945 +08:00" )
3
+ @ javax .annotation .Generated (value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen" , date = "2016-04-29T00:20:47.240 +08:00" )
4
4
public class ApiException extends Exception {
5
5
private int code ;
6
6
public ApiException (int code , String msg ) {
Original file line number Diff line number Diff line change 5
5
import javax .servlet .*;
6
6
import javax .servlet .http .HttpServletResponse ;
7
7
8
- @ javax .annotation .Generated (value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen" , date = "2016-04-22T19:32:21.945 +08:00" )
8
+ @ javax .annotation .Generated (value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen" , date = "2016-04-29T00:20:47.240 +08:00" )
9
9
public class ApiOriginFilter implements javax .servlet .Filter {
10
10
public void doFilter (ServletRequest request , ServletResponse response ,
11
11
FilterChain chain ) throws IOException , ServletException {
Original file line number Diff line number Diff line change 3
3
import javax .xml .bind .annotation .XmlTransient ;
4
4
5
5
@ javax .xml .bind .annotation .XmlRootElement
6
- @ javax .annotation .Generated (value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen" , date = "2016-04-22T19:32:21.945 +08:00" )
6
+ @ javax .annotation .Generated (value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen" , date = "2016-04-29T00:20:47.240 +08:00" )
7
7
public class ApiResponseMessage {
8
8
public static final int ERROR = 1 ;
9
9
public static final int WARNING = 2 ;
Original file line number Diff line number Diff line change 1
1
package io .swagger .api ;
2
2
3
- @ javax .annotation .Generated (value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen" , date = "2016-04-22T19:32:21.945 +08:00" )
3
+ @ javax .annotation .Generated (value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen" , date = "2016-04-29T00:20:47.240 +08:00" )
4
4
public class NotFoundException extends ApiException {
5
5
private int code ;
6
6
public NotFoundException (int code , String msg ) {
Original file line number Diff line number Diff line change 22
22
@ Path ("/pet" )
23
23
24
24
25
- @ javax .annotation .Generated (value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen" , date = "2016-04-22T19:32:21.945 +08:00" )
25
+ @ javax .annotation .Generated (value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen" , date = "2016-04-29T00:20:47.240 +08:00" )
26
26
public class PetApi {
27
27
private final PetApiService delegate = PetApiServiceFactory .getPetApi ();
28
28
Original file line number Diff line number Diff line change 17
17
import javax .ws .rs .core .Response ;
18
18
import javax .ws .rs .core .SecurityContext ;
19
19
20
- @ javax .annotation .Generated (value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen" , date = "2016-04-22T19:32:21.945 +08:00" )
20
+ @ javax .annotation .Generated (value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen" , date = "2016-04-29T00:20:47.240 +08:00" )
21
21
public abstract class PetApiService {
22
22
public abstract Response addPet (Pet body ,SecurityContext securityContext )
23
23
throws NotFoundException ;
Original file line number Diff line number Diff line change 20
20
@ Path ("/store" )
21
21
22
22
23
- @ javax .annotation .Generated (value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen" , date = "2016-04-22T19:32:21.945 +08:00" )
23
+ @ javax .annotation .Generated (value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen" , date = "2016-04-29T00:20:47.240 +08:00" )
24
24
public class StoreApi {
25
25
private final StoreApiService delegate = StoreApiServiceFactory .getStoreApi ();
26
26
Original file line number Diff line number Diff line change 15
15
import javax .ws .rs .core .Response ;
16
16
import javax .ws .rs .core .SecurityContext ;
17
17
18
- @ javax .annotation .Generated (value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen" , date = "2016-04-22T19:32:21.945 +08:00" )
18
+ @ javax .annotation .Generated (value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen" , date = "2016-04-29T00:20:47.240 +08:00" )
19
19
public abstract class StoreApiService {
20
20
public abstract Response deleteOrder (String orderId ,SecurityContext securityContext )
21
21
throws NotFoundException ;
Original file line number Diff line number Diff line change 1
1
package io .swagger .api ;
2
2
3
- @ javax .annotation .Generated (value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen" , date = "2016-04-22T19:32:21.945 +08:00" )
3
+ @ javax .annotation .Generated (value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen" , date = "2016-04-29T00:20:47.240 +08:00" )
4
4
public class StringUtil {
5
5
/**
6
6
* Check if the given array contains the given value (with case-insensitive comparison).
Original file line number Diff line number Diff line change 20
20
@ Path ("/user" )
21
21
22
22
23
- @ javax .annotation .Generated (value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen" , date = "2016-04-22T19:32:21.945 +08:00" )
23
+ @ javax .annotation .Generated (value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen" , date = "2016-04-29T00:20:47.240 +08:00" )
24
24
public class UserApi {
25
25
private final UserApiService delegate = UserApiServiceFactory .getUserApi ();
26
26
Original file line number Diff line number Diff line change 15
15
import javax .ws .rs .core .Response ;
16
16
import javax .ws .rs .core .SecurityContext ;
17
17
18
- @ javax .annotation .Generated (value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen" , date = "2016-04-22T19:32:21.945 +08:00" )
18
+ @ javax .annotation .Generated (value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen" , date = "2016-04-29T00:20:47.240 +08:00" )
19
19
public abstract class UserApiService {
20
20
public abstract Response createUser (User body ,SecurityContext securityContext )
21
21
throws NotFoundException ;
Original file line number Diff line number Diff line change 8
8
9
9
10
10
11
- @ javax .annotation .Generated (value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen" , date = "2016-04-22T19:32:21.945 +08:00" )
11
+ @ javax .annotation .Generated (value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen" , date = "2016-04-29T00:20:47.240 +08:00" )
12
12
public class Category {
13
13
14
14
private Long id = null ;
Original file line number Diff line number Diff line change 8
8
9
9
10
10
11
- @ javax .annotation .Generated (value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen" , date = "2016-04-22T19:32:21.945 +08:00" )
11
+ @ javax .annotation .Generated (value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen" , date = "2016-04-29T00:20:47.240 +08:00" )
12
12
public class ModelApiResponse {
13
13
14
14
private Integer code = null ;
Original file line number Diff line number Diff line change 9
9
10
10
11
11
12
- @ javax .annotation .Generated (value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen" , date = "2016-04-22T19:32:21.945 +08:00" )
12
+ @ javax .annotation .Generated (value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen" , date = "2016-04-29T00:20:47.240 +08:00" )
13
13
public class Order {
14
14
15
15
private Long id = null ;
16
16
private Long petId = null ;
17
17
private Integer quantity = null ;
18
18
private Date shipDate = null ;
19
19
20
-
20
+ /**
21
+ * Order Status
22
+ */
21
23
public enum StatusEnum {
22
24
PLACED ("placed" ),
23
- APPROVED ("approved" ),
24
- DELIVERED ("delivered" );
25
25
26
+ APPROVED ("approved" ),
27
+
28
+ DELIVERED ("delivered" );
26
29
private String value ;
27
30
28
31
StatusEnum (String value ) {
@@ -32,7 +35,7 @@ public enum StatusEnum {
32
35
@ Override
33
36
@ JsonValue
34
37
public String toString () {
35
- return value ;
38
+ return String . valueOf ( value ) ;
36
39
}
37
40
}
38
41
Original file line number Diff line number Diff line change 11
11
12
12
13
13
14
- @ javax .annotation .Generated (value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen" , date = "2016-04-22T19:32:21.945 +08:00" )
14
+ @ javax .annotation .Generated (value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen" , date = "2016-04-29T00:20:47.240 +08:00" )
15
15
public class Pet {
16
16
17
17
private Long id = null ;
@@ -20,12 +20,15 @@ public class Pet {
20
20
private List <String > photoUrls = new ArrayList <String >();
21
21
private List <Tag > tags = new ArrayList <Tag >();
22
22
23
-
23
+ /**
24
+ * pet status in the store
25
+ */
24
26
public enum StatusEnum {
25
27
AVAILABLE ("available" ),
26
- PENDING ("pending" ),
27
- SOLD ("sold" );
28
28
29
+ PENDING ("pending" ),
30
+
31
+ SOLD ("sold" );
29
32
private String value ;
30
33
31
34
StatusEnum (String value ) {
@@ -35,7 +38,7 @@ public enum StatusEnum {
35
38
@ Override
36
39
@ JsonValue
37
40
public String toString () {
38
- return value ;
41
+ return String . valueOf ( value ) ;
39
42
}
40
43
}
41
44
Original file line number Diff line number Diff line change 8
8
9
9
10
10
11
- @ javax .annotation .Generated (value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen" , date = "2016-04-22T19:32:21.945 +08:00" )
11
+ @ javax .annotation .Generated (value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen" , date = "2016-04-29T00:20:47.240 +08:00" )
12
12
public class Tag {
13
13
14
14
private Long id = null ;
Original file line number Diff line number Diff line change 8
8
9
9
10
10
11
- @ javax .annotation .Generated (value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen" , date = "2016-04-22T19:32:21.945 +08:00" )
11
+ @ javax .annotation .Generated (value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen" , date = "2016-04-29T00:20:47.240 +08:00" )
12
12
public class User {
13
13
14
14
private Long id = null ;
Original file line number Diff line number Diff line change @@ -19,12 +19,15 @@ public class Order {
19
19
private Integer quantity = null ;
20
20
private Date shipDate = null ;
21
21
22
-
22
+ /**
23
+ * Order Status
24
+ */
23
25
public enum StatusEnum {
24
26
PLACED ("placed" ),
25
- APPROVED ("approved" ),
26
- DELIVERED ("delivered" );
27
27
28
+ APPROVED ("approved" ),
29
+
30
+ DELIVERED ("delivered" );
28
31
private String value ;
29
32
30
33
StatusEnum (String value ) {
@@ -34,7 +37,7 @@ public enum StatusEnum {
34
37
@ Override
35
38
@ JsonValue
36
39
public String toString () {
37
- return value ;
40
+ return String . valueOf ( value ) ;
38
41
}
39
42
}
40
43
You can’t perform that action at this time.
0 commit comments