Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
c245f21
[Objc] fixed code generation for collection parameter
May 19, 2016
942b015
Add normal class enum support
zlx May 23, 2016
a9b8150
regenerate ruby client sample
zlx May 23, 2016
24a0ced
regenerate ruby spec file
zlx May 23, 2016
00c4877
move swift samples into swift/default and swift/promisekit directories
jaz-ah May 24, 2016
6737844
couple new files
jaz-ah May 24, 2016
c7110de
update ruby api client to use apache v2 license
wing328 May 24, 2016
d05d552
Merge pull request #2946 from wing328/ruby_license
wing328 May 24, 2016
041c5d1
Replaced \n with PHP_EOL
May 24, 2016
6aa821d
Rebuild php petstore sample client
May 24, 2016
04eca71
update pom to use 2.2.0-SNAPSHOT
wing328 May 24, 2016
568fa4f
add apache license to remaining ruby files (test, spec, etc)
wing328 May 24, 2016
dbc3e41
udpate pom for other sub modules
wing328 May 24, 2016
68878ff
Merge pull request #2951 from wing328/ruby_add_license
wing328 May 24, 2016
29008b5
add licence template for ruby api client
wing328 May 24, 2016
d0770d2
Merge pull request #2953 from wing328/ruby_add_license
wing328 May 24, 2016
105b4b9
new test case to cover model with array properties
wing328 May 24, 2016
06dd7c4
add custom generator example to readme
sreich May 24, 2016
fefd507
Merge pull request #2956 from sreich/patch-1
fehguy May 24, 2016
4404b90
[Swift] Remove force unwrap in model constructor
fabdslv May 24, 2016
d55a691
fix path
jaz-ah May 24, 2016
0f62433
Merge pull request #2954 from wing328/add_test_array
wing328 May 25, 2016
8096308
add apache v2 license to csharp api client
wing328 May 25, 2016
2f11049
Merge pull request #2960 from wing328/chsarp_add_license
wing328 May 25, 2016
38a4222
Merge pull request #2948 from mikolajprzybysz/use-php-eol
wing328 May 25, 2016
0a724a3
update pom for swagger codegen module
wing328 May 25, 2016
537ee96
[Objc] Add Apache v2 license to auto-generated files #2963
May 25, 2016
31aee5b
Merge pull request #2950 from wing328/update_pom_220
wing328 May 25, 2016
9598974
Merge pull request #2908 from iomark/master
wing328 May 25, 2016
4df1409
update version to 2.2.0-SNAPSHOT
wing328 May 25, 2016
09a2906
add markdown docs for java api client using retrofit2;
zhenjun115 May 25, 2016
ce426ee
add SCOOP software
wing328 May 25, 2016
c68168f
- Remove optional license property
May 25, 2016
7b57a26
added apache LICENSE
guohuang May 25, 2016
d9d3a41
[PHP] add apache v2 license to PHP client
arnested May 25, 2016
5c97d1b
[PHP] Improve code style of generated code
arnested May 25, 2016
349b727
Include license in genrated client
scottrw93 May 25, 2016
e0dbb44
Put license header in shared file
scottrw93 May 25, 2016
e41019f
[PHP] Regenerate petstore sample
arnested May 25, 2016
a589a6b
update package.json and fix webpack.html
leonyu May 26, 2016
f47b6eb
Merge pull request #2971 from arnested/php-license
wing328 May 26, 2016
f448ec3
Merge pull request #2969 from guohuang/license
wing328 May 26, 2016
a86a4ac
add dbbest
wing328 May 26, 2016
95ba8ac
Merge pull request #2952 from jaz-ah/swift/dirs
wing328 May 26, 2016
d8dec24
Merge pull request #2973 from leonyu/update_tsify
wing328 May 26, 2016
aeaf607
Merge branch 'feature/ruby_enum_support2' of https://github.com/zlx/s…
wing328 May 26, 2016
8443fea
Merge branch 'zlx-feature/ruby_enum_support2'
wing328 May 26, 2016
648ef35
Merge branch 'master' of https://github.com/swagger-api/swagger-codegen
wing328 May 26, 2016
3e131d1
update pom to cover ts fetch api client
wing328 May 26, 2016
662d4ef
Merge pull request #2957 from fabdslv/rm-force-unwrap
wing328 May 26, 2016
c3b5cfb
Merge pull request #2976 from wing328/ts_fetch_ci
wing328 May 26, 2016
23271d7
Update license header
scottrw93 May 26, 2016
c18241c
Update license header
scottrw93 May 26, 2016
f5ff62e
Merge pull request #2972 from scottrw93/license
wing328 May 27, 2016
d82c77d
- [Objc] Fix test after removing license property
May 27, 2016
ef66f96
Moved GlobalSupportingFile to separate file
May 27, 2016
063f83f
Merge branch 'objc/License' of https://github.com/mateuszmackowiak/sw…
wing328 May 28, 2016
bd1aab0
Merge branch 'mateuszmackowiak-objc/License'
wing328 May 28, 2016
7f2a16a
Add ability to set useQuerystring on request globally for api.
May 18, 2016
8094425
Run bash to generate new client.
May 18, 2016
23c9a17
Update typings to not use globals/ambients. Update tsconfig to use ex…
May 24, 2016
b3d5271
Honor gitignore in npm folder.
May 24, 2016
abf2879
Add node and corejs to ambient typings since they represent native ty…
May 24, 2016
449e74b
Move changes to samples to source code. Build, run, test.
May 24, 2016
eccd4d5
[csharp] map number/no format to Decimal
jimschubert May 28, 2016
d172de2
[codegen ignore] Add tests, fix two minor issues
jimschubert May 29, 2016
e6825ea
Merge pull request #2989 from wing328/ts_querystring_cherrypick2
wing328 May 29, 2016
4b74f6c
add defaulat license (apache2.0) to all generators
wing328 May 29, 2016
00beca9
Merge pull request #2993 from wing328/add_default_license
wing328 May 29, 2016
6d1fd2c
fix spec for map and array
wing328 May 29, 2016
a27cda6
update nodejs/ts package license to use Apache-2.0
wing328 May 29, 2016
4d8d4e6
Merge pull request #2995 from wing328/feature/model_map_property
wing328 May 29, 2016
a566b08
add new files for JS client
wing328 May 29, 2016
a1e9b8f
Merge pull request #2990 from jimschubert/cs/number_to_decimal
wing328 May 29, 2016
e0c3aa2
[codegen ignore] Lazy test setup
jimschubert May 29, 2016
8a403a0
2983: Java Feign client generator: HTTP header name should be named …
daknin May 27, 2016
6e83939
Merge pull request #2984 from daknin/2983
wing328 May 30, 2016
535a782
add [Kabuku](http://www.kabuku.co.jp/en)
wing328 May 30, 2016
9d581a7
Merge pull request #2968 from zhenjun115/java_api_client
wing328 May 30, 2016
b6595f7
add appendix to license
wing328 May 30, 2016
fb68f61
Merge pull request #2992 from jimschubert/swagger_codegen_ignore_docs
wing328 May 30, 2016
867a4f8
Merge pull request #2996 from wing328/package_json_license
wing328 May 30, 2016
e7baa17
Add LICENSE into rails5
zlx May 30, 2016
81b6ccf
Merge pull request #2999 from wing328/update_license
wing328 May 30, 2016
ceda86b
[Objc] Basic Core data support
May 23, 2016
5145bee
[Objc] coraData cli option changed from y/n to true false
May 27, 2016
bfd71c1
[Objc] CoreData added test
May 27, 2016
8aa7774
[Objc] CoreData pod spec add resources only if useCoreData is on
May 28, 2016
a8daf94
Remove nullability warnings
May 25, 2016
7719caf
fix CI issue
wing328 May 30, 2016
14aefe7
Merge pull request #3000 from zlx/rails-5-license
wing328 May 30, 2016
4f9b43b
Merge pull request #2988 from wing328/objc_core_data_cherrypick2
wing328 May 30, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ samples/client/petstore/swift/SwaggerClientTests/Pods/Pods.xcodeproj/xcshareddat

# C#
*.csproj.user
samples/client/petstore/csharp/SwaggerClient/IO.Swagger.userprefs
samples/client/petstore/csharp/SwaggerClientTest/.vs
samples/client/petstore/csharp/SwaggerClientTest/obj
samples/client/petstore/csharp/SwaggerClientTest/bin
Expand Down
43 changes: 42 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20

Swagger Codegen Version | Release Date | OpenAPI Spec compatibility | Notes
-------------------------- | ------------ | -------------------------- | -----
2.1.7-SNAPSHOT | | 1.0, 1.1, 1.2, 2.0 | [master](https://github.com/swagger-api/swagger-codegen)
2.2.0-SNAPSHOT | | 1.0, 1.1, 1.2, 2.0 | [master](https://github.com/swagger-api/swagger-codegen)
2.1.6 (**current stable**) | 2016-04-06 | 1.0, 1.1, 1.2, 2.0 | [tag v2.1.6](https://github.com/swagger-api/swagger-codegen/tree/v2.1.6)
2.0.17 | 2014-08-22 | 1.1, 1.2 | [tag v2.0.17](https://github.com/swagger-api/swagger-codegen/tree/v2.0.17)
1.0.4 | 2012-04-12 | 1.0, 1.1 | [tag v1.0.4](https://github.com/swagger-api/swagger-codegen/tree/swagger-codegen_2.9.1-1.1)
Expand Down Expand Up @@ -408,6 +408,44 @@ java -Dapis -DmodelTests=false {opts}

When using selective generation, _only_ the templates needed for the specific generation will be used.

### Ignore file format

Swagger codegen supports a `.swagger-codegen-ignore` file, similar to `.gitignore` or `.dockerignore` you're probably already familiar with.

The ignore file allows for better control over overwriting existing files than the `--skip-overwrite` flag. With the ignore file, you can specify individual files or directories can be ignored. This can be useful, for example if you only want a subset of the generated code.

Examples:

```
# Swagger Codegen Ignore
# Lines beginning with a # are comments

# This should match build.sh located anywhere.
build.sh

# Matches build.sh in the root
/build.sh

# Exclude all recursively
docs/**

# Explicitly allow files excluded by other rules
!docs/UserApi.md

# Recursively exclude directories named Api
# You can't negate files below this directory.
src/**/Api/

# When this file is nested under /Api (excluded above),
# this rule is ignored because parent directory is excluded by previous rule.
!src/**/PetApiTests.cs

# Exclude a single, nested file explicitly
src/IO.Swagger.Test/Model/AnimalFarmTests.cs
```

The `.swagger-codegen-ignore` file must exist in the root of the output directory.

### Customizing the generator

There are different aspects of customizing the code generator beyond just creating or modifying templates. Each language has a supporting configuration file to handle different type mappings, etc:
Expand Down Expand Up @@ -814,6 +852,7 @@ Here are some companies/projects using Swagger Codegen in production. To add you
- [Cachet Financial](http://www.cachetfinancial.com/)
- [CloudBoost](https://www.CloudBoost.io/)
- [Cupix](http://www.cupix.com)
- [DBBest Technologies](https://www.dbbest.com)
- [DocuSign](https://www.docusign.com)
- [Ergon](http://www.ergon.ch/)
- [eureka](http://eure.jp/)
Expand All @@ -824,6 +863,7 @@ Here are some companies/projects using Swagger Codegen in production. To add you
- [Interactive Intelligence](http://developer.mypurecloud.com/)
- [LANDR Audio](https://www.landr.com/)
- [LiveAgent](https://www.ladesk.com/)
- [Kabuku](http://www.kabuku.co.jp/en)
- [Kuary](https://kuary.com/)
- [nViso](http://www.nviso.ch/)
- [Okiok](https://www.okiok.com)
Expand All @@ -836,6 +876,7 @@ Here are some companies/projects using Swagger Codegen in production. To add you
- [REstore](https://www.restore.eu)
- [Revault Sàrl](http://revault.ch)
- [Royal Bank of Canada (RBC)](http://www.rbc.com/canada.html)
- [SCOOP Software GmbH](http://www.scoop-software.de)
- [SmartRecruiters](https://www.smartrecruiters.com/)
- [StyleRecipe](http://stylerecipe.co.jp)
- [Svenska Spel AB](https://www.svenskaspel.se/)
Expand Down
2 changes: 1 addition & 1 deletion bin/objc-petstore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ fi

# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="$@ generate -t modules/swagger-codegen/src/main/resources/objc -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l objc -o samples/client/petstore/objc"
ags="$@ generate -t modules/swagger-codegen/src/main/resources/objc -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l objc -o samples/client/petstore/objc --additional-properties coreData=true"

java -DappName=PetstoreClient $JAVA_OPTS -jar $executable $ags
2 changes: 1 addition & 1 deletion bin/swift-petstore-promisekit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ fi

# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="$@ generate -t modules/swagger-codegen/src/main/resources/swift -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l swift -c ./bin/swift-petstore-promisekit.json -o samples/client/petstore/swift-promisekit"
ags="$@ generate -t modules/swagger-codegen/src/main/resources/swift -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l swift -c ./bin/swift-petstore-promisekit.json -o samples/client/petstore/swift/promisekit"

java $JAVA_OPTS -jar $executable $ags
2 changes: 1 addition & 1 deletion bin/swift-petstore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ fi

# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="$@ generate -t modules/swagger-codegen/src/main/resources/swift -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l swift -c ./bin/swift-petstore.json -o samples/client/petstore/swift"
ags="$@ generate -t modules/swagger-codegen/src/main/resources/swift -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l swift -c ./bin/swift-petstore.json -o samples/client/petstore/swift/default"

java $JAVA_OPTS -jar $executable $ags
4 changes: 2 additions & 2 deletions modules/swagger-codegen-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>io.swagger</groupId>
<artifactId>swagger-codegen-project</artifactId>
<version>2.1.6</version>
<version>2.2.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down Expand Up @@ -100,4 +100,4 @@
</dependency>
</dependencies>

</project>
</project>
40 changes: 39 additions & 1 deletion modules/swagger-codegen-maven-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,44 @@ mvn clean compile
- `configOptions` - a map of language-specific parameters (see below)
- `configHelp` - dumps the configuration help for the specified library (generates no sources)

### Custom Generator

Specifying a custom generator is a bit different. It doesn't support the classpath:/ syntax, but it does support the fully qualified name of the package. You can also specify your custom templates, which also get pulled in. Notice the dependency on a project, in the plugin scope. That would be your generator/template jar.

```xml
<plugin>
<groupId>io.swagger</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<version>${swagger-codegen-maven-plugin-version}</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>src/main/resources/yaml/yamlfilename.yaml</inputSpec>
<!-- language file, like e.g. JavaJaxRSCodegen shipped with swagger -->
<language>com.my.package.for.GeneratorLanguage</language>
<templateDirectory>myTemplateDir</templateDirectory>

<output>${project.build.directory}/generated-sources</output>
<apiPackage>${default.package}.handler</apiPackage>
<modelPackage>${default.package}.model</modelPackage>
<invokerPackage>${default.package}.handler</invokerPackage>
</configuration>
</execution>
</executions>

<dependencies>
<dependency>
<groupId>com.my.generator</groupId>
<artifactId>customgenerator</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
</plugin>
```

### Sample configuration

- Please see [an example configuration](examples) for using the plugin
- Please see [an example configuration](examples) for using the plugin
2 changes: 1 addition & 1 deletion modules/swagger-codegen-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.swagger</groupId>
<artifactId>swagger-codegen-project</artifactId>
<version>2.1.6</version>
<version>2.2.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<artifactId>swagger-codegen-maven-plugin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion modules/swagger-codegen/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>io.swagger</groupId>
<artifactId>swagger-codegen-project</artifactId>
<version>2.1.6</version>
<version>2.2.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,8 @@ public DefaultCodegen() {
importMapping.put("LocalDate", "org.joda.time.*");
importMapping.put("LocalTime", "org.joda.time.*");

supportingFiles.add(new GlobalSupportingFile("LICENSE", "LICENSE"));

cliOptions.add(CliOption.newBoolean(CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG,
CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG_DESC).defaultValue(Boolean.TRUE.toString()));
cliOptions.add(CliOption.newBoolean(CodegenConstants.ENSURE_UNIQUE_PARAMS, CodegenConstants
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -530,9 +530,12 @@ public int compare(CodegenOperation one, CodegenOperation another) {
LOGGER.info("Skipped overwriting " + outputFilename);
continue;
}

String templateFile = getFullTemplateFile(config, support.templateFile);

String templateFile;
if( support instanceof GlobalSupportingFile) {
templateFile = config.getCommonTemplateDir() + File.separator + support.templateFile;
} else {
templateFile = getFullTemplateFile(config, support.templateFile);
}
boolean shouldGenerate = true;
if(supportingFilesToGenerate != null && supportingFilesToGenerate.size() > 0) {
if(supportingFilesToGenerate.contains(support.destinationFilename)) {
Expand Down Expand Up @@ -605,6 +608,19 @@ public Reader getTemplate(String name) {
}
files.add(ignoreFile);
}

// Add default LICENSE (Apache-2.0) for all generators
final String apache2License = "LICENSE";
String licenseFileNameTarget = config.outputFolder() + File.separator + apache2License;
File licenseFile = new File(licenseFileNameTarget);
String licenseFileNameSource = File.separator + config.getCommonTemplateDir() + File.separator + apache2License;
String licenseFileContents = readResourceContents(licenseFileNameSource);
try {
writeToFile(licenseFileNameTarget, licenseFileContents);
} catch (IOException e) {
throw new RuntimeException("Could not generate LICENSE file '" + apache2License + "'", e);
}
files.add(licenseFile);
}
config.processSwagger(swagger);
return files;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package io.swagger.codegen;

public class GlobalSupportingFile extends SupportingFile {

GlobalSupportingFile(String templateFile, String folder, String destinationFilename) {
super(templateFile, folder, destinationFilename);
}

GlobalSupportingFile(String templateFile, String destinationFilename) {
super(templateFile, destinationFilename);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ public class SupportingFile {
public String folder;
public String destinationFilename;

public SupportingFile(String templateFile, String destinationFilename) {
this(templateFile, "", destinationFilename);
}

public SupportingFile(String templateFile, String folder, String destinationFilename) {
this.templateFile = templateFile;
this.folder = folder;
Expand Down Expand Up @@ -44,4 +48,6 @@ public int hashCode() {
result = 31 * result + (destinationFilename != null ? destinationFilename.hashCode() : 0);
return result;
}
}
}


Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
package io.swagger.codegen.ignore.rules;

import java.nio.file.FileSystems;
import java.nio.file.PathMatcher;
import java.nio.file.*;
import java.util.List;

public class DirectoryRule extends FileRule {

private PathMatcher matcher = null;
private PathMatcher directoryMatcher = null;
private PathMatcher contentsMatcher = null;

DirectoryRule(List<Part> syntax, String definition) {
super(syntax, definition);
matcher = FileSystems.getDefault().getPathMatcher("glob:**/"+this.getPattern());
String pattern = this.getPattern();
StringBuilder sb = new StringBuilder();
sb.append("glob:");
sb.append(pattern);
if(!pattern.endsWith("/")) sb.append("/");
directoryMatcher = FileSystems.getDefault().getPathMatcher(sb.toString());
sb.append("**");
contentsMatcher = FileSystems.getDefault().getPathMatcher(sb.toString());
}

@Override
public Boolean matches(String relativePath) {
return matcher.matches(FileSystems.getDefault().getPath(relativePath));
return contentsMatcher.matches(FileSystems.getDefault().getPath(relativePath)) || directoryMatcher.matches(FileSystems.getDefault().getPath(relativePath));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,13 @@ static List<Part> parse(String text) throws ParserException {
i++;
continue;
} else {

if (sb.length() > 0) {
// A MATCH_ANY may commonly follow a filename or some other character. Dump that to results before the MATCH_ANY.
parts.add(new Part(Token.TEXT, sb.toString()));
sb.delete(0, sb.length());
}

parts.add(new Part(Token.MATCH_ANY));
continue;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ public AbstractCSharpCodegen() {
"string",
"bool?",
"double?",
"decimal?",
"int?",
"long?",
"float?",
Expand Down Expand Up @@ -112,7 +113,7 @@ public AbstractCSharpCodegen() {
typeMapping.put("float", "float?");
typeMapping.put("long", "long?");
typeMapping.put("double", "double?");
typeMapping.put("number", "double?");
typeMapping.put("number", "decimal?");
typeMapping.put("datetime", "DateTime?");
typeMapping.put("date", "DateTime?");
typeMapping.put("file", "System.IO.Stream");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,8 @@ public void processOpts() {
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
supportingFiles.add(new SupportingFile("git_push.sh.mustache", "", "git_push.sh"));
supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore"));
// apache v2 license
supportingFiles.add(new SupportingFile("LICENSE", "", "LICENSE"));

if (optionalAssemblyInfoFlag) {
supportingFiles.add(new SupportingFile("AssemblyInfo.mustache", packageFolder + File.separator + "Properties", "AssemblyInfo.cs"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ public void processOpts() {
supportingFiles.add(new SupportingFile("api_response.mustache", "", "api_response.go"));
supportingFiles.add(new SupportingFile(".travis.yml", "", ".travis.yml"));
supportingFiles.add(new SupportingFile("pom.mustache", "", "pom.xml"));
supportingFiles.add(new SupportingFile("LICENSE", "", "LICENSE"));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,13 @@ public void processOpts() {
gradleWrapperPackage.replace( ".", File.separator ), "gradle-wrapper.properties") );
supportingFiles.add( new SupportingFile( "gradle-wrapper.jar",
gradleWrapperPackage.replace( ".", File.separator ), "gradle-wrapper.jar") );

//generate markdown docs for retrofit2
if ( usesRetrofit2Library() ){
modelDocTemplateFiles.put("model_doc.mustache", ".md");
apiDocTemplateFiles.put("api_doc.mustache", ".md");
}

} else if("jersey2".equals(getLibrary())) {
// generate markdown docs
modelDocTemplateFiles.put("model_doc.mustache", ".md");
Expand Down
Loading