mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-05 19:36:09 +00:00
Compare commits
199 Commits
v4.0.0-bet
...
security-t
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
745868e925 | ||
|
|
b74d25d414 | ||
|
|
37c275b3fb | ||
|
|
8bb01ed149 | ||
|
|
218c2e75ab | ||
|
|
b67318ef21 | ||
|
|
c10463600a | ||
|
|
59cdea7b5e | ||
|
|
3100afce26 | ||
|
|
546a230c73 | ||
|
|
8df619ef8a | ||
|
|
bf7838cd81 | ||
|
|
3320d3cbe1 | ||
|
|
7ad479e13d | ||
|
|
43fcd19509 | ||
|
|
93baa5d835 | ||
|
|
d93fd31bb1 | ||
|
|
1f45ea7d1a | ||
|
|
0b15fac3e1 | ||
|
|
ed30e85d1e | ||
|
|
82700e5958 | ||
|
|
9bb94fe95d | ||
|
|
d18bf044e8 | ||
|
|
a57504481b | ||
|
|
28ddad44e5 | ||
|
|
22d21afceb | ||
|
|
a6a1264f25 | ||
|
|
40253a5b82 | ||
|
|
94466d54b3 | ||
|
|
2ea4025d2b | ||
|
|
f41f50c3e5 | ||
|
|
e5a0d18374 | ||
|
|
07e8b5ae03 | ||
|
|
243ec9aa8e | ||
|
|
c9737cf97d | ||
|
|
5ba35ecd31 | ||
|
|
065bbc7bdb | ||
|
|
f2ff473155 | ||
|
|
3e085e9492 | ||
|
|
83bc863b2b | ||
|
|
33786e11f3 | ||
|
|
ce60dbbc58 | ||
|
|
302b2fafff | ||
|
|
a2d6073110 | ||
|
|
7ba973ca7c | ||
|
|
fcfe687f19 | ||
|
|
317168fe9d | ||
|
|
c8ecc5bf45 | ||
|
|
d2244a3baf | ||
|
|
fde3252924 | ||
|
|
b1dc2eeaac | ||
|
|
80f6433779 | ||
|
|
85b936b498 | ||
|
|
1491c7037c | ||
|
|
a0d907cf27 | ||
|
|
d2ce584a3a | ||
|
|
aa7ea8bdca | ||
|
|
b128d14707 | ||
|
|
3ba6d8226e | ||
|
|
b0aac250c6 | ||
|
|
f39e200e5d | ||
|
|
cdb447d187 | ||
|
|
3739584a1a | ||
|
|
ab8ee710a1 | ||
|
|
a797dd668b | ||
|
|
c6a5017a13 | ||
|
|
882186f461 | ||
|
|
a06e957430 | ||
|
|
6848c524d7 | ||
|
|
7124b119ea | ||
|
|
93486369fe | ||
|
|
b302c16f74 | ||
|
|
a55fb7adc5 | ||
|
|
e6b7ee6f4c | ||
|
|
d653d2d495 | ||
|
|
14aacfaa63 | ||
|
|
c00a439dcd | ||
|
|
8a0248eee0 | ||
|
|
49ef024cf6 | ||
|
|
e810848a03 | ||
|
|
49b15ee518 | ||
|
|
9236e50098 | ||
|
|
6a9117edd1 | ||
|
|
ac69b2da1a | ||
|
|
0cd5fb6dc2 | ||
|
|
0695cf99e6 | ||
|
|
4f37e81d55 | ||
|
|
58773a3659 | ||
|
|
2807ed0af9 | ||
|
|
2985c0f0b8 | ||
|
|
37c890f755 | ||
|
|
bcb4b03798 | ||
|
|
c57abbe5bd | ||
|
|
caf404d857 | ||
|
|
cc1fe6eebf | ||
|
|
0c54286909 | ||
|
|
1d02f0374b | ||
|
|
88abea1755 | ||
|
|
24df02a191 | ||
|
|
8843df65a4 | ||
|
|
8c88f46fba | ||
|
|
24f20941e5 | ||
|
|
f47af5e6f0 | ||
|
|
9829e06790 | ||
|
|
052879d6cb | ||
|
|
c30a21ac3c | ||
|
|
84b99fea54 | ||
|
|
54d9c19c77 | ||
|
|
92757581d6 | ||
|
|
7235e6d962 | ||
|
|
5fe0c94135 | ||
|
|
b5ce0bddee | ||
|
|
aa339d6046 | ||
|
|
9e2a9e1515 | ||
|
|
9695090d9b | ||
|
|
8e7ad9c9b6 | ||
|
|
63eb9298cf | ||
|
|
a36319185b | ||
|
|
e6658278ad | ||
|
|
7486438491 | ||
|
|
8ba93f1952 | ||
|
|
f2002b25da | ||
|
|
163b00459f | ||
|
|
329843bc92 | ||
|
|
0650d2f60e | ||
|
|
ae376c151b | ||
|
|
bc6c94d412 | ||
|
|
1d08296f96 | ||
|
|
c79d27708f | ||
|
|
fda867ebfe | ||
|
|
1dadd45ffe | ||
|
|
61b6f19d74 | ||
|
|
70180e074c | ||
|
|
a3566cd34f | ||
|
|
a440396485 | ||
|
|
cd1885d29e | ||
|
|
b4c36425c2 | ||
|
|
534ff3607f | ||
|
|
8d6278bd4c | ||
|
|
aace459217 | ||
|
|
b4b8c28b2a | ||
|
|
594af33fb8 | ||
|
|
ad8aa7dc0e | ||
|
|
8d5b600277 | ||
|
|
33e50e6d46 | ||
|
|
851d11cf72 | ||
|
|
027e6c4a5c | ||
|
|
cefd29b6ff | ||
|
|
7cb6a38150 | ||
|
|
42544b8234 | ||
|
|
161cb88e88 | ||
|
|
2593d78ce6 | ||
|
|
d87a3b90da | ||
|
|
e01a786bc9 | ||
|
|
804b589f5f | ||
|
|
550774a6e2 | ||
|
|
598bf0cd09 | ||
|
|
b6c2266a14 | ||
|
|
ea08106c80 | ||
|
|
de33360883 | ||
|
|
add63cb981 | ||
|
|
f1fa0a80ad | ||
|
|
fd0847864a | ||
|
|
4e85993490 | ||
|
|
8707f943c0 | ||
|
|
33a8939bd5 | ||
|
|
5c64b58bae | ||
|
|
ba9c12f2e0 | ||
|
|
73d309b9ba | ||
|
|
f76dca84f5 | ||
|
|
302922b8a4 | ||
|
|
773aa269ae | ||
|
|
7dcffff20b | ||
|
|
20d5adcdd5 | ||
|
|
e0ed6719a0 | ||
|
|
ef7b28de00 | ||
|
|
348c22c883 | ||
|
|
8f5fa4df83 | ||
|
|
cf6f10252d | ||
|
|
0b10092262 | ||
|
|
cd2ff0b041 | ||
|
|
0a2fb8db8f | ||
|
|
36fa7102dd | ||
|
|
7cee2b62e4 | ||
|
|
5281ea8bef | ||
|
|
aa24f07433 | ||
|
|
aa15882e2b | ||
|
|
f1a56447ba | ||
|
|
dd3e6c6a3b | ||
|
|
28768244d6 | ||
|
|
532743b4f9 | ||
|
|
0b66fa5c82 | ||
|
|
454adec32d | ||
|
|
931c03beca | ||
|
|
f4088f8ee8 | ||
|
|
f56bc79db6 | ||
|
|
6f4ba25cd8 | ||
|
|
888068d122 | ||
|
|
16f52cf2ad |
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
||||
**/*.mustache linguist-vendored=true
|
||||
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -1,7 +1,7 @@
|
||||
### PR checklist
|
||||
|
||||
- [ ] Read the [contribution guidelines](https://github.com/openapitools/openapi-generator/blob/master/CONTRIBUTING.md).
|
||||
- [ ] 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\`.
|
||||
- [ ] 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`, `./bin/openapi3/{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\`.
|
||||
- [ ] Filed the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master`~~, `3.4.x`, `4.0.x`~~. Default: `master`.
|
||||
- [ ] Copied the [technical committee](https://github.com/openapitools/openapi-generator/#62---openapi-generator-technical-committee) to review the pull request if your PR is targeting a particular programming language.
|
||||
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -193,6 +193,8 @@ samples/client/petstore/haskell-http-client/docs/quick-jump.css
|
||||
|
||||
# R
|
||||
.Rproj.user
|
||||
samples/client/petstore/R/**/petstore.Rcheck/
|
||||
samples/client/petstore/R/**/*.tar.gz
|
||||
|
||||
# elixir
|
||||
samples/client/petstore/elixir/_build/
|
||||
|
||||
17
.travis.yml
17
.travis.yml
@@ -28,7 +28,6 @@ cache:
|
||||
- $HOME/samples/server/petstore/rust-server/target
|
||||
- $HOME/perl5
|
||||
- $HOME/.cargo
|
||||
- $HOME/.stack
|
||||
- $HOME/.pub-cache
|
||||
- $HOME/samples/server/petstore/cpp-pistache/pistache
|
||||
- $HOME/.npm
|
||||
@@ -50,10 +49,6 @@ addons:
|
||||
- petstore.swagger.io
|
||||
|
||||
before_install:
|
||||
# install haskell
|
||||
- curl -sSL https://get.haskellstack.org/ | sh
|
||||
- stack upgrade
|
||||
- stack --version
|
||||
# install rust
|
||||
- curl https://sh.rustup.rs -sSf | sh -s -- -y -v
|
||||
# required when sudo: required for the Ruby petstore tests
|
||||
@@ -69,10 +64,10 @@ before_install:
|
||||
- docker run -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore
|
||||
- docker ps -a
|
||||
# Add bats test framework and cURL for Bash script integration tests
|
||||
- sudo add-apt-repository ppa:duggan/bats --yes
|
||||
- sudo apt-get update -qq
|
||||
- sudo apt-get install -qq bats
|
||||
- sudo apt-get install -qq curl
|
||||
#- sudo add-apt-repository ppa:duggan/bats --yes
|
||||
#- sudo apt-get update -qq
|
||||
#- sudo apt-get install -qq bats
|
||||
#- sudo apt-get install -qq curl
|
||||
# install dart
|
||||
#- sudo apt-get update
|
||||
#- sudo apt-get install apt-transport-https
|
||||
@@ -138,6 +133,8 @@ after_success:
|
||||
cd modules/openapi-generator-gradle-plugin;
|
||||
./gradlew -Psigning.keyId="$SIGNING_KEY" -Psigning.password="$SIGNING_PASSPHRASE" -Psigning.secretKeyRingFile="${TRAVIS_BUILD_DIR}/sec.gpg" -PossrhUsername="${SONATYPE_USERNAME}" -PossrhPassword="${SONATYPE_PASSWORD}" uploadArchives --no-daemon;
|
||||
echo "Finished ./gradlew uploadArchives";
|
||||
#./gradlew publishPlugins;
|
||||
#echo "Finished ./gradlew publishPlugins (plugin portal)";
|
||||
popd;
|
||||
elif ([[ "$TRAVIS_BRANCH" =~ ^[0-9]+\.[0-9]+\.x$ ]]) ; then
|
||||
mvn clean deploy --settings CI/settings.xml;
|
||||
@@ -146,6 +143,8 @@ after_success:
|
||||
cd modules/openapi-generator-gradle-plugin;
|
||||
./gradlew -PossrhUsername="${SONATYPE_USERNAME}" -PossrhPassword="${SONATYPE_PASSWORD}" uploadArchives --no-daemon;
|
||||
echo "Finished ./gradlew uploadArchives";
|
||||
#./gradlew publishPlugins;
|
||||
#echo "Finished ./gradlew publishPlugins (plugin portal)";
|
||||
popd;
|
||||
fi;
|
||||
fi;
|
||||
|
||||
@@ -5,17 +5,39 @@
|
||||
|
||||
NODE_INDEX=${CIRCLE_NODE_INDEX:-0}
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$NODE_INDEX" = "1" ]; then
|
||||
echo "Running node $NODE_INDEX to test 'samples.circleci' defined in pom.xml ..."
|
||||
#cp CI/pom.xml.circleci pom.xml
|
||||
java -version
|
||||
mvn --quiet verify -Psamples.circleci
|
||||
elif [ "$NODE_INDEX" = "2" ]; then
|
||||
echo "Running node $NODE_INDEX to test ensure-up-to-date"
|
||||
java -version
|
||||
#export GO_POST_PROCESS_FILE="/usr/local/bin/gofmt -w"
|
||||
# not formatting the code as different go versions may format the code a bit different
|
||||
# ./bin/utils/ensure-up-to-date
|
||||
# run ensure-up-to-date sample script on SNAPSHOT version only
|
||||
project_version=`mvn org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate -Dexpression=project.version -q -DforceStdout`
|
||||
if [[ $project_version == *"-SNAPSHOT" ]]; then
|
||||
echo "Running node $NODE_INDEX to test ensure-up-to-date"
|
||||
java -version
|
||||
./bin/utils/ensure-up-to-date
|
||||
fi
|
||||
#elif [ "$NODE_INDEX" = "3" ]; then
|
||||
echo "Running node $NODE_INDEX to test haskell"
|
||||
# install haskell
|
||||
curl -sSL https://get.haskellstack.org/ | sh
|
||||
stack upgrade
|
||||
stack --version
|
||||
# install r
|
||||
sudo sh -c 'echo "deb http://cran.rstudio.com/bin/linux/ubuntu trusty/" >> /etc/apt/sources.list'
|
||||
gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9
|
||||
gpg -a --export E084DAB9 | sudo apt-key add -
|
||||
sudo apt-get update
|
||||
sudo apt-get -y install r-base
|
||||
R --version
|
||||
# install curl
|
||||
sudo apt-get -y build-dep libcurl4-gnutls-dev
|
||||
sudo apt-get -y install libcurl4-gnutls-dev
|
||||
# run integration tests
|
||||
mvn --quiet verify -Psamples.misc
|
||||
else
|
||||
echo "Running node $NODE_INDEX to test 'samples.circleci.jdk7' defined in pom.xml ..."
|
||||
sudo update-java-alternatives -s java-1.7.0-openjdk-amd64
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
|
||||
-->
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Org.OpenAPITools\Org.OpenAPITools.csproj">
|
||||
<Name>Org.OpenAPITools</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="linux-logo.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CompareNETObjects" Version="4.57.0" />
|
||||
<PackageReference Include="JsonSubTypes" Version="1.5.2" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
|
||||
<PackageReference Include="xunit" Version="2.4.1" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
|
||||
<PackageReference Include="RestSharp" Version="106.6.7" />
|
||||
<PackageReference Include="System.ComponentModel.Annotations" Version="4.5.0" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
|
||||
-->
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Org.OpenAPITools\Org.OpenAPITools.csproj">
|
||||
<Name>Org.OpenAPITools</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="linux-logo.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CompareNETObjects" Version="4.57.0" />
|
||||
<PackageReference Include="JsonSubTypes" Version="1.5.2" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
|
||||
<PackageReference Include="xunit" Version="2.4.1" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
|
||||
<PackageReference Include="RestSharp" Version="106.6.7" />
|
||||
<PackageReference Include="System.ComponentModel.Annotations" Version="4.5.0" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,91 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
|
||||
-->
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{19F1DEBC-DE5E-4517-8062-F000CD499087}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Org.OpenAPITools.Test</RootNamespace>
|
||||
<AssemblyName>Org.OpenAPITools.Test</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Newtonsoft.Json">
|
||||
<HintPath Condition="Exists('$(SolutionDir)\packages')">$(SolutionDir)\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<HintPath Condition="Exists('..\packages')">..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<HintPath Condition="Exists('..\..\packages')">..\..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<HintPath Condition="Exists('..\..\vendor')">..\..\vendor\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="JsonSubTypes">
|
||||
<HintPath Condition="Exists('$(SolutionDir)\packages')">$(SolutionDir)\packages\JsonSubTypes.1.5.1\lib\net45\JsonSubTypes.dll</HintPath>
|
||||
<HintPath Condition="Exists('..\packages')">..\packages\JsonSubTypes.1.5.1\lib\net45\JsonSubTypes.dll</HintPath>
|
||||
<HintPath Condition="Exists('..\..\packages')">..\..\packages\JsonSubTypes.1.5.1\lib\net45\JsonSubTypes.dll</HintPath>
|
||||
<HintPath Condition="Exists('..\..\vendor')">..\..\vendor\JsonSubTypes.1.5.1\lib\net45\JsonSubTypes.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="RestSharp">
|
||||
<HintPath Condition="Exists('$(SolutionDir)\packages')">$(SolutionDir)\packages\RestSharp.106.5.4\lib\net452\RestSharp.dll</HintPath>
|
||||
<HintPath Condition="Exists('..\packages')">..\packages\RestSharp.106.5.4\lib\net452\RestSharp.dll</HintPath>
|
||||
<HintPath Condition="Exists('..\..\packages')">..\..\packages\RestSharp.106.5.4\lib\net452\RestSharp.dll</HintPath>
|
||||
<HintPath Condition="Exists('..\..\vendor')">..\..\vendor\RestSharp.106.5.4\lib\net452\RestSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nunit.framework">
|
||||
<HintPath Condition="Exists('$(SolutionDir)\packages')">$(SolutionDir)\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
|
||||
<HintPath Condition="Exists('..\packages')">..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
|
||||
<HintPath Condition="Exists('..\..\packages')">..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
|
||||
<HintPath Condition="Exists('..\..\vendor')">..\..\vendor\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="**\*.cs" Exclude="obj\**" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MsBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Org.OpenAPITools\Org.OpenAPITools.csproj">
|
||||
<Project>{321C8C3F-0156-40C1-AE42-D59761FB9B6C}</Project>
|
||||
<Name>Org.OpenAPITools</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="linux-logo.png" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package org.openapitools.client;
|
||||
|
||||
import okhttp3.OkHttpClient;
|
||||
import org.openapitools.client.auth.*;
|
||||
|
||||
import java.text.DateFormat;
|
||||
@@ -165,7 +166,7 @@ public class ApiClientTest {
|
||||
|
||||
apiClient.setConnectTimeout(10000);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testGetAndSetReadTimeout() {
|
||||
// read timeout defaults to 10 seconds
|
||||
@@ -178,7 +179,7 @@ public class ApiClientTest {
|
||||
|
||||
apiClient.setReadTimeout(10000);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testGetAndSetWriteTimeout() {
|
||||
// write timeout defaults to 10 seconds
|
||||
@@ -191,7 +192,7 @@ public class ApiClientTest {
|
||||
|
||||
apiClient.setWriteTimeout(10000);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testParameterToPairWhenNameIsInvalid() throws Exception {
|
||||
List<Pair> pairs_a = apiClient.parameterToPair(null, new Integer(1));
|
||||
@@ -327,4 +328,25 @@ public class ApiClientTest {
|
||||
assertEquals("sun.gif", apiClient.sanitizeFilename("c:\\var\\tmp\\sun.gif"));
|
||||
assertEquals("sun.gif", apiClient.sanitizeFilename(".\\sun.gif"));
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testInterceptorCleanupWithNewClient() {
|
||||
OkHttpClient oldClient = apiClient.getHttpClient();
|
||||
assertEquals(1, oldClient.networkInterceptors().size());
|
||||
|
||||
OkHttpClient newClient = new OkHttpClient();
|
||||
apiClient.setHttpClient(newClient);
|
||||
assertEquals(1, apiClient.getHttpClient().networkInterceptors().size());
|
||||
apiClient.setHttpClient(newClient);
|
||||
assertEquals(1, apiClient.getHttpClient().networkInterceptors().size());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInterceptorCleanupWithSameClient() {
|
||||
OkHttpClient oldClient = apiClient.getHttpClient();
|
||||
assertEquals(1, oldClient.networkInterceptors().size());
|
||||
apiClient.setHttpClient(oldClient);
|
||||
assertEquals(1, apiClient.getHttpClient().networkInterceptors().size());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,6 +22,9 @@ import org.openapitools.client.*;
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.Arrays;
|
||||
import java.util.ArrayList;
|
||||
import java.util.concurrent.ConcurrentLinkedQueue;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -80,10 +83,7 @@ public class PetApiTest {
|
||||
api.addPet(pet);
|
||||
|
||||
Pet fetched = api.getPetById(pet.getId());
|
||||
assertNotNull(fetched);
|
||||
assertEquals(pet.getId(), fetched.getId());
|
||||
assertNotNull(fetched.getCategory());
|
||||
assertEquals(fetched.getCategory().getName(), pet.getCategory().getName());
|
||||
assertPetMatches(pet, fetched);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -95,10 +95,8 @@ public class PetApiTest {
|
||||
assertEquals(200, resp.getStatusCode());
|
||||
assertEquals("application/json", resp.getHeaders().get("Content-Type").get(0));
|
||||
Pet fetched = resp.getData();
|
||||
assertNotNull(fetched);
|
||||
assertEquals(pet.getId(), fetched.getId());
|
||||
assertNotNull(fetched.getCategory());
|
||||
assertEquals(fetched.getCategory().getName(), pet.getCategory().getName());
|
||||
|
||||
assertPetMatches(pet, fetched);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -146,10 +144,7 @@ public class PetApiTest {
|
||||
break;
|
||||
}
|
||||
} while (result.isEmpty());
|
||||
assertNotNull(fetched);
|
||||
assertEquals(pet.getId(), fetched.getId());
|
||||
assertNotNull(fetched.getCategory());
|
||||
assertEquals(fetched.getCategory().getName(), pet.getCategory().getName());
|
||||
assertPetMatches(pet, fetched);
|
||||
|
||||
// test getting a nonexistent pet
|
||||
result.clear();
|
||||
@@ -194,6 +189,65 @@ public class PetApiTest {
|
||||
assertEquals("application/json", exception.getResponseHeaders().get("Content-Type").get(0));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCreateAndGetMultiplePetsAsync() throws Exception {
|
||||
Pet pet1 = createPet();
|
||||
Pet pet2 = createPet();
|
||||
|
||||
final CountDownLatch addLatch = new CountDownLatch(2);
|
||||
final TestApiCallback<Void> addCallback1 = new TestApiCallback<Void>(addLatch);
|
||||
final TestApiCallback<Void> addCallback2 = new TestApiCallback<Void>(addLatch);
|
||||
|
||||
// Make 2 simultaneous calls
|
||||
api.addPetAsync(pet1, addCallback1);
|
||||
api.addPetAsync(pet2, addCallback2);
|
||||
|
||||
// wait for both asynchronous calls to finish (at most 10 seconds)
|
||||
assertTrue(addLatch.await(10, TimeUnit.SECONDS));
|
||||
|
||||
assertTrue(addCallback1.isDone());
|
||||
assertTrue(addCallback2.isDone());
|
||||
|
||||
if (!addCallback1.isSuccess()) throw addCallback1.getException();
|
||||
if (!addCallback2.isSuccess()) throw addCallback2.getException();
|
||||
|
||||
assertValidProgress(addCallback1.getUploadProgress());
|
||||
assertValidProgress(addCallback2.getUploadProgress());
|
||||
|
||||
final CountDownLatch getLatch = new CountDownLatch(3);
|
||||
final TestApiCallback<Pet> getCallback1 = new TestApiCallback<Pet>(getLatch);
|
||||
final TestApiCallback<Pet> getCallback2 = new TestApiCallback<Pet>(getLatch);
|
||||
final TestApiCallback<Pet> getCallback3 = new TestApiCallback<Pet>(getLatch);
|
||||
|
||||
api.getPetByIdAsync(pet1.getId(), getCallback1);
|
||||
api.getPetByIdAsync(pet2.getId(), getCallback2);
|
||||
// Get nonexistent pet
|
||||
api.getPetByIdAsync(-10000L, getCallback3);
|
||||
|
||||
// wait for all asynchronous calls to finish (at most 10 seconds)
|
||||
assertTrue(getLatch.await(10, TimeUnit.SECONDS));
|
||||
|
||||
assertTrue(getCallback1.isDone());
|
||||
assertTrue(getCallback2.isDone());
|
||||
assertTrue(getCallback3.isDone());
|
||||
|
||||
if (!getCallback1.isSuccess()) throw getCallback1.getException();
|
||||
if (!getCallback2.isSuccess()) throw getCallback2.getException();
|
||||
|
||||
assertPetMatches(pet1, getCallback1.getResult());
|
||||
assertPetMatches(pet2, getCallback2.getResult());
|
||||
|
||||
assertValidProgress(getCallback1.getDownloadProgress());
|
||||
assertValidProgress(getCallback2.getDownloadProgress());
|
||||
|
||||
// Last callback should fail with ApiException
|
||||
assertFalse(getCallback3.isSuccess());
|
||||
final ApiException exception = getCallback3.getException();
|
||||
assertNotNull(exception);
|
||||
assertEquals(404, exception.getCode());
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testUpdatePet() throws Exception {
|
||||
Pet pet = createPet();
|
||||
@@ -202,10 +256,7 @@ public class PetApiTest {
|
||||
api.updatePet(pet);
|
||||
|
||||
Pet fetched = api.getPetById(pet.getId());
|
||||
assertNotNull(fetched);
|
||||
assertEquals(pet.getId(), fetched.getId());
|
||||
assertNotNull(fetched.getCategory());
|
||||
assertEquals(fetched.getCategory().getName(), pet.getCategory().getName());
|
||||
assertPetMatches(pet, fetched);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -233,6 +284,7 @@ public class PetApiTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void testFindPetsByTags() throws Exception {
|
||||
Pet pet = createPet();
|
||||
pet.setName("monster");
|
||||
@@ -355,4 +407,127 @@ public class PetApiTest {
|
||||
private <T> T deserializeJson(String json, Type type, ApiClient apiClient) {
|
||||
return (T) apiClient.getJSON().deserialize(json, type);
|
||||
}
|
||||
|
||||
private void assertPetMatches(Pet expected, Pet actual) {
|
||||
assertNotNull(actual);
|
||||
assertEquals(expected.getId(), actual.getId());
|
||||
assertNotNull(actual.getCategory());
|
||||
assertEquals(expected.getCategory().getName(),
|
||||
actual.getCategory().getName());
|
||||
}
|
||||
|
||||
/**
|
||||
* Assert that the given upload/download progress list satisfies the
|
||||
* following constraints:
|
||||
*
|
||||
* - List is not empty
|
||||
* - Byte count should be nondecreasing
|
||||
* - The last element, and only the last element, should have done=true
|
||||
*/
|
||||
private void assertValidProgress(List<Progress> progressList) {
|
||||
assertFalse(progressList.isEmpty());
|
||||
|
||||
Progress prev = null;
|
||||
int index = 0;
|
||||
for (Progress progress : progressList) {
|
||||
if (prev != null) {
|
||||
if (prev.done || prev.bytes > progress.bytes) {
|
||||
fail("Progress list out of order at index " + index
|
||||
+ ": " + progressList);
|
||||
}
|
||||
}
|
||||
prev = progress;
|
||||
index += 1;
|
||||
}
|
||||
|
||||
if (!prev.done) {
|
||||
fail("Last progress item should have done=true: " + progressList);
|
||||
}
|
||||
}
|
||||
|
||||
private static class TestApiCallback<T> implements ApiCallback<T> {
|
||||
|
||||
private final CountDownLatch latch;
|
||||
private final ConcurrentLinkedQueue<Progress> uploadProgress =
|
||||
new ConcurrentLinkedQueue<Progress>();
|
||||
private final ConcurrentLinkedQueue<Progress> downloadProgress =
|
||||
new ConcurrentLinkedQueue<Progress>();
|
||||
|
||||
private boolean done;
|
||||
private boolean success;
|
||||
private ApiException exception;
|
||||
private T result;
|
||||
|
||||
public TestApiCallback(CountDownLatch latch) {
|
||||
this.latch = latch;
|
||||
this.done = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(ApiException e, int statusCode, Map<String, List<String>> responseHeaders) {
|
||||
exception = e;
|
||||
this.done = true;
|
||||
this.success = false;
|
||||
latch.countDown();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(T result, int statusCode, Map<String, List<String>> responseHeaders) {
|
||||
this.result = result;
|
||||
this.done = true;
|
||||
this.success = true;
|
||||
latch.countDown();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUploadProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
uploadProgress.add(new Progress(bytesWritten, contentLength, done));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDownloadProgress(long bytesRead, long contentLength, boolean done) {
|
||||
downloadProgress.add(new Progress(bytesRead, contentLength, done));
|
||||
}
|
||||
|
||||
public boolean isDone() {
|
||||
return done;
|
||||
}
|
||||
|
||||
public boolean isSuccess() {
|
||||
return success;
|
||||
}
|
||||
|
||||
public ApiException getException() {
|
||||
return exception;
|
||||
}
|
||||
|
||||
public T getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public List<Progress> getUploadProgress() {
|
||||
return new ArrayList<Progress>(uploadProgress);
|
||||
}
|
||||
|
||||
public List<Progress> getDownloadProgress() {
|
||||
return new ArrayList<Progress>(downloadProgress);
|
||||
}
|
||||
}
|
||||
|
||||
private static class Progress {
|
||||
public final long bytes;
|
||||
public final long contentLength;
|
||||
public final boolean done;
|
||||
|
||||
public Progress(long bytes, long contentLength, boolean done) {
|
||||
this.bytes = bytes;
|
||||
this.contentLength = contentLength;
|
||||
this.done = done;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "<Progress " + bytes + " " + contentLength + " " + done + ">";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ For [Vendor Extensions](https://github.com/OAI/OpenAPI-Specification/blob/master
|
||||
To add test cases (optional) covering the change in the code generator, please refer to [modules/openapi-generator/src/test/java/org/openapitools/codegen](https://github.com/openapitools/openapi-generator/tree/master/modules/openapi-generator/src/test/java/org/openapitools/codegen)
|
||||
|
||||
To test the templates, please perform the following:
|
||||
- Update the Petstore sample by running the shell script under `bin` folder. For example, run `./bin/ruby-petstore.sh` to update the Ruby PetStore API client under [`samples/client/petstore/ruby`](https://github.com/openapitools/openapi-generator/tree/master/samples/client/petstore/ruby) For Windows, the batch files can be found under `bin\windows` folder. (If you find that there are new files generated or unexpected changes as a result of the update, that's not unusual as the test cases are added to the OpenAPI spec from time to time. If you've questions or concerns, please open a ticket to start a discussion)
|
||||
- Update the Petstore sample by running the shell script under `bin` folder. For example, run `./bin/ruby-client-petstore.sh` to update the Ruby PetStore API client under [`samples/client/petstore/ruby`](https://github.com/openapitools/openapi-generator/tree/master/samples/client/petstore/ruby) For Windows, the batch files can be found under `bin\windows` folder. (If you find that there are new files generated or unexpected changes as a result of the update, that's not unusual as the test cases are added to the OpenAPI spec from time to time. If you've questions or concerns, please open a ticket to start a discussion)
|
||||
- Run the tests in the sample folder, e.g. in `samples/client/petstore/ruby`, run `mvn integration-test -rf :RubyPetstoreClientTests`. (some languages may not contain unit testing for Petstore and we're looking for contribution from the community to implement those tests)
|
||||
- Finally, git commit the updated samples files: `git commit -a`
|
||||
(`git add -A` if added files with new test cases)
|
||||
|
||||
16
README.md
16
README.md
@@ -39,7 +39,7 @@ OpenAPI Generator allows generation of API client libraries (SDK generation), se
|
||||
| | Languages/Frameworks |
|
||||
|-|-|
|
||||
**API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later), **C++** (cpprest, Qt5, Tizen), **Clojure**, **Dart (1.x, 2.x)**, **Elixir**, **Elm**, **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, Rest-assured, Spring 5 Web Client), **Kotlin**, **Lua**, **Node.js** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types) **Objective-C**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (rust, rust-server), **Scala** (akka, http4s, scalaz, swagger-async-httpclient), **Swift** (2.x, 3.x, 4.x), **Typescript** (AngularJS, Angular (2.x - 7.x), Aurelia, Axios, Fetch, Inversify, jQuery, Node, Rxjs)
|
||||
**Server stubs** | **Ada**, **C#** (ASP.NET Core, NancyFx), **C++** (Pistache, Restbed), **Erlang**, **Go** (net/http, Gin), **Haskell** (Servant), **Java** (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, RestEasy, Play Framework, [PKMST](https://github.com/ProKarma-Inc/pkmst-getting-started-examples)), **Kotlin** (Spring Boot), **PHP** (Laravel, Lumen, Slim, Silex, [Symfony](https://symfony.com/), [Zend Expressive](https://github.com/zendframework/zend-expressive)), **Python** (Flask), **NodeJS**, **Ruby** (Sinatra, Rails5), **Rust** (rust-server), **Scala** ([Finch](https://github.com/finagle/finch), [Lagom](https://github.com/lagom/lagom), Scalatra)
|
||||
**Server stubs** | **Ada**, **C#** (ASP.NET Core, NancyFx), **C++** (Pistache, Restbed), **Erlang**, **Go** (net/http, Gin), **Haskell** (Servant), **Java** (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, RestEasy, Play Framework, [PKMST](https://github.com/ProKarma-Inc/pkmst-getting-started-examples)), **Kotlin** (Spring Boot, Ktor), **PHP** (Laravel, Lumen, Slim, Silex, [Symfony](https://symfony.com/), [Zend Expressive](https://github.com/zendframework/zend-expressive)), **Python** (Flask), **NodeJS**, **Ruby** (Sinatra, Rails5), **Rust** (rust-server), **Scala** ([Finch](https://github.com/finagle/finch), [Lagom](https://github.com/lagom/lagom), Scalatra)
|
||||
**API documentation generators** | **HTML**, **Confluence Wiki**
|
||||
**Configuration files** | [**Apache2**](https://httpd.apache.org/)
|
||||
**Others** | **GraphQL**, **JMeter**, **MySQL Schema**
|
||||
@@ -226,7 +226,7 @@ Here is an example usage to generate a Ruby client:
|
||||
openapi-generator generate -i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g ruby -o /tmp/test/
|
||||
```
|
||||
|
||||
To reinstall with the latest master, run `brew reinstall --HEAD openapi-generator`
|
||||
To reinstall with the latest master, run `brew uninstall openapi-generator && brew install --HEAD openapi-generator`
|
||||
|
||||
### [1.6 - Docker](#table-of-contents)
|
||||
|
||||
@@ -524,6 +524,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
|
||||
- [Telstra](https://dev.telstra.com)
|
||||
- [TUI InfoTec GmbH](http://www.tui-infotec.com/)
|
||||
- [unblu inc.](https://www.unblu.com/)
|
||||
- [Veamly](https://www.veamly.com/)
|
||||
- [Xero](https://www.xero.com/)
|
||||
- [Zalando](https://www.zalando.com)
|
||||
|
||||
@@ -540,10 +541,16 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
|
||||
- 2018/09/12 - [RepreZen and OpenAPI 3.0: Now is the Time](https://www.reprezen.com/blog/reprezen-openapi-3.0-upgrade-now-is-the-time) by [Miles Daffin](https://www.reprezen.com/blog/author/miles-daffin)
|
||||
- 2018/10/31 - [A node package wrapper for openapi-generator](https://github.com/HarmoWatch/openapi-generator-cli)
|
||||
- 2018/11/03 - [OpenAPI Generator + golang + Flutter でアプリ開発](http://ryuichi111std.hatenablog.com/entry/2018/11/03/214005) by [Ryuichi Daigo](https://github.com/ryuichi111)
|
||||
- 2018/11/15 - [基于openapi3.0的yaml文件生成java代码的一次实践](https://blog.csdn.net/yzy199391/article/details/84023982) by [焱魔王](https://me.csdn.net/yzy199391)
|
||||
- 2018/11/19 - [OpenAPIs are everywhere](https://youtu.be/-lDot4Yn7Dg) by [Jeremie Bresson (Unblu)](https://github.com/jmini) at [EclipseCon Europe 2018](https://www.eclipsecon.org/europe2018)
|
||||
- 2018/12/09 - [openapi-generator をカスタマイズする方法](https://qiita.com/watiko/items/0961287c02eac9211572) by [@watiko](https://qiita.com/watiko)
|
||||
- 2019/01/03 - [Calling a Swagger service from Apex using openapi-generator](https://lekkimworld.com/2019/01/03/calling-a-swagger-service-from-apex-using-openapi-generator/) by [Mikkel Flindt Heisterberg](https://lekkimworld.com)
|
||||
- 2019/01/13 - [OpenAPI GeneratorでRESTful APIの定義書から色々自動生成する](https://ky-yk-d.hatenablog.com/entry/2019/01/13/234108) by [@ky_yk_d](https://twitter.com/ky_yk_d)
|
||||
- 2019/01/30 - [Rapid Application Development With API First Approach Using Open-API Generator](https://dzone.com/articles/rapid-api-development-using-open-api-generator) by [Milan Sonkar](https://dzone.com/users/828329/milan_sonkar.html)
|
||||
- 2019/02/02 - [平静を保ち、コードを生成せよ 〜 OpenAPI Generator誕生の背景と軌跡 〜](https://speakerdeck.com/akihito_nakano/gunmaweb34) by [中野暁人](https://github.com/ackintosh) at [Gunma.web #34 スキーマ駆動開発](https://gunmaweb.connpass.com/event/113974/)
|
||||
- 2019/02/20 - [An adventure in OpenAPI V3 code generation](https://mux.com/blog/an-adventure-in-openapi-v3-api-code-generation/) by [Phil Cluff](https://mux.com/blog/author/philc/)
|
||||
- 2019/02/26 - [Building API Services: A Beginner’s Guide](https://medium.com/google-cloud/building-api-services-a-beginners-guide-7274ae4c547f) by [Ratros Y.](https://medium.com/@ratrosy) in [Google Cloud Platofrm Blog](https://medium.com/google-cloud)
|
||||
- 2019/02/26 - [Building APIs with OpenAPI: Continued](https://medium.com/@ratrosy/building-apis-with-openapi-continued-5d0faaed32eb) by [Ratros Y.](https://medium.com/@ratrosy) in [Google Cloud Platofrm Blog](https://medium.com/google-cloud)
|
||||
|
||||
## [6 - About Us](#table-of-contents)
|
||||
|
||||
@@ -556,7 +563,6 @@ OpenAPI Generator core team members are contributors who have been making signif
|
||||
* [@jimschubert](https://github.com/jimschubert) (2016/05) [:heart:](https://www.patreon.com/jimschubert)
|
||||
* [@cbornet](https://github.com/cbornet) (2016/05)
|
||||
* [@ackintosh](https://github.com/ackintosh) (2018/02) [:heart:](https://www.patreon.com/ackintosh/overview)
|
||||
* [@JFCote](https://github.com/JFCote) (2018/03)
|
||||
* [@jmini](https://github.com/jmini) (2018/04)
|
||||
|
||||
:heart: = Link to support the contributor directly
|
||||
@@ -716,7 +722,7 @@ If you want to join the committee, please kindly apply by sending an email to te
|
||||
| GraphQL | @renepardon (2018/12) |
|
||||
| Groovy | |
|
||||
| Haskell | |
|
||||
| Java | @bbdouglas (2017/07) @JFCote (2017/08) @sreeshas (2017/08) @jfiala (2017/08) @lukoyanov (2017/09) @cbornet (2017/09) @jeff9finger (2018/01) |
|
||||
| Java | @bbdouglas (2017/07) @sreeshas (2017/08) @jfiala (2017/08) @lukoyanov (2017/09) @cbornet (2017/09) @jeff9finger (2018/01) |
|
||||
| Kotlin | @jimschubert (2017/09) [:heart:](https://www.patreon.com/jimschubert), @dr4ke616 (2018/08) |
|
||||
| Lua | @daurnimator (2017/08) |
|
||||
| NodeJS/Javascript | @CodeNinjai (2017/07) @frol (2017/07) @cliffano (2017/07) |
|
||||
@@ -726,7 +732,7 @@ If you want to join the committee, please kindly apply by sending an email to te
|
||||
| PowerShell | |
|
||||
| Python | @taxpon (2017/07) @frol (2017/07) @mbohlool (2017/07) @cbornet (2017/09) @kenjones-cisco (2017/11) @tomplus (2018/10) @Jyhess (2019/01) |
|
||||
| R | |
|
||||
| Ruby | @cliffano (2017/07) @zlx (2017/09) |
|
||||
| Ruby | @cliffano (2017/07) @zlx (2017/09) @autopp (2019/02) |
|
||||
| Rust | @frol (2017/07) @farcaller (2017/08) @bjgill (2017/12) |
|
||||
| Scala | @clasnake (2017/07), @jimschubert (2017/09) [:heart:](https://www.patreon.com/jimschubert), @shijinkui (2018/01), @ramzimaalej (2018/03) |
|
||||
| Swift | @jgavris (2017/07) @ehyche (2017/08) @Edubits (2017/09) @jaz-ah (2017/09) @d-date (2018/03) |
|
||||
|
||||
14
appveyor.yml
14
appveyor.yml
@@ -1,7 +1,7 @@
|
||||
# for CI with appveyor.yml
|
||||
# Ref: http://www.yegor256.com/2015/01/10/windows-appveyor-maven.html
|
||||
version: '{branch}-{build}'
|
||||
os: Windows Server 2012
|
||||
image: Visual Studio 2017
|
||||
hosts:
|
||||
petstore.swagger.io: 127.0.0.1
|
||||
install:
|
||||
@@ -23,9 +23,10 @@ install:
|
||||
- git clone https://github.com/wing328/swagger-samples
|
||||
- ps: Start-Process -FilePath 'C:\maven\apache-maven-3.2.5\bin\mvn' -ArgumentList 'jetty:run' -WorkingDirectory "$env:appveyor_build_folder\swagger-samples\java\java-jersey-jaxrs-ci"
|
||||
build_script:
|
||||
# build C# API client (refactor)
|
||||
- nuget restore samples\client\petstore\csharp-refactor\OpenAPIClient\Org.OpenAPITools.sln
|
||||
- msbuild samples\client\petstore\csharp-refactor\OpenAPIClient\Org.OpenAPITools.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
|
||||
- dotnet --info
|
||||
# build C# API client (netcore)
|
||||
- dotnet build samples\client\petstore\csharp-netcore\OpenAPIClient\Org.OpenAPITools.sln
|
||||
- dotnet build samples\client\petstore\csharp-netcore\OpenAPIClientCore\Org.OpenAPITools.sln
|
||||
# build C# API client
|
||||
- nuget restore samples\client\petstore\csharp\OpenAPIClient\Org.OpenAPITools.sln
|
||||
- msbuild samples\client\petstore\csharp\OpenAPIClient\Org.OpenAPITools.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
|
||||
@@ -40,8 +41,9 @@ build_script:
|
||||
test_script:
|
||||
# restore test-related files
|
||||
- copy /b/v/y CI\samples.ci\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj samples\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
|
||||
# test c# API client (refactor)
|
||||
- nunit-console samples\client\petstore\csharp-refactor\OpenAPIClient\src\Org.OpenAPITools.Test\bin\Debug\Org.OpenAPITools.Test.dll --result=myresults.xml;format=AppVeyor
|
||||
# test c# API client (netcore)
|
||||
- dotnet test samples\client\petstore\csharp-netcore\OpenAPIClient\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
|
||||
- dotnet test samples\client\petstore\csharp-netcore\OpenAPIClientCore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
|
||||
# test c# API client
|
||||
- nunit-console samples\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\bin\Debug\Org.OpenAPITools.Test.dll --result=myresults.xml;format=AppVeyor
|
||||
# test c# API client (with PropertyChanged)
|
||||
|
||||
7
bin/csharp-netcore-petstore-all.sh
Executable file
7
bin/csharp-netcore-petstore-all.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
# C# Petstore API client .NET Standard 2.0
|
||||
./bin/csharp-netcore-petstore.sh
|
||||
|
||||
# C# Petstore API client .NET Core 2.0
|
||||
./bin/csharp-netcore-petstore-netcore.sh
|
||||
38
bin/csharp-netcore-petstore-netcore.sh
Executable file
38
bin/csharp-netcore-petstore-netcore.sh
Executable file
@@ -0,0 +1,38 @@
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPT="$0"
|
||||
echo "# START SCRIPT: $SCRIPT"
|
||||
|
||||
while [ -h "$SCRIPT" ] ; do
|
||||
ls=`ls -ld "$SCRIPT"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
SCRIPT="$link"
|
||||
else
|
||||
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ! -d "${APP_DIR}" ]; then
|
||||
APP_DIR=`dirname "$SCRIPT"`/..
|
||||
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||
fi
|
||||
|
||||
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||
outdir="samples/client/petstore/csharp-netcore/OpenAPIClientCore"
|
||||
|
||||
if [ ! -f "$executable" ]
|
||||
then
|
||||
mvn -B clean package
|
||||
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/openapi-generator/src/main/resources/csharp-netcore/ -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g csharp-netcore -o ${outdir} --additional-properties packageGuid={321C8C3F-0156-40C1-AE42-D59761FB9B6C},useCompareNetObjects=true,targetFramework=netcoreapp2.0 $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
# restore csproj file
|
||||
echo "restore csproject file: CI/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj"
|
||||
cp ./CI/samples.ci/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj ./samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools.Test/
|
||||
|
||||
@@ -27,11 +27,11 @@ 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/openapi-generator/src/main/resources/csharp-refactor/ -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g csharp-refactor -o samples/client/petstore/csharp-refactor/OpenAPIClient --additional-properties packageGuid={321C8C3F-0156-40C1-AE42-D59761FB9B6C},useCompareNetObjects=true $@"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/csharp-netcore/ -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g csharp-netcore -o samples/client/petstore/csharp-netcore/OpenAPIClient --additional-properties packageGuid={321C8C3F-0156-40C1-AE42-D59761FB9B6C},useCompareNetObjects=true $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
# restore csproj file
|
||||
echo "restore csproject file: CI/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj"
|
||||
cp ./CI/samples.ci/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj ./samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools.Test/
|
||||
echo "restore csproject file: CI/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj"
|
||||
cp ./CI/samples.ci/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj ./samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# C# Petstore API client (.NET 3.5)
|
||||
./bin/csharp-refactor-petstore.sh
|
||||
|
||||
# C# Petstore API client with PropertyChanged
|
||||
./bin/csharp-refactor-property-changed-petstore.sh
|
||||
|
||||
# C# Petstore API client (v5.0 for .net standarnd 1.3+)
|
||||
./bin/csharp-refactor-petstore-net-standard.sh
|
||||
|
||||
# C# Petstore API client (.NET 4.0)
|
||||
./bin/csharp-refactor-petstore-net-40.sh
|
||||
|
||||
# C# Petstore API client (.NET 3.5)
|
||||
./bin/csharp-refactor-petstore-net-35.sh
|
||||
|
||||
@@ -25,10 +25,17 @@ then
|
||||
mvn -B clean package
|
||||
fi
|
||||
|
||||
SPEC="modules/openapi-generator/src/test/resources/2_0/petstore.yaml"
|
||||
GENERATOR="go-gin-server"
|
||||
STUB_DIR="samples/server/petstore/go-gin-api-server"
|
||||
|
||||
echo "Removing files and folders under $STUB_DIR"
|
||||
rm -rf $STUB_DIR
|
||||
|
||||
# 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/openapi-generator/src/main/resources/go-gin-server -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g go-gin-server -o samples/server/petstore/go-gin-api-server -DpackageName=petstoreserver --additional-properties hideGenerationTimestamp=true -Dservice $@"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/go-gin-server -i $SPEC -g $GENERATOR -o $STUB_DIR -DpackageName=petstoreserver --additional-properties hideGenerationTimestamp=true -Dservice $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
#!/usr/bin/env bash
|
||||
@@ -25,9 +25,16 @@ then
|
||||
mvn -B clean package
|
||||
fi
|
||||
|
||||
SPEC="modules/openapi-generator/src/test/resources/2_0/petstore.yaml"
|
||||
GENERATOR="go-server"
|
||||
STUB_DIR="samples/server/petstore/go-api-server"
|
||||
|
||||
echo "Removing files and folders under $STUB_DIR"
|
||||
rm -rf $STUB_DIR
|
||||
|
||||
# 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/openapi-generator/src/main/resources/go-server -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g go-server -o samples/server/petstore/go-api-server -DpackageName=petstoreserver --additional-properties hideGenerationTimestamp=true -Dservice $@"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/go-server -i $SPEC -g $GENERATOR -o $STUB_DIR -DpackageName=petstoreserver --additional-properties hideGenerationTimestamp=true -Dservice $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
@@ -25,11 +25,15 @@ then
|
||||
mvn -B clean package
|
||||
fi
|
||||
|
||||
echo "Removing files and folders under samples/client/petstore/go/go-petstore-withXml"
|
||||
rm -rf samples/client/petstore/go/go-petstore-withXml
|
||||
SPEC="modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml"
|
||||
GENERATOR="go"
|
||||
STUB_DIR="samples/client/petstore/go/go-petstore-withXml"
|
||||
|
||||
echo "Removing files and folders under $STUB_DIR"
|
||||
rm -rf $STUB_DIR
|
||||
|
||||
# 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/openapi-generator/src/main/resources/go -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g go -o samples/client/petstore/go/go-petstore-withXml -DpackageName=petstore,withXml=true,withGoCodegenComment=true $@"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/go -i $SPEC -g $GENERATOR -o $STUB_DIR -DpackageName=petstore,withXml=true,withGoCodegenComment=true $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
@@ -25,11 +25,15 @@ then
|
||||
mvn -B clean package
|
||||
fi
|
||||
|
||||
echo "Removing files and folders under samples/client/petstore/go/go-petstore"
|
||||
rm -rf samples/client/petstore/go/go-petstore
|
||||
SPEC="modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml"
|
||||
GENERATOR="go"
|
||||
STUB_DIR="samples/client/petstore/go/go-petstore"
|
||||
|
||||
echo "Removing files and folders under $STUB_DIR"
|
||||
rm -rf $STUB_DIR
|
||||
|
||||
# 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/openapi-generator/src/main/resources/go -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g go -o samples/client/petstore/go/go-petstore -DpackageName=petstore $@"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/go -i $SPEC -g $GENERATOR -o $STUB_DIR -DpackageName=petstore $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
@@ -17,3 +17,5 @@
|
||||
./bin/jaxrs-spec-petstore-server-interface.sh
|
||||
./bin/jaxrs-spec-petstore-server.sh
|
||||
./bin/jaxrs-usetags-petstore-server.sh
|
||||
|
||||
echo " Please run ./bin/jaxrs-cxf-petstore-server-test-data.sh manually instead"
|
||||
|
||||
@@ -27,7 +27,7 @@ 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/openapi-generator/src/main/resources/MSF4J -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java-msf4j -o samples/server/petstore/java-msf4j/ -DhideGenerationTimestamp=true --additional-properties artifactId=swagger-msf4j-server $@"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/MSF4J -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java-msf4j -o samples/server/petstore/java-msf4j/ -DhideGenerationTimestamp=true --additional-properties artifactId=java-msf4j-server $@"
|
||||
|
||||
echo "Removing files and folders under samples/server/petstore/java-msf4j/src/main"
|
||||
rm -rf samples/server/petstore/java-msf4j/src/main
|
||||
|
||||
32
bin/jaxrs-cxf-petstore-server-test-data.sh
Executable file
32
bin/jaxrs-cxf-petstore-server-test-data.sh
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPT="$0"
|
||||
echo "# START SCRIPT: $SCRIPT"
|
||||
|
||||
while [ -h "$SCRIPT" ] ; do
|
||||
ls=`ls -ld "$SCRIPT"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
SCRIPT="$link"
|
||||
else
|
||||
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ! -d "${APP_DIR}" ]; then
|
||||
APP_DIR=`dirname "$SCRIPT"`/..
|
||||
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||
fi
|
||||
|
||||
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||
|
||||
if [ ! -f "$executable" ]
|
||||
then
|
||||
mvn -B clean package
|
||||
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 --artifact-id cxf-test-data -t modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-cxf-extended -o samples/server/petstore/jaxrs-cxf-test-data -DhideGenerationTimestamp=true -DuseAnnotatedBasePath=true --generate-alias-as-model --additional-properties java8=true,generateSpringApplication=true,generateSpringBootApplication=true,generateOperationBody=true,loadTestDataFromFile=true $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
@@ -26,7 +26,7 @@ then
|
||||
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 -DdebugSupportingFiles=true"
|
||||
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -t modules/openapi-generator/src/main/resources/kotlin-server -g kotlin-server --library=ktor -o samples/server/petstore/kotlin-server/ktor -DhideGenerationTimestamp=true $@"
|
||||
|
||||
java ${JAVA_OPTS} -jar ${executable} ${ags}
|
||||
|
||||
41
bin/openapi3/go-gin-petstore-server.sh
Executable file
41
bin/openapi3/go-gin-petstore-server.sh
Executable file
@@ -0,0 +1,41 @@
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPT="$0"
|
||||
echo "# START SCRIPT: $SCRIPT"
|
||||
|
||||
while [ -h "$SCRIPT" ] ; do
|
||||
ls=`ls -ld "$SCRIPT"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
SCRIPT="$link"
|
||||
else
|
||||
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ! -d "${APP_DIR}" ]; then
|
||||
APP_DIR=`dirname "$SCRIPT"`/..
|
||||
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||
fi
|
||||
|
||||
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||
|
||||
if [ ! -f "$executable" ]
|
||||
then
|
||||
mvn -B clean package
|
||||
fi
|
||||
|
||||
SPEC="modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml"
|
||||
GENERATOR="go-gin-server"
|
||||
STUB_DIR="samples/openapi3/server/petstore/go-gin-api-server"
|
||||
|
||||
echo "Removing files and folders under $STUB_DIR"
|
||||
rm -rf $STUB_DIR
|
||||
|
||||
# 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/openapi-generator/src/main/resources/go-gin-server -i $SPEC -g $GENERATOR -o $STUB_DIR -DpackageName=petstoreserver --additional-properties hideGenerationTimestamp=true -Dservice $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
#!/usr/bin/env bash
|
||||
@@ -25,9 +25,16 @@ then
|
||||
mvn clean package
|
||||
fi
|
||||
|
||||
SPEC="modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml"
|
||||
GENERATOR="go-server"
|
||||
STUB_DIR="samples/openapi3/server/petstore/go-api-server"
|
||||
|
||||
echo "Removing files and folders under $STUB_DIR"
|
||||
rm -rf $STUB_DIR
|
||||
|
||||
# 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/openapi-generator/src/main/resources/go-server -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g go-server -o samples/server/petstore/go-api-server -DpackageName=petstoreserver --additional-properties hideGenerationTimestamp=true -Dservice $@"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/go-server -i $SPEC -g $GENERATOR -o $STUB_DIR -DpackageName=petstoreserver --additional-properties hideGenerationTimestamp=true -Dservice $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
39
bin/openapi3/go-petstore.sh
Executable file
39
bin/openapi3/go-petstore.sh
Executable file
@@ -0,0 +1,39 @@
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPT="$0"
|
||||
echo "# START SCRIPT: $SCRIPT"
|
||||
|
||||
while [ -h "$SCRIPT" ] ; do
|
||||
ls=`ls -ld "$SCRIPT"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
SCRIPT="$link"
|
||||
else
|
||||
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ! -d "${APP_DIR}" ]; then
|
||||
APP_DIR=`dirname "$SCRIPT"`/..
|
||||
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||
fi
|
||||
|
||||
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||
|
||||
if [ ! -f "$executable" ]
|
||||
then
|
||||
mvn -B clean package
|
||||
fi
|
||||
|
||||
SPEC="modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml"
|
||||
GENERATOR="go"
|
||||
STUB_DIR="samples/openapi3/client/petstore/go/go-petstore"
|
||||
|
||||
echo "Removing files and folders under $STUB_DIR"
|
||||
rm -rf $STUB_DIR
|
||||
|
||||
# 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/openapi-generator/src/main/resources/go -i $SPEC -g $GENERATOR -o $STUB_DIR -DpackageName=petstore $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
@@ -30,6 +30,12 @@ echo "purge ruby petstore lib, docs folder"
|
||||
rm -Rf samples/openapi3/client/petstore/ruby/lib
|
||||
rm -Rf samples/openapi3/client/petstore/ruby/docs
|
||||
|
||||
# purge test files other than integration test
|
||||
# NOTE: spec/custom/*.rb and spec/petstore_helper.rb are not generated files
|
||||
echo "purge ruby petstore spec"
|
||||
find samples/openapi3/client/petstore/ruby/spec -type d -not -name spec -not -name custom | xargs rm -Rf
|
||||
find samples/openapi3/client/petstore/ruby/spec -type f -not -name petstore_helper.rb -not -iwholename '*/spec/custom/*' | xargs rm -Rf
|
||||
|
||||
# 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/openapi-generator/src/main/resources/ruby-client -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g ruby -c bin/ruby-petstore.json -o samples/openapi3/client/petstore/ruby -DskipFormModel=true $@"
|
||||
|
||||
10
bin/openapi3/windows/php-petstore.bat
Normal file
10
bin/openapi3/windows/php-petstore.bat
Normal file
@@ -0,0 +1,10 @@
|
||||
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
|
||||
|
||||
If Not Exist %executable% (
|
||||
mvn clean package
|
||||
)
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
|
||||
set ags=generate -i modules\openapi-generator\src\test\resources\3_0\petstore-with-fake-endpoints-models-for-testing.yaml -g php -o samples\openapi3\client\petstore\php\OpenAPIClient-php
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
44
bin/python-server-blueplanet-petstore.sh
Executable file
44
bin/python-server-blueplanet-petstore.sh
Executable file
@@ -0,0 +1,44 @@
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPT="$0"
|
||||
echo "# START SCRIPT: $SCRIPT"
|
||||
|
||||
while [ -h "$SCRIPT" ] ; do
|
||||
ls=`ls -ld "$SCRIPT"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
SCRIPT="$link"
|
||||
else
|
||||
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ! -d "${APP_DIR}" ]; then
|
||||
APP_DIR=`dirname "$SCRIPT"`/..
|
||||
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||
fi
|
||||
|
||||
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||
|
||||
if [ ! -f "$executable" ]
|
||||
then
|
||||
mvn -B clean package
|
||||
fi
|
||||
|
||||
generator=python-blueplanet
|
||||
input=modules/openapi-generator/src/test/resources/2_0/petstore.yaml
|
||||
out_folder=samples/server/petstore/$generator
|
||||
resources=modules/openapi-generator/src/main/resources/$generator
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -t $resources -i $input -g $generator -o $out_folder -Dservice $@"
|
||||
|
||||
rm -rf $out_folder/.openapi*
|
||||
rm -rf $out_folder/openapi_server
|
||||
rm -rf $out_folder/tests*
|
||||
rm $out_folder/README.md
|
||||
rm $out_folder/requirements.txt
|
||||
rm $out_folder/test-requirements.txt
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
@@ -27,6 +27,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/openapi-generator/src/main/resources/scala-httpclient -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g scala-httpclient -o samples/client/petstore/scala-httpclient $@"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/scala-httpclient -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g scala-httpclient-deprecated -o samples/client/petstore/scala-httpclient $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
@@ -25,8 +25,15 @@ then
|
||||
mvn clean package
|
||||
fi
|
||||
|
||||
SPEC="modules/openapi-generator/src/test/resources/2_0/petstore-security-test.yaml"
|
||||
GENERATOR="go"
|
||||
STUB_DIR="samples/client/petstore-security-test/go"
|
||||
|
||||
echo "Removing files and folders under $STUB_DIR"
|
||||
rm -rf $STUB_DIR
|
||||
|
||||
# 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/openapi-generator/src/main/resources/go -i modules/openapi-generator/src/test/resources/2_0/petstore-security-test.yaml -g go -o samples/client/petstore-security-test/go $@"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/go -i $SPEC -g $GENERATOR -o $STUB_DIR $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
0
bin/security/mysql-schema-petstore.sh
Normal file → Executable file
0
bin/security/mysql-schema-petstore.sh
Normal file → Executable file
@@ -33,6 +33,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/openapi-generator/src/main/resources/php -i modules/openapi-generator/src/test/resources/3_0/petstore-security-test.yaml -g php -o samples/client/petstore-security-test/php $@"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/php -i modules/openapi-generator/src/test/resources/3_0/petstore-security-test.yaml -g php -o samples/openapi3/client/petstore-security-test/php/OpenAPIClient-php $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
10
bin/security/openapi3/windows/php-petstore.bat
Normal file
10
bin/security/openapi3/windows/php-petstore.bat
Normal file
@@ -0,0 +1,10 @@
|
||||
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
|
||||
|
||||
If Not Exist %executable% (
|
||||
mvn clean package
|
||||
)
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
|
||||
set ags=generate -i modules\openapi-generator\src\test\resources\3_0\petstore-security-test.yaml -g php -o samples\openapi3\client\petstore-security-test\php\OpenAPIClient-php
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
0
bin/security/typescript-jquery-all.sh
Normal file → Executable file
0
bin/security/typescript-jquery-all.sh
Normal file → Executable file
10
bin/security/windows/php-petstore.bat
Normal file
10
bin/security/windows/php-petstore.bat
Normal file
@@ -0,0 +1,10 @@
|
||||
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
|
||||
|
||||
If Not Exist %executable% (
|
||||
mvn clean package
|
||||
)
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
|
||||
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-security-test.yaml -g php -o samples\client\petstore-security-test\php\OpenAPIClient-php
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
1
bin/typescript-axios-petstore-all.sh
Normal file → Executable file
1
bin/typescript-axios-petstore-all.sh
Normal file → Executable file
@@ -2,5 +2,6 @@
|
||||
|
||||
./bin/typescript-axios-petstore-target-es6.sh
|
||||
./bin/typescript-axios-petstore-with-npm-version.sh
|
||||
./bin/typescript-axios-petstore-with-npm-version-and-separate-models-and-api.sh
|
||||
./bin/typescript-axios-petstore-interfaces.sh
|
||||
./bin/typescript-axios-petstore.sh
|
||||
|
||||
0
bin/typescript-axios-petstore-interfaces.sh
Normal file → Executable file
0
bin/typescript-axios-petstore-interfaces.sh
Normal file → Executable file
0
bin/typescript-axios-petstore-target-es6.json
Normal file → Executable file
0
bin/typescript-axios-petstore-target-es6.json
Normal file → Executable file
0
bin/typescript-axios-petstore-target-es6.sh
Normal file → Executable file
0
bin/typescript-axios-petstore-target-es6.sh
Normal file → Executable file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"npmName": "@swagger/typescript-axios-petstore",
|
||||
"npmVersion": "1.0.0",
|
||||
"npmRepository": "https://skimdb.npmjs.com/registry",
|
||||
"snapshot": false,
|
||||
"withSeparateModelsAndApi": true,
|
||||
"modelPackage": "model.some.levels.deep",
|
||||
"apiPackage": "api.another.level"
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPT="$0"
|
||||
echo "# START SCRIPT: $SCRIPT"
|
||||
|
||||
while [ -h "$SCRIPT" ] ; do
|
||||
ls=`ls -ld "$SCRIPT"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
SCRIPT="$link"
|
||||
else
|
||||
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ! -d "${APP_DIR}" ]; then
|
||||
APP_DIR=`dirname "$SCRIPT"`/..
|
||||
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||
fi
|
||||
|
||||
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||
|
||||
if [ ! -f "$executable" ]
|
||||
then
|
||||
mvn -B clean package
|
||||
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 -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-axios -c bin/typescript-axios-petstore-with-npm-version-and-separate-models-and-api.json -o samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
0
bin/typescript-axios-petstore-with-npm-version.json
Normal file → Executable file
0
bin/typescript-axios-petstore-with-npm-version.json
Normal file → Executable file
0
bin/typescript-axios-petstore-with-npm-version.sh
Normal file → Executable file
0
bin/typescript-axios-petstore-with-npm-version.sh
Normal file → Executable file
0
bin/typescript-axios-petstore.sh
Normal file → Executable file
0
bin/typescript-axios-petstore.sh
Normal file → Executable file
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# grep for \t in the generators
|
||||
RESULT=`find modules/openapi-generator/src/ -name "*.java" | xargs grep $'\t'`
|
||||
RESULT=`find modules -name "*.java" | xargs grep $'\t'`
|
||||
|
||||
echo -e "$RESULT"
|
||||
|
||||
|
||||
@@ -10,18 +10,22 @@ echo "Please press CTRL+C to stop or the script will continue in 5 seconds."
|
||||
sleep 5
|
||||
|
||||
# LIST OF SCRIPTS:
|
||||
declare -a scripts=("./bin/openapi3/ruby-client-petstore.sh"
|
||||
declare -a scripts=(
|
||||
# SAMPLES
|
||||
"./bin/openapi3/ruby-client-petstore.sh"
|
||||
"./bin/ruby-client-petstore.sh"
|
||||
"./bin/java-petstore-all.sh"
|
||||
"./bin/java-jaxrs-petstore-server-all.sh"
|
||||
"./bin/java-msf4j-petstore-server.sh"
|
||||
"./bin/openapi3/jaxrs-jersey-petstore.sh"
|
||||
"./bin/spring-all-pestore.sh"
|
||||
"./bin/javascript-petstore-all.sh"
|
||||
"./bin/kotlin-client-petstore.sh"
|
||||
"./bin/kotlin-client-string.sh"
|
||||
"./bin/kotlin-client-threetenbp.sh"
|
||||
"./bin/kotlin-server-petstore.sh"
|
||||
"./bin/mysql-schema-petstore.sh"
|
||||
"./bin/python-petstore.sh"
|
||||
"./bin/python-petstore-all.sh"
|
||||
"./bin/openapi3/python-petstore.sh"
|
||||
"./bin/php-petstore.sh"
|
||||
"./bin/php-silex-petstore-server.sh"
|
||||
@@ -31,14 +35,17 @@ declare -a scripts=("./bin/openapi3/ruby-client-petstore.sh"
|
||||
"./bin/php-ze-ph-petstore-server.sh"
|
||||
"./bin/openapi3/php-petstore.sh"
|
||||
"./bin/typescript-angular-petstore-all.sh"
|
||||
"./bin/typescript-axios-petstore-all.sh"
|
||||
"./bin/typescript-fetch-petstore-all.sh"
|
||||
"./bin/typescript-node-petstore-all.sh"
|
||||
"./bin/typescript-inversify-petstore.sh"
|
||||
"./bin/typescript-rxjs-petstore.sh"
|
||||
"./bin/rust-server-petstore.sh"
|
||||
"./bin/r-petstore.sh"
|
||||
"./bin/haskell-http-client-petstore.sh"
|
||||
"./bin/csharp-petstore.sh"
|
||||
"./bin/meta-codegen.sh"
|
||||
# OTHERS
|
||||
"./bin/utils/export_docs_generators.sh"
|
||||
"./bin/utils/export_generators_docusaurus_index.sh"
|
||||
"./bin/utils/copy-to-website.sh"
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
####
|
||||
set -o pipefail
|
||||
|
||||
for cmd in {mvn,python,curl}; do
|
||||
for cmd in {mvn,jq,curl}; do
|
||||
if ! command -v ${cmd} > /dev/null; then
|
||||
>&2 echo "This script requires '${cmd}' to be installed."
|
||||
exit 1
|
||||
@@ -28,8 +28,12 @@ for cmd in {mvn,python,curl}; do
|
||||
done
|
||||
|
||||
function latest.tag {
|
||||
local uri="https://api.github.com/repos/${1}/tags"
|
||||
curl -s ${uri} | python -c "import sys, json; print json.load(sys.stdin)[0]['name'][1:]"
|
||||
local uri="https://api.github.com/repos/${1}/releases"
|
||||
local ver=$(curl -s ${uri} | jq -r 'first(.[]|select(.prerelease==false)).tag_name')
|
||||
if [[ $ver == v* ]]; then
|
||||
ver=${ver:1}
|
||||
fi
|
||||
echo $ver
|
||||
}
|
||||
|
||||
ghrepo=openapitools/openapi-generator
|
||||
@@ -57,4 +61,4 @@ java -ea \
|
||||
-Xms512M \
|
||||
-Xmx1024M \
|
||||
-server \
|
||||
-jar ${DIR}/${jar} "$@"
|
||||
-jar ${DIR}/${jar} "$@"
|
||||
|
||||
@@ -18,11 +18,11 @@ do
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if eval java -jar ${executable} generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g ${GENERATOR} -o /tmp/openapi-generator-test-fake-petstore/3.0/${GENERATOR} > /dev/null 2>&1; then
|
||||
if eval java -jar ${executable} generate -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g ${GENERATOR} -o /tmp/openapi-generator-test-fake-petstore/3.0/${GENERATOR} > /dev/null 2>&1; then
|
||||
echo "[OAS 3.0] Executed ${GENERATOR} successfully!"
|
||||
else
|
||||
echo "ERROR: Failed to run ${GENERATOR}"
|
||||
echo "java -jar ${executable} generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g ${GENERATOR} -o /tmp/openapi-generator-test-fake-petstore/3.0/${GENERATOR}"
|
||||
echo "java -jar ${executable} generate -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g ${GENERATOR} -o /tmp/openapi-generator-test-fake-petstore/3.0/${GENERATOR}"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -1,10 +1,21 @@
|
||||
setlocal
|
||||
|
||||
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
|
||||
|
||||
If Not Exist %executable% (
|
||||
mvn clean package
|
||||
)
|
||||
|
||||
set SPEC=modules\openapi-generator\src\test\resources\2_0\petstore.yaml
|
||||
set GENERATOR=go-gin-server
|
||||
set STUB_DIR=samples\server\petstore\go-gin-api-server
|
||||
|
||||
echo Removing files and folders under %STUB_DIR%
|
||||
del /F /S /Q %STUB_DIR%
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties
|
||||
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g go-gin-server -o samples\server\petstore\go-gin-api-server -DpackageName=petstoreserver -Dservice
|
||||
set ags=generate -i %SPEC% -g %GENERATOR% -o %STUB_DIR% -DpackageName=petstoreserver -Dservice
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
|
||||
endlocal
|
||||
|
||||
@@ -1,10 +1,21 @@
|
||||
setlocal
|
||||
|
||||
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
|
||||
|
||||
If Not Exist %executable% (
|
||||
mvn clean package
|
||||
)
|
||||
|
||||
set SPEC=modules\openapi-generator\src\test\resources\2_0\petstore.yaml
|
||||
set GENERATOR=go-server
|
||||
set STUB_DIR=samples\server\petstore\go-api-server
|
||||
|
||||
echo Removing files and folders under %STUB_DIR%
|
||||
del /F /S /Q %STUB_DIR%
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties
|
||||
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g go-server -o samples\server\petstore\go-api-server -DpackageName=petstoreserver -Dservice
|
||||
set ags=generate -i %SPEC% -g %GENERATOR% -o %STUB_DIR% -DpackageName=petstoreserver -Dservice
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
|
||||
endlocal
|
||||
@@ -1,10 +1,21 @@
|
||||
setlocal
|
||||
|
||||
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
|
||||
|
||||
If Not Exist %executable% (
|
||||
mvn clean package
|
||||
)
|
||||
|
||||
set SPEC=modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml
|
||||
set GENERATOR=go
|
||||
set STUB_DIR=samples\client\petstore\go\go-petstore-withXml
|
||||
|
||||
echo Removing files and folders under %STUB_DIR%
|
||||
del /F /S /Q %STUB_DIR%
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties
|
||||
set ags=generate -t modules\openapi-generator\src\main\resources\go -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g go -o samples\client\petstore\go\go-petstore-withXml -DpackageName=petstore,withXml=true
|
||||
set ags=generate -t modules\openapi-generator\src\main\resources\go -i %SPEC% -g %GENERATOR% -o %STUB_DIR% -DpackageName=petstore,withXml=true
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
|
||||
endlocal
|
||||
@@ -1,10 +1,21 @@
|
||||
setlocal
|
||||
|
||||
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
|
||||
|
||||
If Not Exist %executable% (
|
||||
mvn clean package
|
||||
)
|
||||
|
||||
set SPEC=modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml
|
||||
set GENERATOR=go
|
||||
set STUB_DIR=samples\client\petstore\go\go-petstore
|
||||
|
||||
echo Removing files and folders under %STUB_DIR%
|
||||
del /F /S /Q %STUB_DIR%
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties
|
||||
set ags=generate -t modules\openapi-generator\src\main\resources\go -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g go -o samples\client\petstore\go\go-petstore -DpackageName=petstore
|
||||
set ags=generate -t modules\openapi-generator\src\main\resources\go -i %SPEC% -g %GENERATOR% -o %STUB_DIR% -DpackageName=petstore
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
|
||||
endlocal
|
||||
22
bin/windows/java-petstore-all.bat
Normal file
22
bin/windows/java-petstore-all.bat
Normal file
@@ -0,0 +1,22 @@
|
||||
call .\bin\windows\java-petstore-jersey1.bat
|
||||
call .\bin\windows\java-petstore-jersey2.bat
|
||||
call .\bin\windows\java-petstore-feign.bat
|
||||
call .\bin\windows\java-petstore-feign-10x.bat
|
||||
call .\bin\windows\java-petstore-okhttp-gson.bat
|
||||
call .\bin\windows\java-petstore-okhttp-gson-parcelable.bat
|
||||
call .\bin\windows\java-petstore-retrofit.bat
|
||||
call .\bin\windows\java-petstore-retrofit2.bat
|
||||
call .\bin\windows\java-petstore-retrofit2rx.bat
|
||||
call .\bin\windows\java-petstore-retrofit2rx2.bat
|
||||
call .\bin\windows\java8-petstore-jersey2.bat
|
||||
call .\bin\windows\java-petstore-retrofit2-play24.bat
|
||||
call .\bin\windows\java-petstore-retrofit2-play25.bat
|
||||
call .\bin\windows\java-petstore-retrofit2-play26.bat
|
||||
call .\bin\windows\java-petstore-jersey2-java6.bat
|
||||
call .\bin\windows\java-petstore-resttemplate.bat
|
||||
call .\bin\windows\java-petstore-resttemplate-withxml.bat
|
||||
call .\bin\windows\java-petstore-webclient.bat
|
||||
call .\bin\windows\java-petstore-resteasy.bat
|
||||
call .\bin\windows\java-petstore-google-api-client.bat
|
||||
call .\bin\windows\java-petstore-rest-assured.bat
|
||||
call .\bin\windows\java-petstore-vertx.bat
|
||||
10
bin/windows/java-petstore-feign-10x.bat
Normal file
10
bin/windows/java-petstore-feign-10x.bat
Normal file
@@ -0,0 +1,10 @@
|
||||
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
|
||||
|
||||
If Not Exist %executable% (
|
||||
mvn clean package
|
||||
)
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
|
||||
set ags=generate -t modules\openapi-generator\src\main\resources\Java\libraries\feign -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-feign-10x.json -o samples\client\petstore\java\feign10x -DhideGenerationTimestamp=true -DbooleanGetterPrefix=is
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
10
bin/windows/java-petstore-feign.bat
Normal file
10
bin/windows/java-petstore-feign.bat
Normal file
@@ -0,0 +1,10 @@
|
||||
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
|
||||
|
||||
If Not Exist %executable% (
|
||||
mvn clean package
|
||||
)
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
|
||||
set ags=generate -t modules\openapi-generator\src\main\resources\Java\libraries\feign -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-feign-9x.json -o samples\client\petstore\java\feign -DhideGenerationTimestamp=true -DbooleanGetterPrefix=is
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
10
bin/windows/java-petstore-google-api-client.bat
Normal file
10
bin/windows/java-petstore-google-api-client.bat
Normal file
@@ -0,0 +1,10 @@
|
||||
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
|
||||
|
||||
If Not Exist %executable% (
|
||||
mvn clean package
|
||||
)
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
|
||||
set ags=generate -t modules\openapi-generator\src\main\resources\Java\libraries\google-api-client -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-google-api-client.json -o samples\client\petstore\java\google-api-client -DhideGenerationTimestamp=true
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
10
bin/windows/java-petstore-jersey1.bat
Normal file
10
bin/windows/java-petstore-jersey1.bat
Normal file
@@ -0,0 +1,10 @@
|
||||
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
|
||||
|
||||
If Not Exist %executable% (
|
||||
mvn clean package
|
||||
)
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
|
||||
set ags=generate --artifact-id petstore-java-client-jersey1 -t modules\openapi-generator\src\main\resources\Java -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -o samples\client\petstore\java\jersey1 -DhideGenerationTimestamp=true --library=jersey1 --additional-properties useNullForUnknownEnumValue=true
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
10
bin/windows/java-petstore-jersey2-java6.bat
Normal file
10
bin/windows/java-petstore-jersey2-java6.bat
Normal file
@@ -0,0 +1,10 @@
|
||||
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
|
||||
|
||||
If Not Exist %executable% (
|
||||
mvn clean package
|
||||
)
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
|
||||
set ags=generate --artifact-id petstore-jersey2-java6 -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-jersey2.json -o samples\client\petstore\java\jersey2-java6 -DhideGenerationTimestamp=true,supportJava6=true,booleanGetterPrefix=is
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
2
bin/windows/java-petstore.bat → bin/windows/java-petstore-jersey2.bat
Executable file → Normal file
2
bin/windows/java-petstore.bat → bin/windows/java-petstore-jersey2.bat
Executable file → Normal file
@@ -5,6 +5,6 @@ If Not Exist %executable% (
|
||||
)
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
|
||||
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -o samples\client\petstore\java -DdateLibrary=joda -DhideGenerationTimestamp=true
|
||||
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-jersey2.json -o samples\client\petstore\java\jersey2 -DhideGenerationTimestamp=true
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
10
bin/windows/java-petstore-okhttp-gson-parcelable.bat
Normal file
10
bin/windows/java-petstore-okhttp-gson-parcelable.bat
Normal file
@@ -0,0 +1,10 @@
|
||||
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
|
||||
|
||||
If Not Exist %executable% (
|
||||
mvn clean package
|
||||
)
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
|
||||
set ags=generate --artifact-id petstore-okhttp-gson-parcelableModel -t modules\openapi-generator\src\main\resources\Java\libraries\okhttp-gson -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-okhttp-gson.json -o samples\client\petstore\java\okhttp-gson-parcelableModel -DhideGenerationTimestamp=true,parcelableModel=true
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
10
bin/windows/java-petstore-rest-assured.bat
Normal file
10
bin/windows/java-petstore-rest-assured.bat
Normal file
@@ -0,0 +1,10 @@
|
||||
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
|
||||
|
||||
If Not Exist %executable% (
|
||||
mvn clean package
|
||||
)
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
|
||||
set ags=generate -t modules\openapi-generator\src\main\resources\Java\libraries\rest-assured -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-rest-assured.json -o samples\client\petstore\java\rest-assured -DhideGenerationTimestamp=true --additional-properties booleanGetterPrefix=is
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
10
bin/windows/java-petstore-resttemplate-resteasy.bat
Normal file
10
bin/windows/java-petstore-resttemplate-resteasy.bat
Normal file
@@ -0,0 +1,10 @@
|
||||
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
|
||||
|
||||
If Not Exist %executable% (
|
||||
mvn clean package
|
||||
)
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
|
||||
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-resteasy.json -o samples\client\petstore\java\resteasy -DhideGenerationTimestamp=true
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
10
bin/windows/java-petstore-resttemplate-webclient.bat
Normal file
10
bin/windows/java-petstore-resttemplate-webclient.bat
Normal file
@@ -0,0 +1,10 @@
|
||||
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
|
||||
|
||||
If Not Exist %executable% (
|
||||
mvn clean package
|
||||
)
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
|
||||
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-webclient.json -o samples\client\petstore\java\webclient -DhideGenerationTimestamp=true
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
10
bin/windows/java-petstore-resttemplate-withxml.bat
Normal file
10
bin/windows/java-petstore-resttemplate-withxml.bat
Normal file
@@ -0,0 +1,10 @@
|
||||
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
|
||||
|
||||
If Not Exist %executable% (
|
||||
mvn clean package
|
||||
)
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
|
||||
set ags=generate --artifact-id pestore-resttemplate-withxml -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-resttemplate.json -o samples\client\petstore\java\resttemplate-withXml -DhideGenerationTimestamp=true,withXml=true
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
10
bin/windows/java-petstore-resttemplate.bat
Normal file
10
bin/windows/java-petstore-resttemplate.bat
Normal file
@@ -0,0 +1,10 @@
|
||||
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
|
||||
|
||||
If Not Exist %executable% (
|
||||
mvn clean package
|
||||
)
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
|
||||
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-resttemplate.json -o samples\client\petstore\java\resttemplate -DhideGenerationTimestamp=true
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
10
bin/windows/java-petstore-retrofit.bat
Normal file
10
bin/windows/java-petstore-retrofit.bat
Normal file
@@ -0,0 +1,10 @@
|
||||
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
|
||||
|
||||
If Not Exist %executable% (
|
||||
mvn clean package
|
||||
)
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
|
||||
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-retrofit.json -o samples\client\petstore\java\retrofit -DhideGenerationTimestamp=true,dateLibrary=joda
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
6
bin/windows/java-petstore-retrofit2-all.bat
Normal file
6
bin/windows/java-petstore-retrofit2-all.bat
Normal file
@@ -0,0 +1,6 @@
|
||||
call .\bin\windows\java-petstore-retrofit2-play24.bat
|
||||
call .\bin\windows\java-petstore-retrofit2-play25.bat
|
||||
call .\bin\windows\java-petstore-retrofit2-play26.bat
|
||||
call .\bin\windows\java-petstore-retrofit2.bat
|
||||
call .\bin\windows\java-petstore-retrofit2rx.bat
|
||||
call .\bin\windows\java-petstore-retrofit2rx2.bat
|
||||
10
bin/windows/java-petstore-retrofit2-play24.bat
Normal file
10
bin/windows/java-petstore-retrofit2-play24.bat
Normal file
@@ -0,0 +1,10 @@
|
||||
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
|
||||
|
||||
If Not Exist %executable% (
|
||||
mvn clean package
|
||||
)
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
|
||||
set ags=generate --artifact-id petstore-java-client-retrofit2-play24 -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-retrofit2-play24.json -o samples\client\petstore\java\retrofit2-play24 -DhideGenerationTimestamp=true
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
10
bin/windows/java-petstore-retrofit2-play25.bat
Normal file
10
bin/windows/java-petstore-retrofit2-play25.bat
Normal file
@@ -0,0 +1,10 @@
|
||||
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
|
||||
|
||||
If Not Exist %executable% (
|
||||
mvn clean package
|
||||
)
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
|
||||
set ags=generate --artifact-id petstore-java-client-retrofit2-play25 -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-retrofit2-play25.json -o samples\client\petstore\java\retrofit2-play25 -DhideGenerationTimestamp=true
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
10
bin/windows/java-petstore-retrofit2-play26.bat
Normal file
10
bin/windows/java-petstore-retrofit2-play26.bat
Normal file
@@ -0,0 +1,10 @@
|
||||
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
|
||||
|
||||
If Not Exist %executable% (
|
||||
mvn clean package
|
||||
)
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
|
||||
set ags=generate --artifact-id petstore-java-client-retrofit2-play26 -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-retrofit2-play26.json -o samples\client\petstore\java\retrofit2-play26 -DhideGenerationTimestamp=true
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
10
bin/windows/java-petstore-retrofit2.bat
Normal file
10
bin/windows/java-petstore-retrofit2.bat
Normal file
@@ -0,0 +1,10 @@
|
||||
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
|
||||
|
||||
If Not Exist %executable% (
|
||||
mvn clean package
|
||||
)
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
|
||||
set ags=generate -t modules\openapi-generator\src\main\resources\Java\libraries\retrofit2 -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-retrofit2.json -o samples\client\petstore\java\retrofit2 -DhideGenerationTimestamp=true
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
10
bin/windows/java-petstore-retrofit2rx.bat
Normal file
10
bin/windows/java-petstore-retrofit2rx.bat
Normal file
@@ -0,0 +1,10 @@
|
||||
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
|
||||
|
||||
If Not Exist %executable% (
|
||||
mvn clean package
|
||||
)
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
|
||||
set ags=generate -t modules\openapi-generator\src\main\resources\Java\libraries\retrofit2 -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-retrofit2rx.json -o samples\client\petstore\java\retrofit2rx -DuseRxJava=true,hideGenerationTimestamp=true
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
10
bin/windows/java-petstore-retrofit2rx2.bat
Normal file
10
bin/windows/java-petstore-retrofit2rx2.bat
Normal file
@@ -0,0 +1,10 @@
|
||||
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
|
||||
|
||||
If Not Exist %executable% (
|
||||
mvn clean package
|
||||
)
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
|
||||
set ags=generate -t modules\openapi-generator\src\main\resources\Java\libraries\retrofit2 -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-retrofit2rx2.json -o samples\client\petstore\java\retrofit2rx2 -DuseRxJava2=true,hideGenerationTimestamp=true
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
10
bin/windows/java-petstore-vertx.bat
Normal file
10
bin/windows/java-petstore-vertx.bat
Normal file
@@ -0,0 +1,10 @@
|
||||
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
|
||||
|
||||
If Not Exist %executable% (
|
||||
mvn clean package
|
||||
)
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
|
||||
set ags=generate -t modules\openapi-generator\src\main\resources\Java\libraries\vertx -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-vertx.json -o samples\client\petstore\java\vertx -DhideGenerationTimestamp=true
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
10
bin/windows/jaxrs-cxf-cdi-petstore-server.bat
Normal file
10
bin/windows/jaxrs-cxf-cdi-petstore-server.bat
Normal file
@@ -0,0 +1,10 @@
|
||||
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
|
||||
|
||||
If Not Exist %executable% (
|
||||
mvn clean package
|
||||
)
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf\log4j.properties
|
||||
set ags=generate -t modules\openapi-generator\src\main\resources\JavaJaxRS\cxf-cdi -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g jaxrs-cxf-cdi -o samples\server\petstore\jaxrs-cxf-cdi -DhideGenerationTimestamp=true %*
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
@@ -5,6 +5,6 @@ If Not Exist %executable% (
|
||||
)
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties
|
||||
set ags=generate --artifact-id "jaxrs-cxf-client-petstore-client" -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g jaxrs-cxf-client -o samples\client\petstore\jaxrs-cxf-client
|
||||
set ags=generate --artifact-id "jaxrs-cxf-client-petstore-client" -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g jaxrs-cxf-client -o samples\client\petstore\jaxrs-cxf-client %*
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
|
||||
|
||||
If Not Exist %executable% (
|
||||
mvn clean package
|
||||
)
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties
|
||||
set ags=generate --artifact-id cxf-annotated-basepath -t modules\openapi-generator\src\main\resources\JavaJaxRS\cxf -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g jaxrs-cxf -o samples\server\petstore\jaxrs-cxf-annotated-base-path -DhideGenerationTimestamp=true,useAnnotatedBasePath=true --additional-properties serverPort=8082 %*
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
@@ -0,0 +1,10 @@
|
||||
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
|
||||
|
||||
If Not Exist %executable% (
|
||||
mvn clean package
|
||||
)
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties
|
||||
set ags=generate --artifact-id cxf-server-non-spring -t modules\openapi-generator\src\main\resources\JavaJaxRS\cxf -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g jaxrs-cxf -o samples\server\petstore\jaxrs-cxf-non-spring-app -DhideGenerationTimestamp=true,generateNonSpringApplication=true --additional-properties serverPort=8082 %*
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
10
bin/windows/jaxrs-cxf-petstore-server-test-data.bat
Normal file
10
bin/windows/jaxrs-cxf-petstore-server-test-data.bat
Normal file
@@ -0,0 +1,10 @@
|
||||
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
|
||||
|
||||
If Not Exist %executable% (
|
||||
mvn clean package
|
||||
)
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties
|
||||
set ags=generate --artifact-id cxf-test-data -t modules\openapi-generator\src\main\resources\JavaJaxRS\cxf-ext -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-cxf-extended -o samples\server\petstore\jaxrs-cxf-test-data -DhideGenerationTimestamp=true -DuseAnnotatedBasePath=true --generate-alias-as-model --additional-properties java8=true,generateSpringApplication=true,generateSpringBootApplication=true,generateOperationBody=true,loadTestDataFromFile=true %*
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
@@ -5,6 +5,6 @@ If Not Exist %executable% (
|
||||
)
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties
|
||||
set ags=generate -t modules\openapi-generator\src\main\resources\JavaJaxRS\cxf -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-cxf -o samples\server\petstore\jaxrs-cxf -DhideGenerationTimestamp=true
|
||||
set ags=generate -t modules\openapi-generator\src\main\resources\JavaJaxRS\cxf -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-cxf -o samples\server\petstore\jaxrs-cxf -DhideGenerationTimestamp=true %*
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
|
||||
@@ -5,6 +5,6 @@ If Not Exist %executable% (
|
||||
)
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
|
||||
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g php -o samples\client\petstore\php\OpenAPIClient-php
|
||||
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g php -o samples\client\petstore\php\OpenAPIClient-php
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
|
||||
@@ -5,6 +5,6 @@ If Not Exist %executable% (
|
||||
)
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
|
||||
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g scala-httpclient -o samples\client\petstore\scala-httpclient
|
||||
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g scala-httpclient-deprecated -o samples\client\petstore\scala-httpclient
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
@ECHO OFF
|
||||
|
||||
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
|
||||
|
||||
If Not Exist %executable% (
|
||||
mvn clean package
|
||||
)
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
|
||||
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-axios -c bin\typescript-axios-petstore-with-npm-version-and-separate-models-and-api.json -o samples\client\petstore\typescript-axios\builds\with-npm-version-and-separate-models-and-api
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
||||
@@ -83,6 +83,9 @@ jobs:
|
||||
- ~/.gradle
|
||||
- ~/.cache/bower
|
||||
- ".git"
|
||||
- ~/.stack
|
||||
- /home/circleci/OpenAPITools/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work
|
||||
- ~/R
|
||||
# Teardown
|
||||
# If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each
|
||||
# Save test results
|
||||
|
||||
@@ -87,7 +87,7 @@ For [Vendor Extensions](https://github.com/OAI/OpenAPI-Specification/blob/master
|
||||
To add test cases (optional) covering the change in the code generator, please refer to [modules/openapi-generator/src/test/java/org/openapitools/codegen](https://github.com/openapitools/openapi-generator/tree/master/modules/openapi-generator/src/test/java/org/openapitools/codegen)
|
||||
|
||||
To test the templates, please perform the following:
|
||||
- Update the Petstore sample by running the shell script under `bin` folder. For example, run `./bin/ruby-petstore.sh` to update the Ruby PetStore API client under [`samples/client/petstore/ruby`](https://github.com/openapitools/openapi-generator/tree/master/samples/client/petstore/ruby) For Windows, the batch files can be found under `bin\windows` folder. (If you find that there are new files generated or unexpected changes as a result of the update, that's not unusual as the test cases are added to the OpenAPI spec from time to time. If you've questions or concerns, please open a ticket to start a discussion)
|
||||
- Update the Petstore sample by running the shell script under `bin` folder. For example, run `./bin/ruby-client-petstore.sh` to update the Ruby PetStore API client under [`samples/client/petstore/ruby`](https://github.com/openapitools/openapi-generator/tree/master/samples/client/petstore/ruby) For Windows, the batch files can be found under `bin\windows` folder. (If you find that there are new files generated or unexpected changes as a result of the update, that's not unusual as the test cases are added to the OpenAPI spec from time to time. If you've questions or concerns, please open a ticket to start a discussion)
|
||||
- Run the tests in the sample folder, e.g. in `samples/client/petstore/ruby`, run `mvn integration-test -rf :RubyPetstoreClientTests`. (some languages may not contain unit testing for Petstore and we're looking for contribution from the community to implement those tests)
|
||||
- Finally, git commit the updated samples files: `git commit -a`
|
||||
(`git add -A` if added files with new test cases)
|
||||
|
||||
@@ -217,9 +217,13 @@ and `config.json` contains the following as an example:
|
||||
"apiPackage" : "petstore"
|
||||
}
|
||||
```
|
||||
You can use also `config.yml` with following equivalent example:
|
||||
```yaml
|
||||
apiPackage: "petstore"
|
||||
```
|
||||
|
||||
Supported config options can be different per language. Running `config-help -g {lang}` will show available options.
|
||||
**These options are applied via configuration file (e.g. config.json) or by passing them with `-D{optionName}={optionValue}`**. (If `-D{optionName}` does not work, please open a [ticket](https://github.com/openapitools/openapi-generator/issues/new) and we'll look into it)
|
||||
**These options are applied via configuration file (e.g. config.json or config.yml) or by passing them with `-D{optionName}={optionValue}`**. (If `-D{optionName}` does not work, please open a [ticket](https://github.com/openapitools/openapi-generator/issues/new) and we'll look into it)
|
||||
|
||||
```sh
|
||||
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar config-help -g java
|
||||
@@ -258,6 +262,15 @@ Your config file for Java can look like
|
||||
}
|
||||
```
|
||||
|
||||
Or if you preffer yaml format it can look like
|
||||
|
||||
```yaml
|
||||
groupId: "com.my.company"
|
||||
artifactId: "MyClient"
|
||||
artifactVersion: "1.2.0"
|
||||
library: "feign"
|
||||
```
|
||||
|
||||
For all the unspecified options default values will be used.
|
||||
|
||||
Another way to override default options is to extend the config class for the specific language.
|
||||
|
||||
@@ -17,7 +17,7 @@ The following generators are available:
|
||||
- [cpp-tizen](generators/cpp-tizen.md)
|
||||
- [csharp](generators/csharp.md)
|
||||
- [csharp-dotnet2](generators/csharp-dotnet2.md)
|
||||
- [csharp-refactor](generators/csharp-refactor.md)
|
||||
- [csharp-netcore](generators/csharp-netcore.md)
|
||||
- [dart](generators/dart.md)
|
||||
- [dart-jaguar](generators/dart-jaguar.md)
|
||||
- [eiffel](generators/eiffel.md)
|
||||
@@ -47,7 +47,7 @@ The following generators are available:
|
||||
- [rust](generators/rust.md)
|
||||
- [scala-akka](generators/scala-akka.md)
|
||||
- [scala-gatling](generators/scala-gatling.md)
|
||||
- [scala-httpclient](generators/scala-httpclient.md)
|
||||
- [scala-httpclient-deprecated](generators/scala-httpclient-deprecated.md)
|
||||
- [scalaz](generators/scalaz.md)
|
||||
- [swift2-deprecated](generators/swift2-deprecated.md)
|
||||
- [swift3-deprecated](generators/swift3-deprecated.md)
|
||||
@@ -83,6 +83,7 @@ The following generators are available:
|
||||
- [java-vertx](generators/java-vertx.md)
|
||||
- [jaxrs-cxf](generators/jaxrs-cxf.md)
|
||||
- [jaxrs-cxf-cdi](generators/jaxrs-cxf-cdi.md)
|
||||
- [jaxrs-cxf-extended](generators/jaxrs-cxf-extended.md)
|
||||
- [jaxrs-jersey](generators/jaxrs-jersey.md)
|
||||
- [jaxrs-resteasy](generators/jaxrs-resteasy.md)
|
||||
- [jaxrs-resteasy-eap](generators/jaxrs-resteasy-eap.md)
|
||||
@@ -97,6 +98,7 @@ The following generators are available:
|
||||
- [php-symfony](generators/php-symfony.md)
|
||||
- [php-ze-ph](generators/php-ze-ph.md)
|
||||
- [python-aiohttp](generators/python-aiohttp.md)
|
||||
- [python-blueplanet](generators/python-blueplanet.md)
|
||||
- [python-flask](generators/python-flask.md)
|
||||
- [ruby-on-rails](generators/ruby-on-rails.md)
|
||||
- [ruby-sinatra](generators/ruby-sinatra.md)
|
||||
|
||||
@@ -7,6 +7,11 @@ sidebar_label: aspnetcore
|
||||
|
||||
| Option | Description | Values | Default |
|
||||
| ------ | ----------- | ------ | ------- |
|
||||
|licenseUrl|The URL of the license| |http://localhost|
|
||||
|licenseName|The name of the license| |NoLicense|
|
||||
|packageCopyright|Specifies an AssemblyCopyright for the .NET Framework global assembly attributes stored in the AssemblyInfo file.| |No Copyright|
|
||||
|packageAuthors|Specifies Authors property in the .NET Core project file.| |OpenAPI|
|
||||
|packageTitle|Specifies an AssemblyTitle for the .NET Framework global assembly attributes stored in the AssemblyInfo file.| |OpenAPI Library|
|
||||
|packageName|C# package name (convention: Title.Case).| |Org.OpenAPITools|
|
||||
|packageVersion|C# package version.| |1.0.0|
|
||||
|packageGuid|The GUID that will be associated with the C# project| |null|
|
||||
@@ -17,3 +22,7 @@ sidebar_label: aspnetcore
|
||||
|useCollection|Deserialize array types to Collection<T> instead of List<T>.| |false|
|
||||
|returnICollection|Return ICollection<T> instead of the concrete type.| |false|
|
||||
|useSwashbuckle|Uses the Swashbuckle.AspNetCore NuGet package for documentation.| |true|
|
||||
|classModifier|Class modifiers such as abstract or partial| ||
|
||||
|operationModifier|Operation modifiers such as virtual or abstract.| |virtual|
|
||||
|generateBody|Generates method body.| |true|
|
||||
|buildTarget|Target the build for a program or library.| |program|
|
||||
|
||||
29
docs/generators/csharp-netcore.md
Normal file
29
docs/generators/csharp-netcore.md
Normal file
@@ -0,0 +1,29 @@
|
||||
|
||||
---
|
||||
id: generator-opts-client-csharp-netcore
|
||||
title: Config Options for csharp-netcore
|
||||
sidebar_label: csharp-netcore
|
||||
---
|
||||
|
||||
| Option | Description | Values | Default |
|
||||
| ------ | ----------- | ------ | ------- |
|
||||
|packageName|C# package name (convention: Title.Case).| |Org.OpenAPITools|
|
||||
|packageVersion|C# package version.| |1.0.0|
|
||||
|sourceFolder|source folder for generated code| |src|
|
||||
|packageGuid|The GUID that will be associated with the C# project| |null|
|
||||
|interfacePrefix|Prefix interfaces with a community standard or widely accepted prefix.| |I|
|
||||
|targetFramework|The target .NET framework version.|<dl><dt>**netstandard1.3**</dt><dd>.NET Standard 1.3 compatible</dd><dt>**netstandard1.4**</dt><dd>.NET Standard 1.4 compatible</dd><dt>**netstandard1.5**</dt><dd>.NET Standard 1.5 compatible</dd><dt>**netstandard1.6**</dt><dd>.NET Standard 1.6 compatible</dd><dt>**netstandard2.0**</dt><dd>.NET Standard 2.0 compatible</dd><dt>**netcoreapp2.0**</dt><dd>.NET Core 2.0 compatible</dd><dl>|v4.6.1|
|
||||
|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |PascalCase|
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
|
||||
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
|
||||
|useDateTimeOffset|Use DateTimeOffset to model date-time properties| |false|
|
||||
|useCollection|Deserialize array types to Collection<T> instead of List<T>.| |false|
|
||||
|returnICollection|Return ICollection<T> instead of the concrete type.| |false|
|
||||
|optionalMethodArgument|C# Optional method argument, e.g. void square(int x=10) (.net 4.0+ only).| |true|
|
||||
|optionalAssemblyInfo|Generate AssemblyInfo.cs.| |true|
|
||||
|optionalProjectFile|Generate {PackageName}.csproj.| |true|
|
||||
|optionalEmitDefaultValues|Set DataMember's EmitDefaultValue.| |false|
|
||||
|nonPublicApi|Generates code with reduced access modifiers; allows embedding elsewhere without exposing non-public API calls to consumers.| |false|
|
||||
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|
||||
|netCoreProjectFile|Use the new format (.NET Core) for .NET project files (.csproj).| |false|
|
||||
|validatable|Generates self-validatable models.| |true|
|
||||
@@ -12,7 +12,7 @@ sidebar_label: csharp-refactor
|
||||
|sourceFolder|source folder for generated code| |src|
|
||||
|packageGuid|The GUID that will be associated with the C# project| |null|
|
||||
|interfacePrefix|Prefix interfaces with a community standard or widely accepted prefix.| |I|
|
||||
|targetFramework|The target .NET framework version.|<dl><dt>**v3.5**</dt><dd>.NET Framework 3.5 compatible</dd><dt>**v4.0**</dt><dd>.NET Framework 4.0 compatible</dd><dt>**v4.5.2**</dt><dd>.NET Framework 4.5.2+ compatible</dd><dt>**v5.0**</dt><dd>.NET Standard 1.3 compatible</dd><dt>**uwp**</dt><dd>Universal Windows Platform (IMPORTANT: this will be decommissioned and replaced by v5.0)</dd><dl>|v4.5.2|
|
||||
|targetFramework|The target .NET framework version.|<dl><dt>**netstandard1.3**</dt><dd>.NET Standard 1.3 compatible</dd><dt>**netstandard1.4**</dt><dd>.NET Standard 1.4 compatible</dd><dt>**netstandard1.5**</dt><dd>.NET Standard 1.5 compatible</dd><dt>**netstandard1.6**</dt><dd>.NET Standard 1.6 compatible</dd><dt>**netstandard2.0**</dt><dd>.NET Standard 2.0 compatible</dd><dt>**netcoreapp2.0**</dt><dd>.NET Core 2.0 compatible</dd><dl>|v4.6.1|
|
||||
|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |PascalCase|
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
|
||||
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
|
||||
@@ -23,7 +23,6 @@ sidebar_label: csharp-refactor
|
||||
|optionalAssemblyInfo|Generate AssemblyInfo.cs.| |true|
|
||||
|optionalProjectFile|Generate {PackageName}.csproj.| |true|
|
||||
|optionalEmitDefaultValues|Set DataMember's EmitDefaultValue.| |false|
|
||||
|generatePropertyChanged|Specifies a AssemblyDescription for the .NET Framework global assembly attributes stored in the AssemblyInfo file.| |false|
|
||||
|nonPublicApi|Generates code with reduced access modifiers; allows embedding elsewhere without exposing non-public API calls to consumers.| |false|
|
||||
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|
||||
|netCoreProjectFile|Use the new format (.NET Core) for .NET project files (.csproj).| |false|
|
||||
|
||||
@@ -29,7 +29,6 @@ sidebar_label: groovy
|
||||
|licenseName|The name of the license| |null|
|
||||
|licenseUrl|The URL of the license| |null|
|
||||
|sourceFolder|source folder for generated code| |null|
|
||||
|localVariablePrefix|prefix for generated code members and local variables| |null|
|
||||
|serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|
||||
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
|
||||
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
|
||||
@@ -42,4 +41,5 @@ sidebar_label: groovy
|
||||
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|snapshotVersion|Uses a SNAPSHOT version.| |null|
|
||||
|configPackage|configuration package for generated code| |null|
|
||||
|
||||
@@ -26,7 +26,8 @@ sidebar_label: haskell-http-client
|
||||
|inlineMimeTypes|Inline (hardcode) the content-type and accept parameters on operations, when there is only 1 option| |true|
|
||||
|modelDeriving|Additional classes to include in the deriving() clause of Models| |null|
|
||||
|strictFields|Add strictness annotations to all model fields| |true|
|
||||
|useMonadLogger|Use the monad-logger package to provide logging (if false, use the katip logging package)| |false|
|
||||
|useKatip|Sets the default value for the UseKatip cabal flag. If true, the katip package provides logging instead of monad-logger| |true|
|
||||
|dateTimeFormat|format string used to parse/render a datetime| |null|
|
||||
|dateFormat|format string used to parse/render a date| |%Y-%m-%d|
|
||||
|customTestInstanceModule|test module used to provide typeclass instances for types not known by the generator| |null|
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
|
||||
|
||||
@@ -29,7 +29,6 @@ sidebar_label: java-inflector
|
||||
|licenseName|The name of the license| |null|
|
||||
|licenseUrl|The URL of the license| |null|
|
||||
|sourceFolder|source folder for generated code| |null|
|
||||
|localVariablePrefix|prefix for generated code members and local variables| |null|
|
||||
|serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|
||||
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
|
||||
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
|
||||
@@ -42,3 +41,4 @@ sidebar_label: java-inflector
|
||||
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|snapshotVersion|Uses a SNAPSHOT version.| |null|
|
||||
|
||||
@@ -29,7 +29,6 @@ sidebar_label: java-msf4j
|
||||
|licenseName|The name of the license| |null|
|
||||
|licenseUrl|The URL of the license| |null|
|
||||
|sourceFolder|source folder for generated code| |null|
|
||||
|localVariablePrefix|prefix for generated code members and local variables| |null|
|
||||
|serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|
||||
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
|
||||
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
|
||||
@@ -42,6 +41,7 @@ sidebar_label: java-msf4j
|
||||
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|snapshotVersion|Uses a SNAPSHOT version.| |null|
|
||||
|implFolder|folder for generated implementation code| |null|
|
||||
|title|a title describing the application| |null|
|
||||
|useBeanValidation|Use BeanValidation API annotations| |true|
|
||||
|
||||
@@ -29,7 +29,6 @@ sidebar_label: java-pkmst
|
||||
|licenseName|The name of the license| |null|
|
||||
|licenseUrl|The URL of the license| |null|
|
||||
|sourceFolder|source folder for generated code| |null|
|
||||
|localVariablePrefix|prefix for generated code members and local variables| |null|
|
||||
|serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|
||||
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
|
||||
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
|
||||
@@ -42,6 +41,7 @@ sidebar_label: java-pkmst
|
||||
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|snapshotVersion|Uses a SNAPSHOT version.| |null|
|
||||
|groupId|groupId in generated pom.xml| |null|
|
||||
|artifactId|artifactId in generated pom.xml| |null|
|
||||
|artifactVersion|artifact version in generated pom.xml| |null|
|
||||
|
||||
@@ -29,7 +29,6 @@ sidebar_label: java-play-framework
|
||||
|licenseName|The name of the license| |null|
|
||||
|licenseUrl|The URL of the license| |null|
|
||||
|sourceFolder|source folder for generated code| |null|
|
||||
|localVariablePrefix|prefix for generated code members and local variables| |null|
|
||||
|serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|
||||
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
|
||||
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
|
||||
@@ -42,6 +41,7 @@ sidebar_label: java-play-framework
|
||||
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|snapshotVersion|Uses a SNAPSHOT version.| |null|
|
||||
|title|server title name or client service name| |null|
|
||||
|configPackage|configuration package for generated code| |null|
|
||||
|basePackage|base package for generated code| |null|
|
||||
|
||||
@@ -29,7 +29,6 @@ sidebar_label: java-undertow-server
|
||||
|licenseName|The name of the license| |null|
|
||||
|licenseUrl|The URL of the license| |null|
|
||||
|sourceFolder|source folder for generated code| |null|
|
||||
|localVariablePrefix|prefix for generated code members and local variables| |null|
|
||||
|serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|
||||
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
|
||||
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
|
||||
@@ -42,3 +41,4 @@ sidebar_label: java-undertow-server
|
||||
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|snapshotVersion|Uses a SNAPSHOT version.| |null|
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user