swagger-api / swagger-api/swagger-codegen

[CPPREST] generates fromJson on std::string and does not compile

Open
#9,099 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Description

When using the web-based codegen for cpprest, I end up code that fails to compile. It creates calls to fromJson, fromMultiPart and toMultiPart on std::string objects. I am new to swagger, I have no idea if this is a problem with the generator or with the json description itself.

Swagger-codegen version

https://editor.swagger.io/

Swagger declaration file content or url

don't know if I am allowed to post it.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by obtaining the Swagger declaration and reproducing the web-based cpprest generation described in the report. Inspect the generated C++ calls involving std::string, fromJson, fromMultiPart, and toMultiPart, then confirm the generated client compiles successfully with those types.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.