swagger-api / swagger-api/swagger-codegen

[C++][pistache-server] Unable to run user_api_server

Open
#9,300 0 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

user_api_server craches with message
terminate called after throwing an instance of 'std::out_of_range'

The problem happens on the line 47 of UserApi.cpp which calls:
Routes::Post(router, base + "/user", Routes::bind(&UserApi::create_user_handler,this))

Swagger-codegen version: taken from git on March 23

Example compiled with
cmake (3.6.3)
make (G++ 4.8.2)

Launched with the command
user_api_server

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

Reproduce the failure by launching user_api_server, then inspect line 47 of UserApi.cpp and the Routes::Post call mentioned in the report. Trace the std::out_of_range exception to identify why the generated server crashes; done means the command starts without that exception.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.