OpenAPITools / OpenAPITools/openapi-generator

HTML generated mangles field names with underscores

Open
#1,340 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Doc: HTML Issue: Bug
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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.