add windows batch file for cpprest-petstore

This commit is contained in:
wing328 2016-06-15 10:41:35 +08:00
parent ecd80a3d70
commit 0b63206496
3 changed files with 35 additions and 4 deletions

View File

@ -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%

View File

@ -80,10 +80,8 @@ public class CppRestClientCodegen extends DefaultCodegen implements CodegenConfi
reservedWords = new HashSet<String>();
//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"));

View File

@ -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.
*/