swagger-api / swagger-api/swagger-codegen
[HTML2] A Copy to Clipboard button would have been handy
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Right Now the swagger-codegen for html2 generates sample code but there are no "copy to clipboard" button in the generated HTML
Description
It would be nice to have a copy button
Swagger-codegen version
2.3.1 as well as latest from the main branch
Swagger declaration file content or url
Any regular json/YAML can produce this
Command line used for generation
Steps to reproduce
Related issues/PRs
Suggest a fix/enhancement
Adding a copy button to the index.moustance can solve the problem
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 generated HTML template identified as index.mustache and inspect how sample code is rendered in the html2 output. Add a copy-to-clipboard control for the generated samples, then verify the resulting HTML in a browser using a regular JSON or YAML Swagger definition; the done state is a usable copy button in the generated page.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html
- Domain
- documentation
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100