Use swagger-codegen:
swagger-codegen generate -i <path to your swagger file> -l html2 -o <path to output location>
If you decide to customize the HTML template:
- Clone the swagger-codegen project from github
- Copy
modules/swagger-codegen/src/main/resources/htmlDocs2 folder to another place, for example: cp -R modules/swagger-codegen/src/main/resources/htmlDocs2 ~/templates
- Modify the
.mustache templates in ~/templates to fit your requirements.
- Run:
swagger-codegen generate -i <path to your swagger file> -l html2 -o <path to output location> -t <templates path> for <templates path> should be ~/templates in the example above.