Skip to content
Faiçal Tchirou edited this page Nov 13, 2016 · 1 revision

Code Generator Documentation

Get the code generator

  1. $ git clone git@github.com:ConnectCorp/swagger-codegen.git
  2. $ cd swagger-codegen
  3. $ git checkout develop
  4. $ ./gradlew assemble

Run the code generator

java -jar modules/swagger-codegen-cli/build/libs/swagger-codegen-cli-2.1.6-SNAPSHOT.jar \
  -i <swagger_spec_filepath_or_url>  \
  --additional-properties <prop1=value1[,prop2=value2]*>
  -l LoopBackSwift \
  -o <output_folder>

Additional Properties

General
  • projectName the name of the project, also the name of the folder where the generated files are copied and the name of the resulting pod. Defaults to LoopBackSwiftClient.
Data API
  • generateDataAPI a boolean (true | false) which specifies whether to generate a generic data API. Defaults to false.
Realm
  • useRealm a boolean (true| false) which specifies whether the models should inherit Object from Realm. Defaults to false.
  • realmPrimaryKey the name of the property which should be used as primary key in case the models inherit Realm's Object. Defaults to id.
Podspec
  • projectVersion the version of the resulting pod. There should be a tag which name is projectVersion in the git repo which will host the generated code.
  • projectAuthors
  • projectHomepage a publicly accessible homepage.
  • projectSummary
  • projectSource the git repo which will host the generated code.
  • projectLicense defaults to The MIT License (MIT)
License information
  • projectLicenseYear
  • projectLicenseCopyright