swagger-api / swagger-api/swagger-codegen

Typo in generated `style.css` for Dynamic HTML

Open
#8,650 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

Description

The style.css file that is generated when creating "dynamic-html" documentation contains a typo that prevents styles from being applied to the main-content div:

Currently (line 25): .main_content
Should be: .main-content

Swagger-codegen version

Version 2.3.1
This is my first time using codegen so I am unsure whether or not this is a regression.

Command line used for generation

This was run in a Windows command prompt:
java -jar PATH\TO\swagger-codegen-cli.jar generate -i swagger-doc.yaml -l dynamic-html -o .\temp

Steps to reproduce
  1. Generate dynamic HTML documentation using the above command line command
  2. Open /docs/assets/css/style.css
  3. Search for "main_content" (it was on line 25 for me)
Related issues/PRs

Unknown

Suggest a fix/enhancement

Typo in CSS output should be corrected.

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 locating the template or entry point that generates /docs/assets/css/style.css for the dynamic-html output, then inspect the selector around line 25. Correct the selector so it matches the main-content div, regenerate the documentation with the reported command, and confirm that main_content no longer appears in the generated stylesheet.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, html
Domain
documentation, frontend
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.