Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG][C++] cpp-pistache - missing support for object without properties/additionalProperties #1827

Open
etherealjoy opened this issue Jan 6, 2019 · 2 comments

Comments

@etherealjoy
Copy link
Contributor

etherealjoy commented Jan 6, 2019

Description

When the model or inline type is type object only with no additionalProperties or properties the compilation failed due to reference to Object type.

fatal error: Object.h: No such file or directory
 #include "Object.h"
openapi-generator version

master

OpenAPI declaration file content or url
definitions:
  Result:
    type: object
Related issues/PRs

#1637

@stkrwork stkrwork changed the title [BUG] cpp-pistache - missing support for object without properties/additionalProperties [BUG][C++] cpp-pistache - missing support for object without properties/additionalProperties Jan 6, 2019
@muttleyxd
Copy link
Contributor

This issue also occurs with object types which are in arrays, should I create a separate issue for this?

openapi: 3.0.0
info:
  description: Some description
  version: 0.0.1
  title: Some title

tags:
  - name: hello

paths:
  "/there":
    get:
      operationId: helloThereGet
      tags:
        - hello
      summary: Do something
      responses:
        200:
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblematicArrayType"
servers:
  - url: http://localhost:8080
components:
  schemas:
    ProblematicArrayType:
      type: array
      items:
        type: object
        properties:
          someint:
            type: integer
            format: int32
          somestring:
            type: string

It will result in Object.h missing for cpp-restbed-server and cpp-pistache-server

@etherealjoy
Copy link
Contributor Author

This issue also occurs with object types which are in arrays, should I create a separate issue for this?

No this is a different issue, also easier to solve. Please open a different ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants