Skip to content

Commit e39aa3e

Browse files
committed
fix merge conflict
2 parents 6415018 + c5eda55 commit e39aa3e

File tree

1,388 files changed

+40873
-15852
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,388 files changed

+40873
-15852
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,19 @@ Also please indicate in the issue title which language/library is concerned. Eg:
1313

1414
##### Swagger declaration file content or url
1515

16-
<!-- if it is a bug, a json or yaml that produces it. -->
16+
<!-- if it is a bug, a json or yaml that produces it.
17+
If you post the code inline, please wrap it with
18+
```yaml
19+
(here your code)
20+
```
21+
(for YAML code) or
22+
```json
23+
(here your code)
24+
```
25+
(for JSON code), so it becomes more readable. If it is longer than about ten lines,
26+
please create a Gist (https://gist.github.com) or upload it somewhere else and
27+
link it here.
28+
-->
1729

1830
##### Command line used for generation
1931

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ samples/client/petstore/java/jersey2/.gradle/
6363
samples/client/petstore/java/jersey2/build/
6464
samples/client/petstore/java/okhttp-gson/.gradle/
6565
samples/client/petstore/java/okhttp-gson/build/
66+
samples/client/petstore/java/feign/build/
67+
samples/client/petstore/java/retrofit/build/
68+
samples/client/petstore/java/retrofit2/build/
69+
samples/client/petstore/java/retrofit2rx/build/
70+
samples/client/petstore/java/default/build/
71+
samples/client/petstore/scala/build/
6672

6773
#PHP
6874
samples/client/petstore/php/SwaggerClient-php/composer.lock
@@ -106,6 +112,7 @@ samples/client/petstore/csharp/SwaggerClient/bin
106112
samples/client/petstore/csharp/SwaggerClient/obj/Debug/
107113
samples/client/petstore/csharp/SwaggerClient/bin/Debug/
108114
samples/client/petstore/csharp/SwaggerClient/packages
115+
samples/client/petstore/csharp/SwaggerClient/TestResult.xml
109116

110117
# Python
111118
*.pyc

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ before_install:
1111
# required when sudo: required for the Ruby petstore tests
1212
- gem install bundler
1313
- npm install -g typescript
14+
- sudo pip install virtualenv
1415

1516
install:
1617

CONTRIBUTING.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22

33
## Before submitting an issue
44

5+
- If you're not using the latest master to generate API clients or server stubs, please give it another try by pulling the latest master as the issue may have already been addressed. Ref: [Getting Started](https://github.com/swagger-api/swagger-codegen#getting-started)
56
- Search the [open issue](https://github.com/swagger-api/swagger-codegen/issues) and [closed issue](https://github.com/swagger-api/swagger-codegen/issues?q=is%3Aissue+is%3Aclosed) to ensure no one else has reported something similar before.
6-
- The issue should contain details on how to repeat the issue, e.g.
7-
- the OpenAPI Spec for reproducing the issue (:bulb: use [Gist](https://gist.github.com) to share). If the OpenAPI Spec cannot be shared publicly, it will be hard for the community to help
8-
- version of Swagger Codegen
9-
- language (`-l` in the command line, e.g. java, csharp, php)
10-
- You can also make a suggestion or ask a question by opening an "issue"
7+
- File an [issue ticket](https://github.com/swagger-api/swagger-codegen/issues/new) by providing all the required information.
8+
- You can also make a suggestion or ask a question by opening an "issue".
119

1210
## Before submitting a PR
1311

@@ -42,11 +40,14 @@ Code change should conform to the programming style guide of the respective lang
4240
- Swift: https://developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/Swift_Programming_Language/TheBasics.html
4341
- TypeScript: https://github.com/Microsoft/TypeScript/wiki/Coding-guidelines
4442

45-
4643
For other languages, feel free to suggest.
4744

4845
You may find the current code base not 100% conform to the coding style and we welcome contributions to fix those.
4946

47+
For [Vendor Extensions](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#vendorExtensions), please follow the naming convention below:
48+
- For general vendor extension, use lower case and hyphen. e.g. `x-is-unique`, `x-content-type`
49+
- For language-specified vendor extension, put it in the form of `x-{lang}-{extension-name}`. e.g. `x-objc-operation-id`, `x-java-feign-retry-limit`
50+
5051
### Testing
5152

5253
To add test cases (optional) covering the change in the code generator, please refer to [modules/swagger-codegen/src/test/java/io/swagger/codegen](https://github.com/swagger-api/swagger-codegen/tree/master/modules/swagger-codegen/src/test/java/io/swagger/codegen)

README.md

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,44 @@ java -Dapis -DmodelTests=false {opts}
408408

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

411+
### Ignore file format
412+
413+
Swagger codegen supports a `.swagger-codegen-ignore` file, similar to `.gitignore` or `.dockerignore` you're probably already familiar with.
414+
415+
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.
416+
417+
Examples:
418+
419+
```
420+
# Swagger Codegen Ignore
421+
# Lines beginning with a # are comments
422+
423+
# This should match build.sh located anywhere.
424+
build.sh
425+
426+
# Matches build.sh in the root
427+
/build.sh
428+
429+
# Exclude all recursively
430+
docs/**
431+
432+
# Explicitly allow files excluded by other rules
433+
!docs/UserApi.md
434+
435+
# Recursively exclude directories named Api
436+
# You can't negate files below this directory.
437+
src/**/Api/
438+
439+
# When this file is nested under /Api (excluded above),
440+
# this rule is ignored because parent directory is excluded by previous rule.
441+
!src/**/PetApiTests.cs
442+
443+
# Exclude a single, nested file explicitly
444+
src/IO.Swagger.Test/Model/AnimalFarmTests.cs
445+
```
446+
447+
The `.swagger-codegen-ignore` file must exist in the root of the output directory.
448+
411449
### Customizing the generator
412450

413451
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:
@@ -809,21 +847,25 @@ Here are some companies/projects using Swagger Codegen in production. To add you
809847
- [Activehours](https://www.activehours.com/)
810848
- [Acunetix](https://www.acunetix.com/)
811849
- [Atlassian](https://www.atlassian.com/)
850+
- [Avenida Compras S.A.](https://www.avenida.com.ar)
812851
- [beemo](http://www.beemo.eu)
813852
- [bitly](https://bitly.com)
814853
- [Cachet Financial](http://www.cachetfinancial.com/)
815854
- [CloudBoost](https://www.CloudBoost.io/)
816855
- [Cupix](http://www.cupix.com)
856+
- [DBBest Technologies](https://www.dbbest.com)
817857
- [DocuSign](https://www.docusign.com)
818858
- [Ergon](http://www.ergon.ch/)
819859
- [eureka](http://eure.jp/)
820860
- [everystory.us](http://everystory.us)
821861
- [Expected Behavior](http://www.expectedbehavior.com/)
822862
- [FH Münster - University of Applied Sciences](http://www.fh-muenster.de)
863+
- [GraphHopper](https://graphhopper.com/)
823864
- [IMS Health](http://www.imshealth.com/en/solution-areas/technology-and-applications)
824865
- [Interactive Intelligence](http://developer.mypurecloud.com/)
825866
- [LANDR Audio](https://www.landr.com/)
826867
- [LiveAgent](https://www.ladesk.com/)
868+
- [Kabuku](http://www.kabuku.co.jp/en)
827869
- [Kuary](https://kuary.com/)
828870
- [nViso](http://www.nviso.ch/)
829871
- [Okiok](https://www.okiok.com)
@@ -860,7 +902,7 @@ Swaagger Codegen core team members are contributors who have been making signfic
860902
| Dart | |
861903
| Groovy | |
862904
| Go | @guohuang (2016/05/01) @neilotoole (2016/05/01) |
863-
| Java | @cbornet (2016/05/01) @xhh (2016/05/01) |
905+
| Java | @cbornet (2016/05/01) @xhh (2016/05/01) @epaul (2016/06/04) |
864906
| NodeJS/Javascript | @xhh (2016/05/01) |
865907
| ObjC | @mateuszmackowiak (2016/05/09) |
866908
| Perl | @wing328 (2016/05/01) |

bin/java-petstore-feign.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ fi
2626

2727
# if you've executed sbt assembly previously it will use that instead.
2828
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
29-
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l java -c bin/java-petstore-feign.json -o samples/client/petstore/java/feign"
29+
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l java -c bin/java-petstore-feign.json -o samples/client/petstore/java/feign -DhideGenerationTimestamp=true"
3030

3131
java $JAVA_OPTS -jar $executable $ags

bin/java-petstore-jersey2.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ fi
2626

2727
# if you've executed sbt assembly previously it will use that instead.
2828
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
29-
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l java -c bin/java-petstore-jersey2.json -o samples/client/petstore/java/jersey2"
29+
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l java -c bin/java-petstore-jersey2.json -o samples/client/petstore/java/jersey2 -DhideGenerationTimestamp=true"
3030

31+
echo "Removing files and folders under samples/client/petstore/java/jersey2/src/main"
32+
rm -rf samples/client/petstore/java/jersey2/src/main
33+
find samples/client/petstore/java/jersey2 -maxdepth 1 -type f ! -name "README.md" -exec rm {} +
3134
java $JAVA_OPTS -jar $executable $ags

bin/java-petstore-okhttp-gson.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ fi
2626

2727
# if you've executed sbt assembly previously it will use that instead.
2828
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
29-
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l java -c bin/java-petstore-okhttp-gson.json -o samples/client/petstore/java/okhttp-gson"
29+
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l java -c bin/java-petstore-okhttp-gson.json -o samples/client/petstore/java/okhttp-gson -DhideGenerationTimestamp=true"
3030

31+
rm -rf samples/client/petstore/java/okhttp-gson/src/main
32+
find samples/client/petstore/java/okhttp-gson -maxdepth 1 -type f ! -name "README.md" -exec rm {} +
3133
java $JAVA_OPTS -jar $executable $ags

bin/java-petstore-retrofit.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ fi
2626

2727
# if you've executed sbt assembly previously it will use that instead.
2828
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
29-
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l java -c bin/java-petstore-retrofit.json -o samples/client/petstore/java/retrofit"
29+
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l java -c bin/java-petstore-retrofit.json -o samples/client/petstore/java/retrofit -DhideGenerationTimestamp=true"
3030

31+
echo "Removing files and folders under samples/client/petstore/java/retrofit/src/main"
32+
rm -rf samples/client/petstore/java/retrofit/src/main
33+
find samples/client/petstore/java/retrofit -maxdepth 1 -type f ! -name "README.md" -exec rm {} +
3134
java $JAVA_OPTS -jar $executable $ags

bin/java-petstore-retrofit2.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ fi
2626

2727
# if you've executed sbt assembly previously it will use that instead.
2828
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
29-
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l java -c bin/java-petstore-retrofit2.json -o samples/client/petstore/java/retrofit2"
29+
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l java -c bin/java-petstore-retrofit2.json -o samples/client/petstore/java/retrofit2 -DhideGenerationTimestamp=true"
3030

3131
java $JAVA_OPTS -jar $executable $ags

0 commit comments

Comments
 (0)