[pistache-server] (C++ stub) - Optional type unknown - compile failed
Created by: CyrilleBenard
Description
I tried to follow the OpenAPI V3 tutorial but as soon as my openapi file uses the "Query parameters " my generated C++ code does not compile anymore.
See
parameters:
- name: limit
in: query
description: Limits the number of items on a page
schema:
type: integer
- name: offset
in: query
description: Specifies the page number of the artists to be displayed
schema:
type: integer
Compile command line and error looks like :
g++ -c -I./api -I./model -I./impl -Wall -g -std=c++11 -o obj/api/DefaultApi.o api/DefaultApi.cpp
In file included from api/DefaultApi.cpp:13:0:
api/DefaultApi.h:72:36: error: ‘Optional’ does not name a type
virtual void artists_get(const Optional<int32_t> &limit, const Optional<int32_t> &offset, Pistache::
My g++ version is 5.4.0 running on Gnome UBuntu 16.04
Is there any g++ version requirement or something I missed ?
openapi-generator version
v3.0.0
OpenAPI declaration file content or url
The openapi file is the one posted here See Parameters (sorry, the URL seems to be not fully handled)
Command line used for generation
openapi-generator-cli.sh generate -i ../../api-ms1/openapi.yaml -g cpp-pistache-server -c ./config.json -o .
Steps to reproduce
Just generate and compile the code
Compile line is almost the standard one :
g++ -c -I./api -I./model -I./impl -Wall -g -std=c++11 -o obj/api/DefaultApi.o api/DefaultApi.cpp
Related issues/PRs
n/a
Suggest a fix/enhancement
No additional information