Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #2338
Closed
Open
Issue created Mar 09, 2019 by Administrator@rootContributor4 of 5 checklist items completed4/5 checklist items

[BUG] [C] Generating C client undefined `object.h` in

Created by: stdevMac

Bug Report Checklist

ll/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?
  • [Optional] Bounty to sponsor the fix (editor.swagger)
Description

I am trying to compile the library generated using openapi-generator with the past command, because this is what i need for my project, not use directly the files. I try with other specs and i don't have any problem, is just with mine, and is only in C, because i try library generated in CSharp and Python and work very well.

openapi-generator version

@openapitools/openapi-generator-cli@cli-3.3.4

OpenAPI declaration file content or url

You can find the yml we create in the next address: https://gist.github.com/stdevMac/2df88707fbbe652424cc35e043be828b

Command line used for generation
$ openapi-generator generate -g c --additional-properties=prependFormOrBodyParameters=true -o ./c_swagger -i ./swagger.yml
Steps to reproduce

Just run this after follow all the steps in generated README.md

$ gcc $(find . -name '*.c')  -I ./model -I ./include -I ./external/include -o p.out -lcurl 
In file included from ./api/DefaultAPI.c:15:0:
./model/inline_response_200_7.h:13:10: fatal error: object.h: No such file or directory
 #include "object.h"
          ^~~~~~~~~~
compilation terminated.
In file included from ./model/inline_response_200_7.c:7:0:
./model/inline_response_200_7.h:13:10: fatal error: object.h: No such file or directory
 #include "object.h"
          ^~~~~~~~~~
compilation terminated.
Assignee
Assign to
Time tracking