move get type declaration method to c++ restbed

This commit is contained in:
wing328 2018-04-09 00:08:50 +08:00
parent 070b5c00b8
commit a339422bd5
22 changed files with 27 additions and 28 deletions

View File

@ -179,4 +179,9 @@ abstract public class AbstractCppCodegen extends DefaultCodegen implements Codeg
public String toBooleanGetter(String name) { public String toBooleanGetter(String name) {
return "is" + getterAndSetterCapitalize(name); return "is" + getterAndSetterCapitalize(name);
} }
@Override
public String getTypeDeclaration(String str) {
return "std::shared_ptr<" + toModelName(str) + ">";
}
} }

View File

@ -292,11 +292,6 @@ public class CppRestClientCodegen extends AbstractCppCodegen {
return "std::shared_ptr<" + openAPIType + ">"; return "std::shared_ptr<" + openAPIType + ">";
} }
@Override
public String getTypeDeclaration(String str) {
return "std::shared_ptr<" + toModelName(str) + ">";
}
@Override @Override
public String toDefaultValue(Schema p) { public String toDefaultValue(Schema p) {
if (p instanceof StringSchema) { if (p instanceof StringSchema) {

View File

@ -1 +1 @@
2.3.0-SNAPSHOT 3.0.0-SNAPSHOT

View File

@ -5,7 +5,7 @@
* OpenAPI spec version: 1.0.0 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* *
* NOTE: This class is auto generated by the swagger code generator 2.3.0-SNAPSHOT. * NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* https://github.com/swagger-api/swagger-codegen.git * https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually. * Do not edit the class manually.
*/ */

View File

@ -5,7 +5,7 @@
* OpenAPI spec version: 1.0.0 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* *
* NOTE: This class is auto generated by the swagger code generator 2.3.0-SNAPSHOT. * NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* https://github.com/swagger-api/swagger-codegen.git * https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually. * Do not edit the class manually.
*/ */

View File

@ -5,7 +5,7 @@
* OpenAPI spec version: 1.0.0 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* *
* NOTE: This class is auto generated by the swagger code generator 2.3.0-SNAPSHOT. * NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* https://github.com/swagger-api/swagger-codegen.git * https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually. * Do not edit the class manually.
*/ */

View File

@ -5,7 +5,7 @@
* OpenAPI spec version: 1.0.0 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* *
* NOTE: This class is auto generated by the swagger code generator 2.3.0-SNAPSHOT. * NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* https://github.com/swagger-api/swagger-codegen.git * https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually. * Do not edit the class manually.
*/ */

View File

@ -5,7 +5,7 @@
* OpenAPI spec version: 1.0.0 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* *
* NOTE: This class is auto generated by the swagger code generator 2.3.0-SNAPSHOT. * NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* https://github.com/swagger-api/swagger-codegen.git * https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually. * Do not edit the class manually.
*/ */
@ -344,9 +344,9 @@ void UserApiUserLoginResource::GET_method_handler(const std::shared_ptr<restbed:
*/ */
if (status_code == 200) { if (status_code == 200) {
// Description: calls per hour allowed by the user // Description:
session->set_header("X-Rate-Limit", ""); // Change second param to your header value session->set_header("X-Rate-Limit", ""); // Change second param to your header value
// Description: date in UTC when toekn expires // Description:
session->set_header("X-Expires-After", ""); // Change second param to your header value session->set_header("X-Expires-After", ""); // Change second param to your header value
session->close(200, "successful operation", { {"Connection", "close"} }); session->close(200, "successful operation", { {"Connection", "close"} });
return; return;

View File

@ -5,7 +5,7 @@
* OpenAPI spec version: 1.0.0 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* *
* NOTE: This class is auto generated by the swagger code generator 2.3.0-SNAPSHOT. * NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* https://github.com/swagger-api/swagger-codegen.git * https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually. * Do not edit the class manually.
*/ */
@ -27,7 +27,6 @@
#include "User.h" #include "User.h"
#include <string> #include <string>
#include <vector>
namespace io { namespace io {
namespace swagger { namespace swagger {

View File

@ -36,7 +36,7 @@ git_remote=`git remote`
if [ "$git_remote" = "" ]; then # git remote not defined if [ "$git_remote" = "" ]; then # git remote not defined
if [ "$GIT_TOKEN" = "" ]; then if [ "$GIT_TOKEN" = "" ]; then
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment." echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
else else
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git

View File

@ -5,7 +5,7 @@
* OpenAPI spec version: 1.0.0 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* *
* NOTE: This class is auto generated by the swagger code generator 2.3.0-SNAPSHOT. * NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* https://github.com/swagger-api/swagger-codegen.git * https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually. * Do not edit the class manually.
*/ */

View File

@ -5,7 +5,7 @@
* OpenAPI spec version: 1.0.0 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* *
* NOTE: This class is auto generated by the swagger code generator 2.3.0-SNAPSHOT. * NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* https://github.com/swagger-api/swagger-codegen.git * https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually. * Do not edit the class manually.
*/ */

View File

@ -5,7 +5,7 @@
* OpenAPI spec version: 1.0.0 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* *
* NOTE: This class is auto generated by the swagger code generator 2.3.0-SNAPSHOT. * NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* https://github.com/swagger-api/swagger-codegen.git * https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually. * Do not edit the class manually.
*/ */

View File

@ -5,7 +5,7 @@
* OpenAPI spec version: 1.0.0 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* *
* NOTE: This class is auto generated by the swagger code generator 2.3.0-SNAPSHOT. * NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* https://github.com/swagger-api/swagger-codegen.git * https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually. * Do not edit the class manually.
*/ */

View File

@ -5,7 +5,7 @@
* OpenAPI spec version: 1.0.0 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* *
* NOTE: This class is auto generated by the swagger code generator 2.3.0-SNAPSHOT. * NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* https://github.com/swagger-api/swagger-codegen.git * https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually. * Do not edit the class manually.
*/ */

View File

@ -5,7 +5,7 @@
* OpenAPI spec version: 1.0.0 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* *
* NOTE: This class is auto generated by the swagger code generator 2.3.0-SNAPSHOT. * NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* https://github.com/swagger-api/swagger-codegen.git * https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually. * Do not edit the class manually.
*/ */

View File

@ -5,7 +5,7 @@
* OpenAPI spec version: 1.0.0 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* *
* NOTE: This class is auto generated by the swagger code generator 2.3.0-SNAPSHOT. * NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* https://github.com/swagger-api/swagger-codegen.git * https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually. * Do not edit the class manually.
*/ */

View File

@ -5,7 +5,7 @@
* OpenAPI spec version: 1.0.0 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* *
* NOTE: This class is auto generated by the swagger code generator 2.3.0-SNAPSHOT. * NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* https://github.com/swagger-api/swagger-codegen.git * https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually. * Do not edit the class manually.
*/ */

View File

@ -5,7 +5,7 @@
* OpenAPI spec version: 1.0.0 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* *
* NOTE: This class is auto generated by the swagger code generator 2.3.0-SNAPSHOT. * NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* https://github.com/swagger-api/swagger-codegen.git * https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually. * Do not edit the class manually.
*/ */

View File

@ -5,7 +5,7 @@
* OpenAPI spec version: 1.0.0 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* *
* NOTE: This class is auto generated by the swagger code generator 2.3.0-SNAPSHOT. * NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* https://github.com/swagger-api/swagger-codegen.git * https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually. * Do not edit the class manually.
*/ */

View File

@ -5,7 +5,7 @@
* OpenAPI spec version: 1.0.0 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* *
* NOTE: This class is auto generated by the swagger code generator 2.3.0-SNAPSHOT. * NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* https://github.com/swagger-api/swagger-codegen.git * https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually. * Do not edit the class manually.
*/ */

View File

@ -5,7 +5,7 @@
* OpenAPI spec version: 1.0.0 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* *
* NOTE: This class is auto generated by the swagger code generator 2.3.0-SNAPSHOT. * NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* https://github.com/swagger-api/swagger-codegen.git * https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually. * Do not edit the class manually.
*/ */