Skip to content

Commit 392e517

Browse files
committed
changed default behavior for inflector to have unimplemented handlers
1 parent 15e336b commit 392e517

File tree

9 files changed

+74
-8
lines changed

9 files changed

+74
-8
lines changed

modules/swagger-codegen/src/main/resources/JavaInflector/api.mustache

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,18 @@ import {{modelPackage}}.*;
1616
{{>generatedAnnotation}}
1717
{{#operations}}
1818
public class {{classname}} {
19+
/**
20+
* Uncomment and implement as you see fit. These operations will map
21+
* Direclty to operation calls from the routing logic. Because the inflector
22+
* Code allows you to implement logic incrementally, they are disabled.
23+
**/
24+
1925
{{#operation}}
26+
/*
2027
public ResponseContext {{nickname}}(RequestContext request {{#allParams}}, {{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{/allParams}}) {
2128
return new ResponseContext().status(Status.INTERNAL_SERVER_ERROR).entity( "Not implemented" );
2229
}
30+
*/
2331

2432
{{/operation}}
2533
}

samples/server/petstore/java-inflector/src/main/java/io/swagger/handler/PetController.java

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,39 +13,61 @@
1313
import io.swagger.model.Pet;
1414
import java.io.File;
1515

16-
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaInflectorServerCodegen", date = "2015-08-24T00:32:07.279-07:00")
16+
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaInflectorServerCodegen", date = "2015-08-24T17:25:49.737-07:00")
1717
public class PetController {
18+
/**
19+
* Uncomment and implement as you see fit. These operations will map
20+
* Direclty to operation calls from the routing logic. Because the inflector
21+
* Code allows you to implement logic incrementally, they are disabled.
22+
**/
23+
24+
/*
1825
public ResponseContext updatePet(RequestContext request , Pet body) {
1926
return new ResponseContext().status(Status.INTERNAL_SERVER_ERROR).entity( "Not implemented" );
2027
}
28+
*/
2129

30+
/*
2231
public ResponseContext addPet(RequestContext request , Pet body) {
2332
return new ResponseContext().status(Status.INTERNAL_SERVER_ERROR).entity( "Not implemented" );
2433
}
34+
*/
2535

36+
/*
2637
public ResponseContext findPetsByStatus(RequestContext request , List<String> status) {
2738
return new ResponseContext().status(Status.INTERNAL_SERVER_ERROR).entity( "Not implemented" );
2839
}
40+
*/
2941

42+
/*
3043
public ResponseContext findPetsByTags(RequestContext request , List<String> tags) {
3144
return new ResponseContext().status(Status.INTERNAL_SERVER_ERROR).entity( "Not implemented" );
3245
}
46+
*/
3347

48+
/*
3449
public ResponseContext getPetById(RequestContext request , Long petId) {
3550
return new ResponseContext().status(Status.INTERNAL_SERVER_ERROR).entity( "Not implemented" );
3651
}
52+
*/
3753

54+
/*
3855
public ResponseContext updatePetWithForm(RequestContext request , String petId, String name, String status) {
3956
return new ResponseContext().status(Status.INTERNAL_SERVER_ERROR).entity( "Not implemented" );
4057
}
58+
*/
4159

60+
/*
4261
public ResponseContext deletePet(RequestContext request , Long petId, String apiKey) {
4362
return new ResponseContext().status(Status.INTERNAL_SERVER_ERROR).entity( "Not implemented" );
4463
}
64+
*/
4565

66+
/*
4667
public ResponseContext uploadFile(RequestContext request , Long petId, String additionalMetadata, FormDataContentDisposition fileDetail) {
4768
return new ResponseContext().status(Status.INTERNAL_SERVER_ERROR).entity( "Not implemented" );
4869
}
70+
*/
4971

5072
}
5173

samples/server/petstore/java-inflector/src/main/java/io/swagger/handler/StoreController.java

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,37 @@
1313
import java.util.Map;
1414
import io.swagger.model.Order;
1515

16-
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaInflectorServerCodegen", date = "2015-08-24T00:32:07.279-07:00")
16+
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaInflectorServerCodegen", date = "2015-08-24T17:25:49.737-07:00")
1717
public class StoreController {
18+
/**
19+
* Uncomment and implement as you see fit. These operations will map
20+
* Direclty to operation calls from the routing logic. Because the inflector
21+
* Code allows you to implement logic incrementally, they are disabled.
22+
**/
23+
24+
/*
1825
public ResponseContext getInventory(RequestContext request ) {
1926
return new ResponseContext().status(Status.INTERNAL_SERVER_ERROR).entity( "Not implemented" );
2027
}
28+
*/
2129

30+
/*
2231
public ResponseContext placeOrder(RequestContext request , Order body) {
2332
return new ResponseContext().status(Status.INTERNAL_SERVER_ERROR).entity( "Not implemented" );
2433
}
34+
*/
2535

36+
/*
2637
public ResponseContext getOrderById(RequestContext request , String orderId) {
2738
return new ResponseContext().status(Status.INTERNAL_SERVER_ERROR).entity( "Not implemented" );
2839
}
40+
*/
2941

42+
/*
3043
public ResponseContext deleteOrder(RequestContext request , String orderId) {
3144
return new ResponseContext().status(Status.INTERNAL_SERVER_ERROR).entity( "Not implemented" );
3245
}
46+
*/
3347

3448
}
3549

samples/server/petstore/java-inflector/src/main/java/io/swagger/handler/UserController.java

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,39 +13,61 @@
1313
import io.swagger.model.User;
1414
import java.util.*;
1515

16-
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaInflectorServerCodegen", date = "2015-08-24T00:32:07.279-07:00")
16+
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaInflectorServerCodegen", date = "2015-08-24T17:25:49.737-07:00")
1717
public class UserController {
18+
/**
19+
* Uncomment and implement as you see fit. These operations will map
20+
* Direclty to operation calls from the routing logic. Because the inflector
21+
* Code allows you to implement logic incrementally, they are disabled.
22+
**/
23+
24+
/*
1825
public ResponseContext createUser(RequestContext request , User body) {
1926
return new ResponseContext().status(Status.INTERNAL_SERVER_ERROR).entity( "Not implemented" );
2027
}
28+
*/
2129

30+
/*
2231
public ResponseContext createUsersWithArrayInput(RequestContext request , List<User> body) {
2332
return new ResponseContext().status(Status.INTERNAL_SERVER_ERROR).entity( "Not implemented" );
2433
}
34+
*/
2535

36+
/*
2637
public ResponseContext createUsersWithListInput(RequestContext request , List<User> body) {
2738
return new ResponseContext().status(Status.INTERNAL_SERVER_ERROR).entity( "Not implemented" );
2839
}
40+
*/
2941

42+
/*
3043
public ResponseContext loginUser(RequestContext request , String username, String password) {
3144
return new ResponseContext().status(Status.INTERNAL_SERVER_ERROR).entity( "Not implemented" );
3245
}
46+
*/
3347

48+
/*
3449
public ResponseContext logoutUser(RequestContext request ) {
3550
return new ResponseContext().status(Status.INTERNAL_SERVER_ERROR).entity( "Not implemented" );
3651
}
52+
*/
3753

54+
/*
3855
public ResponseContext getUserByName(RequestContext request , String username) {
3956
return new ResponseContext().status(Status.INTERNAL_SERVER_ERROR).entity( "Not implemented" );
4057
}
58+
*/
4159

60+
/*
4261
public ResponseContext updateUser(RequestContext request , String username, User body) {
4362
return new ResponseContext().status(Status.INTERNAL_SERVER_ERROR).entity( "Not implemented" );
4463
}
64+
*/
4565

66+
/*
4667
public ResponseContext deleteUser(RequestContext request , String username) {
4768
return new ResponseContext().status(Status.INTERNAL_SERVER_ERROR).entity( "Not implemented" );
4869
}
70+
*/
4971

5072
}
5173

samples/server/petstore/java-inflector/src/main/java/io/swagger/model/Category.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77

88
@ApiModel(description = "")
9-
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaInflectorServerCodegen", date = "2015-08-24T00:32:07.279-07:00")
9+
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaInflectorServerCodegen", date = "2015-08-24T17:25:49.737-07:00")
1010
public class Category {
1111

1212
private Long id = null;

samples/server/petstore/java-inflector/src/main/java/io/swagger/model/Order.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88

99
@ApiModel(description = "")
10-
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaInflectorServerCodegen", date = "2015-08-24T00:32:07.279-07:00")
10+
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaInflectorServerCodegen", date = "2015-08-24T17:25:49.737-07:00")
1111
public class Order {
1212

1313
private Long id = null;

samples/server/petstore/java-inflector/src/main/java/io/swagger/model/Pet.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010

1111
@ApiModel(description = "")
12-
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaInflectorServerCodegen", date = "2015-08-24T00:32:07.279-07:00")
12+
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaInflectorServerCodegen", date = "2015-08-24T17:25:49.737-07:00")
1313
public class Pet {
1414

1515
private Long id = null;

samples/server/petstore/java-inflector/src/main/java/io/swagger/model/Tag.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77

88
@ApiModel(description = "")
9-
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaInflectorServerCodegen", date = "2015-08-24T00:32:07.279-07:00")
9+
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaInflectorServerCodegen", date = "2015-08-24T17:25:49.737-07:00")
1010
public class Tag {
1111

1212
private Long id = null;

samples/server/petstore/java-inflector/src/main/java/io/swagger/model/User.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77

88
@ApiModel(description = "")
9-
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaInflectorServerCodegen", date = "2015-08-24T00:32:07.279-07:00")
9+
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaInflectorServerCodegen", date = "2015-08-24T17:25:49.737-07:00")
1010
public class User {
1111

1212
private Long id = null;

0 commit comments

Comments
 (0)