OpenAPITools / OpenAPITools/openapi-generator
HTML generated mangles field names with underscores
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Description
Assuming a field in the schema with underscores
"created_at": {
the field name in the generated JSON is
createdUnderscoreat
openapi-generator version
3.3.2-SNAPSHOT
OpenAPI declaration file content or url
https://gist.github.com/dkvollmar/79b8822ec94073206695366b8674cad2
Command line used for generation
oag generate -i foo.json -g html -o generatedDocs/.
Steps to reproduce
oag generate -i foo.json -g html -o generatedDocs/.
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 with the OpenAPI declaration linked in the issue and run oag generate -i foo.json -g html -o generatedDocs/. using version 3.3.2-SNAPSHOT. Inspect the generated HTML to trace why the created_at field becomes createdUnderscoreat; done means generated output preserves the declared field name.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100