https://github.com/jimschubert/template-classpath-example
https://github.com/jimschubert/template-classpath-example
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jimschubert/template-classpath-example
- Owner: jimschubert
- Created: 2020-01-30T04:35:57.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-30T04:36:10.000Z (over 6 years ago)
- Last Synced: 2025-10-26T15:47:49.428Z (9 months ago)
- Language: HTML
- Size: 55.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# OpenAPI Generator Template via Classpath
A somewhat silly example to demonstrate loading template files via classpath.
It's silly because nobody will want [Bangers](https://fonts.google.com/specimen/Bangers?selection.family=Bangers) as their documentation font!
## Use it
### Compile
```
gradle build publishToMavenLocal
```
### Consume
You can target this custom artifact and generate ike this:
```sh
java -cp ~/.m2/repository/org/openapitools/samples/template-classpath-example/1.0-SNAPSHOT/template-classpath-example-1.0-SNAPSHOT.jar:modules/openapi-generator-cli/target/openapi-generator-cli.jar org.openapitools.codegen.OpenAPIGenerator generate -i https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml -g html -o template-example -t templates/htmlDocs
```
Open `template-example/index.html` in your browser and take a look.