Skip to content

Commit a0d5079

Browse files
committed
Merge branch 'master' into csharp-enum-cleanup
* master: (101 commits) [Swift4] Allow for custom dateformatter to be used (#6672) [haskell-http-client] fix bug when generating models-only (#6931) fix typo: crediential => credential minor typo fix [csharp] fix enum serialization of first value (#6873) [PHP] Improve docs and README (#6935) Binary mode for file deserialization in python (#6936) add python tornado test to travis [Python/tornado] add integration tests and fix bugs (#6925) Fix PHP passes response body to ApiException (#6923) [TypeScript][Node] Resolve TS2532 error (#6932) skip "all" shell script minor formatting change Fixes Issue #6841, Map for accessing additionalProperties is generated. (#6886) add tsloughter as owner erlang WIP: initial commit for Erlang client generator (#6502) add back php client test Switch Travis image from MacOS to Linux (#6937) add link to ebook [Scala] Default case class Option types to None for non-required fields (#6790) ...
2 parents 018c8d3 + 5af788c commit a0d5079

File tree

1,854 files changed

+93930
-26674
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,854 files changed

+93930
-26674
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
- [ ] Read the [contribution guidelines](https://github.com/swagger-api/swagger-codegen/blob/master/CONTRIBUTING.md).
44
- [ ] Ran the shell script under `./bin/` to update Petstore sample so that CIs can verify the change. (For instance, only need to run `./bin/{LANG}-petstore.sh` and `./bin/security/{LANG}-petstore.sh` if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in `.\bin\windows\`.
55
- [ ] Filed the PR against the correct branch: `3.0.0` branch for changes related to OpenAPI spec 3.0. Default: `master`.
6-
- [ ] Copied the [technical committee](https://github.com/swagger-api/swagger-codegen/#swagger-codegen-technical-committee) to review the pull request if your PR is targeting a particular programming langauge.
6+
- [ ] Copied the [technical committee](https://github.com/swagger-api/swagger-codegen/#swagger-codegen-technical-committee) to review the pull request if your PR is targeting a particular programming language.
77

88
### Description of the PR
99

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@ samples/client/petstore/silex/SwaggerServer/venodr/
9090
**/vendor/
9191
**/composer.lock
9292

93+
#PHP-Symfony
94+
samples/server/petstore/php-symfony/SymfonyBundle-php/Tests/cache/
95+
samples/server/petstore/php-symfony/SymfonyBundle-php/Tests/logs/
96+
97+
9398
# Perl
9499
samples/client/petstore/perl/deep_module_test/
95100

.travis.yml

Lines changed: 31 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
sudo: required
2-
language: objective-c
3-
osx_image: xcode8.2
2+
language: java
3+
jdk:
4+
- oraclejdk8
5+
46
cache:
57
directories:
68
- $HOME/.m2
79
- $HOME/.ivy2
810
- $HOME/.gradle/caches/
911
- $HOME/.gradle/wrapper/
10-
- $HOME/.stack
1112
- $HOME/samples/client/petstore/php/SwaggerClient-php/vendor
1213
- $HOME/samples/client/petstore/ruby/venodr/bundle
1314
- $HOME/samples/client/petstore/python/.venv/
@@ -21,74 +22,50 @@ cache:
2122
- $HOME/samples/client/petstore/typescript-fetch/builds/es6-target/typings
2223
- $HOME/samples/client/petstore/typescript-fetch/builds/with-npm-version/node_modules
2324
- $HOME/samples/client/petstore/typescript-fetch/npm/with-npm-version/typings
24-
- $HOME/samples/client/petstore/typescript-angularjs/node_modules
25-
- $HOME/samples/client/petstore/typescript-angularjs/typings
26-
- $HOME/.cocoapods/repos/master
27-
timeout: 1000
28-
# note: docker is not yet supported in iOS build
29-
#services:
30-
# - docker
25+
- $HOME/samples/client/petstore/typescript-angular/node_modules
26+
- $HOME/samples/client/petstore/typescript-angular/typings
27+
28+
services:
29+
- docker
3130

3231
# comment out the host table change to use the public petstore server
3332
addons:
3433
hosts:
3534
- petstore.swagger.io
3635

3736
before_install:
38-
- export SW=`pwd`
39-
- rvm list
40-
- rvm use 2.2.5
41-
- gem environment
42-
- gem install bundler -N --no-ri --no-rdoc
43-
- gem install cocoapods -v 1.2.1 -N --no-ri --no-rdoc
44-
- gem install xcpretty -N --no-ri --no-rdoc
45-
- pod --version
46-
# comment out below to avoid errors
47-
#- pod repo update
48-
- pod setup --silent > /dev/null
37+
# required when sudo: required for the Ruby petstore tests
38+
- gem install bundler
4939
- npm install -g typescript
40+
- npm install -g npm
5041
- npm config set registry http://registry.npmjs.org/
51-
- brew install sbt
52-
- brew install leiningen
53-
- brew install bats
54-
- brew install curl
55-
- brew install python3
56-
- pip install virtualenv
57-
- mkdir -p ~/.local/bin
58-
- export PATH=$HOME/.local/bin:$PATH
59-
- travis_retry curl --insecure -L https://www.stackage.org/stack/osx-x86_64 | tar xz --strip-components=1 --include '*/stack' -C ~/.local/bin
60-
# start local petstore server
61-
- git clone -b docker --single-branch https://github.com/wing328/swagger-samples
62-
- cd swagger-samples/java/java-jersey-jaxrs
63-
- sudo mvn jetty:run &
64-
- cd $SW
65-
# NOTE: iOS build not support docker at the moment
42+
- sudo pip install virtualenv
6643
# to run petstore server locally via docker
67-
#- docker pull swaggerapi/petstore
68-
#- docker run -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore
69-
#- docker ps -a
44+
- docker pull swaggerapi/petstore
45+
- docker run -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore
46+
- docker ps -a
47+
# Add bats test framework and cURL for Bash script integration tests
48+
- sudo add-apt-repository ppa:duggan/bats --yes
49+
- sudo apt-get update -qq
50+
- sudo apt-get install -qq bats
51+
- sudo apt-get install -qq curl
52+
# comment out below as installation failed in travis
7053
# Add rebar3 build tool and recent Erlang/OTP for Erlang petstore server tests.
7154
# - Travis CI does not support rebar3 [yet](https://github.com/travis-ci/travis-ci/issues/6506#issuecomment-275189490).
7255
# - Rely on `kerl` for [pre-compiled versions available](https://docs.travis-ci.com/user/languages/erlang#Choosing-OTP-releases-to-test-against). Rely on installation path chosen by [`travis-erlang-builder`](https://github.com/travis-ci/travis-erlang-builder/blob/e6d016b1a91ca7ecac5a5a46395bde917ea13d36/bin/compile#L18).
56+
# - . ~/otp/18.2.1/activate && erl -version
57+
#- curl -f -L -o ./rebar3 https://s3.amazonaws.com/rebar3/rebar3 && chmod +x ./rebar3 && ./rebar3 version && export PATH="${TRAVIS_BUILD_DIR}:$PATH"
7358

7459
# show host table to confirm petstore.swagger.io is mapped to localhost
7560
- cat /etc/hosts
7661
# show java version
7762
- java -version
78-
# show brew version
79-
- brew --version
80-
# show xcpretty version
81-
- xcpretty -v
82-
# show go version
83-
- go version
84-
# show stack version
85-
- stack --version
8663

8764
install:
8865
# Add Godeps dependencies to GOPATH and PATH
89-
- eval "$(curl -sL https://raw.githubusercontent.com/travis-ci/gimme/master/gimme | GIMME_GO_VERSION=1.4 bash)"
90-
- export GOPATH="${TRAVIS_BUILD_DIR}/Godeps/_workspace"
91-
- export PATH="${TRAVIS_BUILD_DIR}/Godeps/_workspace/bin:$PATH"
66+
- eval "$(curl -sL https://raw.githubusercontent.com/travis-ci/gimme/master/gimme | GIMME_GO_VERSION=1.4 bash)"
67+
- export GOPATH="${TRAVIS_BUILD_DIR}/Godeps/_workspace"
68+
- export PATH="${TRAVIS_BUILD_DIR}/Godeps/_workspace/bin:$PATH"
9269

9370
script:
9471
# fail fast
@@ -101,17 +78,18 @@ script:
10178
- /bin/bash ./bin/utils/detect_tab_in_java_class.sh
10279
# run integration tests defined in maven pom.xml
10380
- mvn -q --batch-mode verify -Psamples
104-
### docker-related tasks have been moved to CircleCI
81+
# Below has been moved to CircleCI
10582
# docker: build generator image and push to Docker Hub
10683
#- if [ $DOCKER_HUB_USERNAME ]; then docker login --email=$DOCKER_HUB_EMAIL --username=$DOCKER_HUB_USERNAME --password=$DOCKER_HUB_PASSWORD && docker build -t $DOCKER_GENERATOR_IMAGE_NAME ./modules/swagger-generator && if [ ! -z "$TRAVIS_TAG" ]; then docker tag $DOCKER_GENERATOR_IMAGE_NAME:latest $DOCKER_GENERATOR_IMAGE_NAME:$TRAVIS_TAG; fi && if [ ! -z "$TRAVIS_TAG" ] || [ "$TRAVIS_BRANCH" = "master" ]; then docker push $DOCKER_GENERATOR_IMAGE_NAME; fi; fi
10784
## docker: build cli image and push to Docker Hub
10885
#- if [ $DOCKER_HUB_USERNAME ]; then docker login --email=$DOCKER_HUB_EMAIL --username=$DOCKER_HUB_USERNAME --password=$DOCKER_HUB_PASSWORD && docker build -t $DOCKER_CODEGEN_CLI_IMAGE_NAME ./modules/swagger-codegen-cli && if [ ! -z "$TRAVIS_TAG" ]; then docker tag $DOCKER_CODEGEN_CLI_IMAGE_NAME:latest $DOCKER_CODEGEN_CLI_IMAGE_NAME:$TRAVIS_TAG; fi && if [ ! -z "$TRAVIS_TAG" ] || [ "$TRAVIS_BRANCH" = "master" ]; then docker push $DOCKER_CODEGEN_CLI_IMAGE_NAME; fi; fi
109-
#env:
110-
# - DOCKER_GENERATOR_IMAGE_NAME=swaggerapi/swagger-generator DOCKER_CODEGEN_CLI_IMAGE_NAME=swaggerapi/swagger-codegen-cli
11186

11287
after_success:
11388
# push a snapshot version to maven repo
11489
- if [ $SONATYPE_USERNAME ] && [ -z $TRAVIS_TAG ] && [ "$TRAVIS_BRANCH" = "master" ]; then
11590
mvn clean deploy --settings .travis/settings.xml;
11691
echo "Finished mvn clean deploy for $TRAVIS_BRANCH";
11792
fi;
93+
94+
env:
95+
- DOCKER_GENERATOR_IMAGE_NAME=swaggerapi/swagger-generator DOCKER_CODEGEN_CLI_IMAGE_NAME=swaggerapi/swagger-codegen-cli

README.md

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.swagger/swagger-codegen-project/badge.svg?style=plastic)](https://maven-badges.herokuapp.com/maven-central/io.swagger/swagger-codegen-project)
1414
[![PR Stats](http://issuestats.com/github/swagger-api/swagger-codegen/badge/pr)](http://issuestats.com/github/swagger-api/swagger-codegen) [![Issue Stats](http://issuestats.com/github/swagger-api/swagger-codegen/badge/issue)](http://issuestats.com/github/swagger-api/swagger-codegen)
1515

16-
:star::star::star: If you would like to contribute, please refer to [guidelines](https://github.com/swagger-api/swagger-codegen/blob/master/CONTRIBUTING.md) and a list of [open tasks](https://github.com/swagger-api/swagger-codegen/issues?q=is%3Aopen+is%3Aissue+label%3A%22Need+community+contribution%22).:star::star::star:
16+
:star::star::star: If you would like to contribute, please refer to [guidelines](https://github.com/swagger-api/swagger-codegen/blob/master/CONTRIBUTING.md) and a list of [open tasks](https://github.com/swagger-api/swagger-codegen/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22).:star::star::star:
1717

1818
:notebook_with_decorative_cover: For more information, please refer to the [Wiki page](https://github.com/swagger-api/swagger-codegen/wiki) and [FAQ](https://github.com/swagger-api/swagger-codegen/wiki/FAQ) :notebook_with_decorative_cover:
1919

@@ -24,8 +24,8 @@
2424
## Overview
2525
This is the swagger codegen project, which allows generation of API client libraries (SDK generation), server stubs and documentation automatically given an [OpenAPI Spec](https://github.com/OAI/OpenAPI-Specification). Currently, the following languages/frameworks are supported:
2626

27-
- **API clients**: **ActionScript**, **Ada**, **Apex**, **Bash**, **C#** (.net 2.0, 4.0 or later), **C++** (cpprest, Qt5, Tizen), **Clojure**, **Dart**, **Elixir**, **Eiffel**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Jersey1.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx), **Kotlin**, **Lua**, **Node.js** (ES5, ES6, AngularJS with Google Closure Compiler annotations) **Objective-C**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust**, **Scala** (akka, http4s, swagger-async-httpclient), **Swift** (2.x, 3.x, 4.x), **Typescript** (Angular1.x, Angular2.x, Fetch, jQuery, Node)
28-
- **Server stubs**: **C#** (ASP.NET Core, NancyFx), **C++** (Pistache, Restbed), **Erlang**, **Go**, **Haskell** (Servant), **Java** (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, RestEasy, Play Framework), **PHP** (Lumen, Slim, Silex, [Symfony](https://symfony.com/), [Zend Expressive](https://github.com/zendframework/zend-expressive)), **Python** (Flask), **NodeJS**, **Ruby** (Sinatra, Rails5), **Scala** ([Finch](https://github.com/finagle/finch), Scalatra)
27+
- **API clients**: **ActionScript**, **Ada**, **Apex**, **Bash**, **C#** (.net 2.0, 4.0 or later), **C++** (cpprest, Qt5, Tizen), **Clojure**, **Dart**, **Elixir**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Jersey1.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java), **Kotlin**, **Lua**, **Node.js** (ES5, ES6, AngularJS with Google Closure Compiler annotations) **Objective-C**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust**, **Scala** (akka, http4s, swagger-async-httpclient), **Swift** (2.x, 3.x, 4.x), **Typescript** (Angular1.x, Angular2.x, Fetch, jQuery, Node)
28+
- **Server stubs**: **C#** (ASP.NET Core, NancyFx), **C++** (Pistache, Restbed), **Erlang**, **Go**, **Haskell** (Servant), **Java** (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, RestEasy, Play Framework), **PHP** (Lumen, Slim, Silex, [Symfony](https://symfony.com/), [Zend Expressive](https://github.com/zendframework/zend-expressive)), **Python** (Flask), **NodeJS**, **Ruby** (Sinatra, Rails5), **Rust**, **Scala** ([Finch](https://github.com/finagle/finch), Scalatra)
2929
- **API documentation generators**: **HTML**, **Confluence Wiki**
3030
- **Configuration files**: [**Apache2**](https://httpd.apache.org/)
3131
- **Others**: **JMeter**
@@ -462,6 +462,10 @@ src/IO.Swagger.Test/Model/AnimalFarmTests.cs
462462

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

465+
Upon first code generation, you may also pass the CLI option `--ignore-file-override=/path/to/ignore_file` for greater control over generated outputs. Note that this is a complete override, and will override the `.swagger-codegen-ignore` file in an output directory when regenerating code.
466+
467+
Editor support for `.swagger-codegen-ignore` files is available in IntelliJ via the [.ignore plugin](https://plugins.jetbrains.com/plugin/7495--ignore).
468+
465469
### Customizing the generator
466470

467471
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:
@@ -516,6 +520,7 @@ CONFIG OPTIONS
516520
okhttp-gson (default) - HTTP client: OkHttp 2.4.0. JSON processing: Gson 2.3.1
517521
retrofit - HTTP client: OkHttp 2.4.0. JSON processing: Gson 2.3.1 (Retrofit 1.9.0)
518522
retrofit2 - HTTP client: OkHttp 2.5.0. JSON processing: Gson 2.4 (Retrofit 2.0.0-beta2)
523+
google-api-client - HTTP client: google-api-client 1.23.0. JSON processing: Jackson 2.8.9
519524
```
520525

521526
Your config file for Java can look like
@@ -730,6 +735,7 @@ Please refer to this [page](https://github.com/swagger-api/swagger-codegen/blob/
730735
Companies/Projects using Swagger Codegen
731736
----------------------------------------
732737
Here are some companies/projects using Swagger Codegen in production. To add your company/project to the list, please visit [README.md](https://github.com/swagger-api/swagger-codegen/blob/master/README.md) and click on the icon to edit the page.
738+
- [Accengage](https://www.accengage.com/)
733739
- [Activehours](https://www.activehours.com/)
734740
- [Acunetix](https://www.acunetix.com/)
735741
- [Atlassian](https://www.atlassian.com/)
@@ -760,6 +766,7 @@ Here are some companies/projects using Swagger Codegen in production. To add you
760766
- [everystory.us](http://everystory.us)
761767
- [Expected Behavior](http://www.expectedbehavior.com/)
762768
- [Fastly](https://www.fastly.com/)
769+
- [FINRA](https://github.com/FINRAOS/herd/)
763770
- [Flat](https://flat.io)
764771
- [Finder](http://en.finder.pl/)
765772
- [Fitwell](https://fitwell.co/)
@@ -793,6 +800,7 @@ Here are some companies/projects using Swagger Codegen in production. To add you
793800
- [LXL Tech](http://lxltech.com)
794801
- [Lyft](https://www.lyft.com/developers)
795802
- [MailMojo](https://mailmojo.no/)
803+
- [Metaswitch](https://www.metaswitch.com/)
796804
- [Mindera](http://mindera.com/)
797805
- [Mporium](http://mporium.com/)
798806
- [Neverfail](https://neverfail.com/)
@@ -901,6 +909,7 @@ Presentations/Videos/Tutorials/Books
901909
- 2017/09/30 - [Swaggerのテンプレートを魔改造した話 #渋谷java](https://www.slideshare.net/int128/swagger-80309224) by [Hidetake Iwata](https://github.com/int128) ([NTT DATA Corporation](http://www.nttdata.com/global/en/))
902910
- 2017/10/04 - [Enterprise-friendly Java client for Microsoft Machine Learning Server](https://blogs.msdn.microsoft.com/mlserver/2017/10/04/enterprise-friendly-java-client-for-microsoft-machine-learning-server/) by [Pratik Palnitkar](https://www.linkedin.com/in/pratikpalnitkar/) ([Microsoft](https://www.microsoft.com/))
903911
- 2017/10/08 - [Generating a REST Ada client with OpenAPI and Swagger Codegen](https://blog.vacs.fr/vacs/blogs/post.html?post=2017/10/08/Generating-a-REST-Ada-client-with-OpenAPI-and-Swagger-Codegen) by [Stephane Carrez](https://github.com/stcarrez)
912+
- 2017/11/08 - [A Beginner's Guide to Code Generation for REST APIs](https://gum.co/swagger_codegen_beginner)(eBook) by [William Cheng](https://twitter.com/wing328)
904913

905914
# Swagger Codegen Core Team
906915

@@ -967,9 +976,11 @@ Here is a list of template creators:
967976
* Dart: @yissachar
968977
* Elixir: @niku
969978
* Eiffel: @jvelilla
979+
* Erlang: @tsloughter
970980
* Groovy: @victorgit
971981
* Go: @wing328
972982
* Go (rewritten in 2.3.0): @antihax
983+
* Haskell (http-client): @jonschoning
973984
* Java (Feign): @davidkiss
974985
* Java (Retrofit): @0legg
975986
* Java (Retrofit2): @emilianobonassi
@@ -978,6 +989,7 @@ Here is a list of template creators:
978989
* Java (RestTemplate): @nbruno
979990
* Java (RESTEasy): @gayathrigs
980991
* Java (Vertx): @lopesmcc
992+
* Java (Google APIs Client Library): @charlescapps
981993
* Javascript/NodeJS: @jfiala
982994
* Javascript (Closure-annotated Angular) @achew22
983995
* JMeter: @davidkiss
@@ -988,6 +1000,7 @@ Here is a list of template creators:
9881000
* PowerShell: @beatcracker
9891001
* R: @ramnov
9901002
* Rust: @farcaller
1003+
* Rust (rust-server): @metaswitch
9911004
* Scala (scalaz & http4s): @tbrown1979
9921005
* Swift: @tkqubo
9931006
* Swift 3: @hexelon
@@ -1018,6 +1031,7 @@ Here is a list of template creators:
10181031
* PHP Symfony: @ksm2
10191032
* PHP Zend Expressive (with Path Handler): @Articus
10201033
* Ruby on Rails 5: @zlx
1034+
* Rust (rust-server): @metaswitch
10211035
* Scala Finch: @jimschubert
10221036
* Documentation
10231037
* HTML Doc 2: @jhitchcock
@@ -1029,7 +1043,7 @@ Here is a list of template creators:
10291043

10301044
Here are the requirements to become a core team member:
10311045
- rank within top 50 in https://github.com/swagger-api/swagger-codegen/graphs/contributors
1032-
- to contribute, here are some good [starting points](https://github.com/swagger-api/swagger-codegen/issues?q=is%3Aopen+is%3Aissue+label%3A%22Need+community+contribution%22)
1046+
- to contribute, here are some good [starting points](https://github.com/swagger-api/swagger-codegen/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22)
10331047
- regular contributions to the project
10341048
- about 3 hours per week
10351049
- for contribution, it can be addressing issues, reviewing PRs submitted by others, submitting PR to fix bugs or make enhancements, etc
@@ -1076,7 +1090,7 @@ If you want to join the committee, please kindly apply by sending an email to wi
10761090
| ObjC | |
10771091
| Perl | @wing328 (2017/07) |
10781092
| PHP | @jebentier (2017/07) @dkarlovi (2017/07) @mandrean (2017/08) @jfastnacht (2017/09) @ackintosh (2017/09) |
1079-
| Python | @taxpon (2017/07) @frol (2017/07) @mbohlool (2017/07) @cbornet (2017/09) |
1093+
| Python | @taxpon (2017/07) @frol (2017/07) @mbohlool (2017/07) @cbornet (2017/09) @kenjones-cisco (2017/11)|
10801094
| R | |
10811095
| Ruby | @cliffano (2017/07) @zlx (2017/09) |
10821096
| Rust | @frol (2017/07) @farcaller (2017/08) |

bin/csharp-petstore-net-40.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"targetFramework": "v4.0"
3+
}

bin/csharp-petstore-net-40.sh

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/sh
2+
3+
SCRIPT="$0"
4+
5+
while [ -h "$SCRIPT" ] ; do
6+
ls=`ls -ld "$SCRIPT"`
7+
link=`expr "$ls" : '.*-> \(.*\)$'`
8+
if expr "$link" : '/.*' > /dev/null; then
9+
SCRIPT="$link"
10+
else
11+
SCRIPT=`dirname "$SCRIPT"`/"$link"
12+
fi
13+
done
14+
15+
if [ ! -d "${APP_DIR}" ]; then
16+
APP_DIR=`dirname "$SCRIPT"`/..
17+
APP_DIR=`cd "${APP_DIR}"; pwd`
18+
fi
19+
20+
executable="./modules/swagger-codegen-cli/target/swagger-codegen-cli.jar"
21+
22+
if [ ! -f "$executable" ]
23+
then
24+
mvn clean package
25+
fi
26+
27+
# if you've executed sbt assembly previously it will use that instead.
28+
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 csharp -o samples/client/petstore/csharp/SwaggerClientNet40 --additional-properties packageGuid={321C8C3F-0156-40C1-AE42-D59761FB9B6C} -c ./bin/csharp-petstore-net-40.json"
30+
31+
java $JAVA_OPTS -jar $executable $ags

bin/csharp-petstore.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 csharp -o samples/client/petstore/csharp/SwaggerClient --additional-properties packageGuid={321C8C3F-0156-40C1-AE42-D59761FB9B6C}"
29+
ags="generate $@ -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l csharp -o samples/client/petstore/csharp/SwaggerClientNet40 --additional-properties packageGuid={321C8C3F-0156-40C1-AE42-D59761FB9B6C} -c ./bin/csharp-petstore-net-40.json"
3030

3131
java $JAVA_OPTS -jar $executable $ags

0 commit comments

Comments
 (0)