forked from loafle/openapi-generator-original
* Added C++ generator for Pistache * Revert of CodegenOperation * Updated template * Removed isRestful from method declaration * Updated httpMethod variable * Changed isRestfulCreate
33 lines
1.1 KiB
Plaintext
33 lines
1.1 KiB
Plaintext
{{>licenseInfo}}
|
|
{{#operations}}
|
|
|
|
#include "{{classname}}Impl.h"
|
|
|
|
{{#apiNamespaceDeclarations}}
|
|
namespace {{this}} {
|
|
{{/apiNamespaceDeclarations}}
|
|
|
|
using namespace {{modelNamespace}};
|
|
|
|
{{classname}}Impl::{{classname}}Impl(Net::Address addr)
|
|
: {{classname}}(addr)
|
|
{ }
|
|
|
|
{{#operation}}
|
|
{{#vendorExtensions.x-codegen-pistache-isParsingSupported}}
|
|
void {{classname}}Impl::{{operationIdSnakeCase}}({{#allParams}}const {{#isPrimitiveType}}{{{dataType}}}{{/isPrimitiveType}}{{^isPrimitiveType}}{{{baseType}}}{{/isPrimitiveType}} &{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}{{#hasParams}}, {{/hasParams}}Net::Http::ResponseWriter &response) {
|
|
response.send(Net::Http::Code::Ok, "Do some magic\n");
|
|
}
|
|
{{/vendorExtensions.x-codegen-pistache-isParsingSupported}}
|
|
{{^vendorExtensions.x-codegen-pistache-isParsingSupported}}
|
|
void {{classname}}Impl::{{operationIdSnakeCase}}(const Net::Rest::Request &request, Net::Http::ResponseWriter &response){
|
|
response.send(Net::Http::Code::Ok, "Do some magic\n");
|
|
}
|
|
{{/vendorExtensions.x-codegen-pistache-isParsingSupported}}
|
|
{{/operation}}
|
|
|
|
{{#apiNamespaceDeclarations}}
|
|
}
|
|
{{/apiNamespaceDeclarations}}
|
|
|
|
{{/operations}} |