[C++] ByteArray type is generated but unknown in C++
Created by: CyrilleBenard
Description
The generator produces a #include "ByteArray.h" and ByteArray type usage whereas it does not exist in C++ I can't find what I'm suppose to DL or install to satisfy the compiler (?)
EDIT: Same issue with Object.h and Object type
Issue exists at least for languages
- cpp-pistache-server
- cpp-restsdk
openapi-generator version
3.0.3-SNAPSHOT
OpenAPI declaration file content or url
openapi: "3.0.0"
info:
version: 1.0.0
title: Check ByteArray
servers:
- url: http://localhost:8080
paths:
/CheckByteArray:
get:
summary: Check Byte Array generation
operationId: list
tags:
- Check
responses:
'200':
description: Every things gonna be alright
headers:
x-next:
description: A link to the next page of responses
schema:
type: string
content:
application/json:
schema:
$ref: "#/components/schemas/Content"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Content"
components:
schemas:
Bytes:
format: byte
type: string
Content:
type: object
properties:
type:
$ref: '#/components/schemas/Bytes'
{
"openapi": "3.0.0",
"info": {
"version": "1.0.0",
"title": "Check ByteArray"
},
"servers": [
{
"url": "http://localhost:8080"
}
],
"paths": {
"/CheckByteArray": {
"get": {
"summary": "Check Byte Array generation",
"operationId": "list",
"tags": [
"Check"
],
"responses": {
"200": {
"description": "Every things gonna be alright",
"headers": {
"x-next": {
"description": "A link to the next page of responses",
"schema": {
"type": "string"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Content"
}
}
}
}
},
"default": {
"description": "unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Content"
}
}
}
}
}
}
},
"components": {
"schemas": {
"Bytes": {
"format": "byte",
"type": "string"
},
"Content": {
"type": "object",
"properties": {
"type": {
"$ref": "#/components/schemas/Bytes"
}
}
}
}
}
}
Command line used for generation
generate -i ./openapi.yaml -g cpp-pistache-server -o .
Steps to reproduce
g++ -c -I./api -I./model -I./impl -Wall -g -std=c++11 -o obj/model/Content.o model/Content.cpp
In file included from model/Content.cpp:14:0:
model/Content.h:24:23: fatal error: ByteArray.h: No such file or directory
See also the model/Content.cpp content to identify some ByteArray type usage
Related issues/PRs
N/A