swagger-api / swagger-api/swagger-codegen
[typescript-fetch] reserved words not converted in request body
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
Reserved words in request body is not converted original parameter name.
Swagger-codegen version
Swagger declaration file content or url
If you post the code inline, please wrap it with
...
History:
title: History
type: object
properties:
id:
type: integer
format: int32
case:
type: string
Generate with this yaml and case to be _case.
But when I call api with request body include _case it causing error.
Because it has no case value.
Command line used for generation
java -jar swagger-codegen.jar generate -l typescript-fetch -o src -i http://localhost:8080/v2/api-docs
Steps to reproduce
Related issues/PRs
Suggest a fix/enhancement
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the provided swagger-codegen command with the YAML schema containing the reserved property case, then inspect the generated typescript-fetch request-body handling. Confirm where _case is converted back to the original case name; done when requests containing _case serialize successfully with the case property expected by the API.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100