Skip to content

[BUG] [cpp-pistache-server] Wrong json include path in api-header #3061

@mpreu

Description

@mpreu

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • What's the version of OpenAPI Generator used?
  • Have you search for related issues/PRs?
  • What's the actual output vs expected output?
Description

When generating a simple example with the cpp-pistache-server generator the api-header has a wrong include #include "json.hpp" which is not available. The include path needs to be #include <nlohmann/json.hpp>.

openapi-generator version

Checked with

  • latest master
  • latest 5.0.x
OpenAPI declaration file content or url
openapi: 3.0.2
info:
  title: Test oneof
  version: 0.0.1
paths:
  /project:
    get:
      responses:
        200:
          description: ok
components:
  schemas:
    Project:
      properties:
        code:
          type: string
      type: object
Command line used for generation
java -jar openapi-generator-cli.jar generate -g cpp-pistache-server -i openapi.yaml
Steps to reproduce

Generate with example above and try to compile.

Related issues/PRs
Suggest a fix

Change the include path to correct value.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions