Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Wiki
  • FAQ

FAQ · Changes

Page history
replace -l with -g authored Apr 08, 2019 by William Cheng's avatar William Cheng
Show whitespace changes
Inline Side-by-side
FAQ.md
View page @ b7160cbe
...@@ -39,7 +39,7 @@ Here is an example using `debugModels`: ...@@ -39,7 +39,7 @@ Here is an example using `debugModels`:
mvn clean package mvn clean package
java -DdebugModels=true -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate \ java -DdebugModels=true -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate \
-i https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.json \ -i https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.json \
-l ruby -o /var/tmp/ruby/ -g ruby -o /var/tmp/ruby/
``` ```
### How do "tags" affect the generated code? ### How do "tags" affect the generated code?
...@@ -75,7 +75,7 @@ You can use the `-t` option with the customized templates. Here is an example ad ...@@ -75,7 +75,7 @@ You can use the `-t` option with the customized templates. Here is an example ad
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate \ java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate \
-i modules/openapi-generator/src/test/resources/2_0/petstore.yaml \ -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml \
-t /var/tmp/ruby -t /var/tmp/ruby
-l ruby -o /var/tmp/ruby_api_client/ -g ruby -o /var/tmp/ruby_api_client/
``` ```
### What are some of the use cases of the server generators (e.g. Java Spring, C# NancyFx)? ### What are some of the use cases of the server generators (e.g. Java Spring, C# NancyFx)?
...@@ -171,7 +171,7 @@ config.templateDir = 'src/openapi-generator-templates/Java/libraries/feign ...@@ -171,7 +171,7 @@ config.templateDir = 'src/openapi-generator-templates/Java/libraries/feign
mvn clean package mvn clean package
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate \ java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate \
-i https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.json \ -i https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.json \
-l java --library=okhttp-gson \ -g java --library=okhttp-gson \
-D hideGenerationTimestamp=true \ -D hideGenerationTimestamp=true \
-o /var/tmp/java/okhttp-gson/ -o /var/tmp/java/okhttp-gson/
``` ```
...@@ -179,7 +179,7 @@ java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generat ...@@ -179,7 +179,7 @@ java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generat
You can also generate the Java SDK with other HTTP libraries by replacing `okhttp-gson` with `retrofit` for example. For a list of support libraries, please run You can also generate the Java SDK with other HTTP libraries by replacing `okhttp-gson` with `retrofit` for example. For a list of support libraries, please run
``` ```
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar config-help -l java java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar config-help -g java
``` ```
To generate the Android SDK with [`volley`](https://github.com/mcxiaoke/android-volley), please run To generate the Android SDK with [`volley`](https://github.com/mcxiaoke/android-volley), please run
...@@ -187,7 +187,7 @@ To generate the Android SDK with [`volley`](https://github.com/mcxiaoke/android- ...@@ -187,7 +187,7 @@ To generate the Android SDK with [`volley`](https://github.com/mcxiaoke/android-
mvn clean package mvn clean package
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate \ java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate \
-i https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.json \ -i https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.json \
-l android --library=volley \ -g android --library=volley \
-o /var/tmp/android/volley/ -o /var/tmp/android/volley/
``` ```
We do **not** recommend using the default HTTP library (Apache HttpClient) with `android` as it's not actively maintained. We do **not** recommend using the default HTTP library (Apache HttpClient) with `android` as it's not actively maintained.
......
Clone repository
  • API client generator HOWTO
  • Building your own Templates
  • Customizing client code generation
  • FAQ
  • Git Branches
  • Home
  • How to add a generator for a new language or framework
  • Integration Tests
  • Migration Guide
  • Mustache Template Variables
  • Pull Request Checklist
  • Release Checklist
  • Samples folder
  • Server stub generator HOWTO
  • Vendor Extensions
View All Pages