swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition.
Hello, for latest version we are using a custom mustache template to generate code for rest controller, using Swagget-Code-gen we identify GET, POST, etc with:"isRestfulCreate","isRestfulIndex","isRestfulShow" variables.
Using the command below:
java -jar swagger-codegen-cli.jar generate -i customerManagement_v2.1.1.json -l spring -o samples/server/CustomerManager -t ../Templates/JavaSpring/ -DdateLibrary=joda
Swagger-Code-Gen mustache variables (isRestfulCreate,isRestfulIndex,isRestfulShow,etc) are not loading propertyly for this operations:
0) -Operation: GET /customers/{customerId}/creditInfo
-Variables Resolved: isRestfulShow=false,isRestfulIndex=false,isRestfulCreate=false,isRestfulUpdate=false,isRestfulDestroy=false
1) -Operation: GET /accounts/{accountId}/productOrders
-Variables Resolved: isRestfulShow=false,isRestfulIndex=false,isRestfulCreate=false,isRestfulUpdate=false,isRestfulDestroy=false
4) -Operation: PUT /accounts/{accountId}/productOrders/{orderId}
-Variables Resolved: isRestfulShow=false,isRestfulIndex=false,isRestfulCreate=false,isRestfulUpdate=false,isRestfulDestroy=false
5) -Operation: GET /accounts/{accountId}/productOrders/{orderId}/status
-Variables Resolved: isRestfulShow=false,isRestfulIndex=false,isRestfulCreate=false,isRestfulUpdate=false,isRestfulDestroy=false
6) -Operation: PUT /accounts/{accountId}/productOrders/{orderId}/status
-Variables Resolved: isRestfulShow=false,isRestfulIndex=false,isRestfulCreate=false,isRestfulUpdate=false,isRestfulDestroy=false
As you can see all swagger code gen resolved all operations with false. We need to identify this suboperations of GET or PUT with new variables for aply custom templates.
Is there any way of identify this operations from swagger code gen correctly and generate our own custom code in mustache via {{>subGet}} or {{>subPut}}.
Hello, for latest version we are using a custom mustache template to generate code for rest controller, using Swagget-Code-gen we identify GET, POST, etc with:"isRestfulCreate","isRestfulIndex","isRestfulShow" variables.
Using the command below: java -jar swagger-codegen-cli.jar generate -i customerManagement_v2.1.1.json -l spring -o samples/server/CustomerManager -t ../Templates/JavaSpring/ -DdateLibrary=joda
Swagger-Code-Gen mustache variables (isRestfulCreate,isRestfulIndex,isRestfulShow,etc) are not loading propertyly for this operations:
0) -Operation: GET /customers/{customerId}/creditInfo -Variables Resolved: isRestfulShow=false,isRestfulIndex=false,isRestfulCreate=false,isRestfulUpdate=false,isRestfulDestroy=false
1) -Operation: GET /accounts/{accountId}/productOrders -Variables Resolved: isRestfulShow=false,isRestfulIndex=false,isRestfulCreate=false,isRestfulUpdate=false,isRestfulDestroy=false
2) -Operation:POST /accounts/{accountId}/productOrders -Variables Resolved: isRestfulShow=false,isRestfulIndex=false,isRestfulCreate=false,isRestfulUpdate=false,isRestfulDestroy=false
3) -Operation:GET /accounts/{accountId}/productOrders/{orderId} -Variables Resolved: isRestfulShow=false,isRestfulIndex=false,isRestfulCreate=false,isRestfulUpdate=false,isRestfulDestroy=false
4) -Operation: PUT /accounts/{accountId}/productOrders/{orderId} -Variables Resolved: isRestfulShow=false,isRestfulIndex=false,isRestfulCreate=false,isRestfulUpdate=false,isRestfulDestroy=false
5) -Operation: GET /accounts/{accountId}/productOrders/{orderId}/status -Variables Resolved: isRestfulShow=false,isRestfulIndex=false,isRestfulCreate=false,isRestfulUpdate=false,isRestfulDestroy=false
6) -Operation: PUT /accounts/{accountId}/productOrders/{orderId}/status -Variables Resolved: isRestfulShow=false,isRestfulIndex=false,isRestfulCreate=false,isRestfulUpdate=false,isRestfulDestroy=false
As you can see all swagger code gen resolved all operations with false. We need to identify this suboperations of GET or PUT with new variables for aply custom templates. Is there any way of identify this operations from swagger code gen correctly and generate our own custom code in mustache via {{>subGet}} or {{>subPut}}.
THX for this great tool!!