diff --git a/bin/windows/cpprest-petstore.bat b/bin/windows/cpprest-petstore.bat new file mode 100755 index 0000000000..4331266984 --- /dev/null +++ b/bin/windows/cpprest-petstore.bat @@ -0,0 +1,10 @@ +set executable=.\modules\swagger-codegen-cli\target\swagger-codegen-cli.jar + +If Not Exist %executable% ( + mvn clean package +) + +set JAVA_OPTS=%JAVA_OPTS% -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties +set ags=generate -t modules\swagger-codegen\src\main\resources\cpprest -i modules\swagger-codegen\src\test\resources\2_0\petstore.json -l cpprest -o samples\client\petstore\cpprest + +java %JAVA_OPTS% -jar %executable% %ags% diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/CppRestClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/CppRestClientCodegen.java index e3e9e47e19..73bcce43f6 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/CppRestClientCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/CppRestClientCodegen.java @@ -80,10 +80,8 @@ public class CppRestClientCodegen extends DefaultCodegen implements CodegenConfi reservedWords = new HashSet(); - //supportingFiles.add(new SupportingFile("modelbase-header.mustache", "", "ModelBase.h")); - //supportingFiles.add(new SupportingFile("modelbase-source.mustache", "", "ModelBase.cpp")); - //supportingFiles.add(new SupportingFile("apibase-header.mustache", "", "ApiBase.h")); - //supportingFiles.add(new SupportingFile("apibase-source.mustache", "", "ApiBase.cpp")); + supportingFiles.add(new SupportingFile("modelbase-header.mustache", "", "ModelBase.h")); + supportingFiles.add(new SupportingFile("modelbase-source.mustache", "", "ModelBase.cpp")); supportingFiles.add(new SupportingFile("apiclient-header.mustache", "", "ApiClient.h")); supportingFiles.add(new SupportingFile("apiclient-source.mustache", "", "ApiClient.cpp")); supportingFiles.add(new SupportingFile("apiconfiguration-header.mustache", "", "ApiConfiguration.h")); diff --git a/modules/swagger-codegen/src/main/resources/Javascript/licenseInfo.mustache b/modules/swagger-codegen/src/main/resources/Javascript/licenseInfo.mustache new file mode 100644 index 0000000000..861d97234c --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/Javascript/licenseInfo.mustache @@ -0,0 +1,23 @@ +/** + * {{{appName}}} + * {{{appDescription}}} + * + * {{#version}}OpenAPI spec version: {{{version}}}{{/version}} + * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */