mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-06 05:26:19 +00:00
Compare commits
1227 Commits
v3.0.0
...
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 | ||
|
|
6a414af13f | ||
|
|
453eeb9e40 | ||
|
|
6801741592 | ||
|
|
cbda3fad98 | ||
|
|
f946492e7e | ||
|
|
562442764a | ||
|
|
2eb99f602a | ||
|
|
77d2de4e3d | ||
|
|
c871e3bc81 | ||
|
|
02a8dad77c | ||
|
|
bcfa86d401 | ||
|
|
83d34bd8d7 | ||
|
|
046db19a85 | ||
|
|
6f16b45976 | ||
|
|
7811390b7b | ||
|
|
887b688014 | ||
|
|
9029103c94 | ||
|
|
c438f67b66 | ||
|
|
4f8164e713 | ||
|
|
706192980c | ||
|
|
860b91e45e | ||
|
|
1a07bd6573 | ||
|
|
9ec594eec5 | ||
|
|
65d9e859be | ||
|
|
bc6997f0e5 | ||
|
|
827e68ca1c | ||
|
|
33b7547da3 | ||
|
|
69323aec48 | ||
|
|
3757ffe0ba | ||
|
|
3ea6cf356f | ||
|
|
af634c77c4 | ||
|
|
e48a8fea1d | ||
|
|
47e262fbb1 | ||
|
|
4ca7158aa2 | ||
|
|
dce5ed229f | ||
|
|
e0de5d6135 | ||
|
|
4c5231ea7a | ||
|
|
2fa0e810bf | ||
|
|
ab840ff000 | ||
|
|
eeb3d7765b | ||
|
|
2220a2ca85 | ||
|
|
d33c4bb4a3 | ||
|
|
956512a9bf | ||
|
|
b2bebe914e | ||
|
|
b27d99088c | ||
|
|
38ea7952bb | ||
|
|
95a1ff1ab1 | ||
|
|
f415332406 | ||
|
|
06824622bf | ||
|
|
c16354218a | ||
|
|
c51f333f6c | ||
|
|
6fe9a52229 | ||
|
|
9cba9b6f88 | ||
|
|
4df8c3cf64 | ||
|
|
17218117b9 | ||
|
|
f4133e726d | ||
|
|
7437084cd3 | ||
|
|
60323bf186 | ||
|
|
eee4849a5e | ||
|
|
60ca0fb338 | ||
|
|
1676aefa8b | ||
|
|
192e366bff | ||
|
|
832b4ef512 | ||
|
|
4117b2ebb1 | ||
|
|
e0137f670c | ||
|
|
f5d6aaebb2 | ||
|
|
df8137cf21 | ||
|
|
22ce88eb26 | ||
|
|
dec852ca9f | ||
|
|
03711d572f | ||
|
|
963c002830 | ||
|
|
2162d34ed7 | ||
|
|
db9102a440 | ||
|
|
d2769e646e | ||
|
|
b4fecd9f9e | ||
|
|
7674d11d75 | ||
|
|
1be9d66911 | ||
|
|
28c9b11195 | ||
|
|
470fc2065d | ||
|
|
4235390175 | ||
|
|
80ca67cfda | ||
|
|
4652023b7c | ||
|
|
00a9cfdbc9 | ||
|
|
4fa926604f | ||
|
|
8305df6b4a | ||
|
|
faf1f5d81d | ||
|
|
d584833781 | ||
|
|
992ca3e8ed | ||
|
|
12a5ba2bee | ||
|
|
814a697c81 | ||
|
|
3b7f4c3879 | ||
|
|
b87a507a13 | ||
|
|
87d5484f2e | ||
|
|
581bac83e9 | ||
|
|
8539831126 | ||
|
|
539ec23298 | ||
|
|
189849319c | ||
|
|
60dd3d51be | ||
|
|
4c14c85542 | ||
|
|
9331df791f | ||
|
|
9ccf872290 | ||
|
|
293066bb0d | ||
|
|
fbf570e7bd | ||
|
|
ed5bd5ffb0 | ||
|
|
233ce093e5 | ||
|
|
b7971e2e3d | ||
|
|
1ef56b44c2 | ||
|
|
22a3f7ee0e | ||
|
|
6e4556772c | ||
|
|
549197cce5 | ||
|
|
60776b8cb5 | ||
|
|
eff0c5e8d0 | ||
|
|
1189362466 | ||
|
|
f0f214743e | ||
|
|
651395d426 | ||
|
|
fda35ea263 | ||
|
|
c65ef987af | ||
|
|
b015ac9307 | ||
|
|
bdf32775fb | ||
|
|
1a2deb016b | ||
|
|
b25eeebf03 | ||
|
|
8f561f1ef3 | ||
|
|
b931da2909 | ||
|
|
fa9bd1f567 | ||
|
|
d35f4b08d9 | ||
|
|
be262384cd | ||
|
|
5729ce176c | ||
|
|
3d59d8b58f | ||
|
|
59db7cc568 | ||
|
|
ad5184efc1 | ||
|
|
92db181d97 | ||
|
|
8fd474d4a7 | ||
|
|
af6757ccde | ||
|
|
9334dd391a | ||
|
|
d6fa9e60c6 | ||
|
|
6abb9ddf30 | ||
|
|
e559474880 | ||
|
|
354db2f3e6 | ||
|
|
f96e64bd9e | ||
|
|
3ec90a86cb | ||
|
|
2f6381cb19 | ||
|
|
5730f6224a | ||
|
|
0fca90133c | ||
|
|
2c051f265c | ||
|
|
e8ac630ca5 | ||
|
|
a0e5b74b2b | ||
|
|
321416e960 | ||
|
|
2e727f6dc7 | ||
|
|
7cee999543 | ||
|
|
77b5cea518 | ||
|
|
6a4f3385d8 | ||
|
|
e821a58fd1 | ||
|
|
5400a7e445 | ||
|
|
1db105b6f9 | ||
|
|
06a67ce6e4 | ||
|
|
5952bec6bf | ||
|
|
5f2d79b669 | ||
|
|
177deb918a | ||
|
|
5d98fc6beb | ||
|
|
292d987f15 | ||
|
|
c2273a651a | ||
|
|
902a4b4099 | ||
|
|
c13e089c85 | ||
|
|
c62a1f11ee | ||
|
|
aa1cfd81fe | ||
|
|
e4f80dcc0e | ||
|
|
120c0a05f0 | ||
|
|
7595baef00 | ||
|
|
0dee995ebb | ||
|
|
aed2c882da | ||
|
|
92badd8d49 | ||
|
|
72dcee9d86 | ||
|
|
f1831533d4 | ||
|
|
05107032d1 | ||
|
|
2ccfdc8e5d | ||
|
|
13f5064ea4 | ||
|
|
667275fb25 | ||
|
|
a7dfc650b6 | ||
|
|
43abd61144 | ||
|
|
2a11f55267 | ||
|
|
77edec0c65 | ||
|
|
9e1cce2e7b | ||
|
|
77270a0118 | ||
|
|
4a494b45d3 | ||
|
|
10ecc0e52f | ||
|
|
89a0ffa66c | ||
|
|
d38b9e588b | ||
|
|
b6e80e86b2 | ||
|
|
f188fa08e5 | ||
|
|
93c13074ff | ||
|
|
9ff8a24895 | ||
|
|
98ae7a816c | ||
|
|
2025d128b3 | ||
|
|
81cf611aa4 | ||
|
|
d7d994620c | ||
|
|
b6a23986b3 | ||
|
|
33fbd9c78b | ||
|
|
3896821d5e | ||
|
|
fb15a4baf3 | ||
|
|
c05dc24e6a | ||
|
|
06150767f4 | ||
|
|
7609398150 | ||
|
|
82fcde1d91 | ||
|
|
cacce1f707 | ||
|
|
8c599ebf12 | ||
|
|
587bd56655 | ||
|
|
1f95b54cef | ||
|
|
95c744381b | ||
|
|
0b029088f4 | ||
|
|
66cff2b05a | ||
|
|
489c404783 | ||
|
|
a27224e50d | ||
|
|
98aa5f8db2 | ||
|
|
87bc9d436f | ||
|
|
5b91d40a8a | ||
|
|
f19794464b | ||
|
|
7e3e9dba11 | ||
|
|
c4f0521e10 | ||
|
|
2d39f14882 | ||
|
|
2f4bea6967 | ||
|
|
b84ec60306 | ||
|
|
2a4fe5bc0e | ||
|
|
922532da6a | ||
|
|
774013c7e1 | ||
|
|
c0634ac213 | ||
|
|
92d60b684a | ||
|
|
d40cbf9dbd | ||
|
|
d57009d14d | ||
|
|
ced6e0502e | ||
|
|
314b4cc54f | ||
|
|
21b2b20c2d | ||
|
|
1e023f3b6e | ||
|
|
df19c13347 | ||
|
|
32d228c33a | ||
|
|
fcd37a6006 | ||
|
|
4be605bcb7 | ||
|
|
01ac429954 | ||
|
|
10ea00066a | ||
|
|
4930f75dc7 | ||
|
|
8795bff35e | ||
|
|
6976a8c775 | ||
|
|
110d057384 | ||
|
|
d75392e056 | ||
|
|
e84c59f4cc | ||
|
|
0a33ad465f | ||
|
|
8ee1553654 | ||
|
|
001f89f1d9 | ||
|
|
cd61442387 | ||
|
|
e3ab059530 | ||
|
|
dfa7e616c0 | ||
|
|
2353d71d4b | ||
|
|
2f4dc9a049 | ||
|
|
54b5093381 | ||
|
|
cf2ddb8b8c | ||
|
|
8f8d3547f6 | ||
|
|
b226f52d13 | ||
|
|
eae958f293 | ||
|
|
308515bbc1 | ||
|
|
6930433def | ||
|
|
c537557a91 | ||
|
|
f7c857cc39 | ||
|
|
777bf1f3aa | ||
|
|
41185d3c6f | ||
|
|
1d4e24b203 | ||
|
|
c63f58f1ef | ||
|
|
9df70798b3 | ||
|
|
3efe56752e | ||
|
|
d8dde6855f | ||
|
|
ebf67e683c | ||
|
|
5b4a19849e | ||
|
|
9b99b6b6bf | ||
|
|
33016f2790 | ||
|
|
963173b357 | ||
|
|
d31fa4f7c4 | ||
|
|
247bd68880 | ||
|
|
4eae430cca | ||
|
|
51a3a22928 | ||
|
|
172448fa28 | ||
|
|
46a4ffe64c | ||
|
|
ce0253892c | ||
|
|
34abedeb8a | ||
|
|
2146081ffb | ||
|
|
7db12aa4af | ||
|
|
bf2932d41c | ||
|
|
f8ada391c4 | ||
|
|
0ba9278308 | ||
|
|
e91d6d735d | ||
|
|
5f1362daad | ||
|
|
dd33434064 | ||
|
|
cf04ba30db | ||
|
|
5aa1da7c2e | ||
|
|
9be5b99266 | ||
|
|
792f95eb09 | ||
|
|
2b58f6737a | ||
|
|
363b095721 | ||
|
|
b9949e1a8e | ||
|
|
f58bd6d839 | ||
|
|
0e693cd9a8 | ||
|
|
65a86eee3b | ||
|
|
334415dec2 | ||
|
|
7f8ff35245 | ||
|
|
2c418e1b71 | ||
|
|
941b3ea015 | ||
|
|
c656194f22 | ||
|
|
5b57eae5de | ||
|
|
edc05df774 | ||
|
|
6ab6896a13 | ||
|
|
32b8d7fee7 | ||
|
|
dc3a3dd15a | ||
|
|
736e8348b6 | ||
|
|
2bcf5b2263 | ||
|
|
a87a544bf5 | ||
|
|
8d9542207a | ||
|
|
31d9928734 | ||
|
|
e5c0d227ab | ||
|
|
653601bef2 | ||
|
|
7564d629e7 | ||
|
|
f647b2f24b | ||
|
|
0165b0fb33 | ||
|
|
df1819daa9 | ||
|
|
3c28946f1e | ||
|
|
22902e72a1 | ||
|
|
efde4a8eb8 | ||
|
|
c8837ea414 | ||
|
|
7c3a2a5c07 | ||
|
|
7e3149e675 | ||
|
|
9db62f459a | ||
|
|
c7349c7f88 | ||
|
|
69a766882d | ||
|
|
7ce38aae38 | ||
|
|
fd46b4e566 | ||
|
|
5711985ac3 | ||
|
|
7c6beb9692 | ||
|
|
8ba4b3a276 | ||
|
|
f802e63f9f | ||
|
|
0ed02c8e91 | ||
|
|
93e2fc6355 | ||
|
|
60bc19e830 | ||
|
|
d59230fd27 | ||
|
|
4742f0086b | ||
|
|
1522855915 | ||
|
|
75b1403c1e | ||
|
|
a023a0d0ca | ||
|
|
e6c97a1bc1 | ||
|
|
a186efed35 | ||
|
|
3969afb2ff | ||
|
|
2ef499faf3 | ||
|
|
34945427d4 | ||
|
|
5849dbaaca | ||
|
|
73162cbcca | ||
|
|
0e2e1bf715 | ||
|
|
f21640f6a1 | ||
|
|
301208a785 | ||
|
|
4245cf42dd | ||
|
|
2184a8a9b4 | ||
|
|
30bfebfa16 | ||
|
|
303b469fae | ||
|
|
c95b1f4545 | ||
|
|
fbc3ff8766 | ||
|
|
63b1c233c9 | ||
|
|
eb5a8cc752 | ||
|
|
293d29ab3b | ||
|
|
078b04deac | ||
|
|
7eb9cda1e0 | ||
|
|
ac6fd3f79f | ||
|
|
f8f3a08282 | ||
|
|
36991a4e14 | ||
|
|
ecff8b5d00 | ||
|
|
521f5fafa3 | ||
|
|
02e85cc417 | ||
|
|
0cc9b69b6f | ||
|
|
30474c7867 | ||
|
|
d06ddfbcaa | ||
|
|
165c0f2310 | ||
|
|
aced89ff8b | ||
|
|
d80f3a6197 | ||
|
|
107467497c | ||
|
|
d61a14cab9 | ||
|
|
d7d5e712e2 | ||
|
|
fc0a0d2cda | ||
|
|
a6b0a8b4b7 | ||
|
|
0a45890709 | ||
|
|
ceffdde2c0 | ||
|
|
71ecee02e9 | ||
|
|
ed2f6ea72e | ||
|
|
ef98971746 | ||
|
|
3482a0a993 | ||
|
|
6b41260755 | ||
|
|
4a47acce19 | ||
|
|
9422dea149 | ||
|
|
3b53ac435f | ||
|
|
1b115bb4f7 | ||
|
|
30062afc7c | ||
|
|
ed8433a849 | ||
|
|
f4eb96933a | ||
|
|
eb4dfe0fc1 | ||
|
|
bbfaa90242 | ||
|
|
d4a5cd05cc | ||
|
|
196f1228e5 | ||
|
|
24ea88495b | ||
|
|
76aedca6b2 | ||
|
|
3d7a019524 | ||
|
|
b36b4611de | ||
|
|
0aec7728f9 | ||
|
|
258de8909d | ||
|
|
4a0bc8f177 | ||
|
|
1418860c3a | ||
|
|
8455dfe75d | ||
|
|
0001682a08 | ||
|
|
e782001eb9 | ||
|
|
e06665f368 | ||
|
|
bb056ccf3d | ||
|
|
51d2e4bd4c | ||
|
|
111a3626b2 | ||
|
|
8507916d56 | ||
|
|
a55533c178 | ||
|
|
2b88a1d26f | ||
|
|
33a1ac4397 | ||
|
|
f1d4ae230e | ||
|
|
0853b2d31d | ||
|
|
e32b70d579 | ||
|
|
27fd224828 | ||
|
|
0326558f9a | ||
|
|
147e193b31 | ||
|
|
16f1fc0739 | ||
|
|
c1afba7194 | ||
|
|
dcde12ac07 | ||
|
|
eccab2c025 | ||
|
|
40e90b5883 | ||
|
|
a3dc5ecc20 | ||
|
|
649d5a97b4 | ||
|
|
83c55ec016 | ||
|
|
d8957af76b | ||
|
|
ebc2700a92 | ||
|
|
e42cac636a | ||
|
|
cfbc72f444 | ||
|
|
9e3c7781bb | ||
|
|
257a97b6cd | ||
|
|
ffd72767af | ||
|
|
0136aeefbc | ||
|
|
0b6e63b427 | ||
|
|
6817b4348f | ||
|
|
df98126354 | ||
|
|
ded765bcb9 | ||
|
|
12a702ee07 | ||
|
|
fbd4411b22 | ||
|
|
34409bc0d8 | ||
|
|
8909641667 | ||
|
|
9c736731f2 | ||
|
|
71aa421179 | ||
|
|
11b7fb4f7b | ||
|
|
ccf9611ad7 | ||
|
|
dd8dd48a62 | ||
|
|
448680e764 | ||
|
|
32c1d9eea4 | ||
|
|
529a638d11 | ||
|
|
6acf45a108 | ||
|
|
68a8f2976c | ||
|
|
1a61456f71 | ||
|
|
56c4751e74 | ||
|
|
8c0e130481 | ||
|
|
5ac33a49f1 | ||
|
|
22049db8c1 | ||
|
|
7d58f308d9 | ||
|
|
52a112d90f | ||
|
|
e85c527f33 | ||
|
|
999f472e4b | ||
|
|
a1d242595e | ||
|
|
aa31e42ce7 | ||
|
|
b0dfcf29b3 | ||
|
|
9939702f31 | ||
|
|
b4d835f683 | ||
|
|
06d31cfedb | ||
|
|
3e3b03f93b | ||
|
|
55f26d31d3 | ||
|
|
5490bb8e9c | ||
|
|
0f7557ca9d | ||
|
|
1916025a53 | ||
|
|
4e8844273b | ||
|
|
e22c7c1c8a | ||
|
|
2b87b309ad | ||
|
|
dcc0b5e772 | ||
|
|
3a5ec0a69d | ||
|
|
5357791337 | ||
|
|
e4b5f50515 | ||
|
|
755dfe53de | ||
|
|
2040050e55 | ||
|
|
cbc84254c3 | ||
|
|
8b47984e3c | ||
|
|
345b7ec7e5 | ||
|
|
cbddb08468 | ||
|
|
f1f7bdd23f | ||
|
|
3a71e59e00 | ||
|
|
da8cf01dfa | ||
|
|
e0cbf46041 | ||
|
|
8e57e0d44f | ||
|
|
bd71e629a3 | ||
|
|
5aad02ed90 | ||
|
|
70e6e119d1 | ||
|
|
4775c630aa | ||
|
|
cd8bf10b74 | ||
|
|
df61cd9cb3 | ||
|
|
e3b26372cd | ||
|
|
8fb3b707a1 | ||
|
|
14de289fc1 | ||
|
|
abb2690ef5 | ||
|
|
ed1277348d | ||
|
|
bde97b44b9 | ||
|
|
6dc618fa3f | ||
|
|
c0a6eaab85 | ||
|
|
29e9f5bda0 | ||
|
|
cc6efe01c7 | ||
|
|
3cacbcb965 | ||
|
|
0e045bee1b | ||
|
|
1b2f3fbfb6 | ||
|
|
340466066c | ||
|
|
ca9a4a2ff3 | ||
|
|
b7edad5cd0 | ||
|
|
78fae0ea49 | ||
|
|
3027514242 | ||
|
|
24b234bdbb | ||
|
|
9e1dfc0837 | ||
|
|
5c794a01f8 | ||
|
|
27e343ffef | ||
|
|
5fc76ba834 | ||
|
|
b909656418 | ||
|
|
fe0f2cfad6 | ||
|
|
04bbd3b0e6 | ||
|
|
58e43ceeec | ||
|
|
fc35bb17d0 | ||
|
|
48e66ed627 | ||
|
|
c9625f3fd5 | ||
|
|
94eb1c3c63 | ||
|
|
29322da2f6 | ||
|
|
9a19a064af | ||
|
|
95302efdfc | ||
|
|
096ac567ce | ||
|
|
131cf94fe4 | ||
|
|
f29ba97e8b | ||
|
|
59ad12183f | ||
|
|
3d4c3c545b | ||
|
|
3cfcf77c88 | ||
|
|
1ae3403f6d | ||
|
|
2d99836e90 | ||
|
|
6a1e560540 | ||
|
|
f80fa08a01 | ||
|
|
7596fb7119 | ||
|
|
aa29219f8c | ||
|
|
825404a1df | ||
|
|
47b3210cb2 | ||
|
|
1ead8bcca5 | ||
|
|
4a9b0a91aa | ||
|
|
a0f8c5e468 | ||
|
|
abe741f989 | ||
|
|
c5463232d3 | ||
|
|
a8cbae4dc8 | ||
|
|
b9e9f54dab | ||
|
|
5d259952b3 | ||
|
|
e29f263941 | ||
|
|
39c734fc25 | ||
|
|
3abeb82685 | ||
|
|
26591f5d7f | ||
|
|
5d52bd51bf | ||
|
|
7a18a1a7b6 | ||
|
|
66022a1f22 | ||
|
|
9d89387d83 | ||
|
|
f7b807f980 | ||
|
|
b24b6df448 | ||
|
|
9b38618f68 | ||
|
|
cabc1af823 | ||
|
|
8a034ce063 | ||
|
|
cc53774180 | ||
|
|
d9400caf69 | ||
|
|
a2acfe3be0 | ||
|
|
026c26075d | ||
|
|
8ccb7135d3 | ||
|
|
d4c0de2876 | ||
|
|
e5244e8c3d | ||
|
|
d327c5be46 | ||
|
|
31149a5a69 | ||
|
|
6bc3c70115 | ||
|
|
5ad471cc6e | ||
|
|
dd35acdb92 | ||
|
|
aceec7a5a2 | ||
|
|
f95dfbef75 | ||
|
|
baa70e51fe | ||
|
|
e7c05f16db | ||
|
|
fd83b2d491 | ||
|
|
f664938d8e | ||
|
|
9e45fbb13b | ||
|
|
3b2951b305 | ||
|
|
5745f6df70 | ||
|
|
d49fb1c777 | ||
|
|
f4d7403ed6 | ||
|
|
f987306a15 | ||
|
|
62abd51a02 | ||
|
|
b8db2af4bb | ||
|
|
8e1e05e86c | ||
|
|
09a62d7fef | ||
|
|
2544ace262 | ||
|
|
a1205f6109 | ||
|
|
4558e49c7e | ||
|
|
5926ee5f1f | ||
|
|
8689227b3e | ||
|
|
5cd5143b80 | ||
|
|
1ea0a1e856 | ||
|
|
b505795bf7 | ||
|
|
e3bd47921c | ||
|
|
e75b115244 | ||
|
|
15cec0ae09 | ||
|
|
4401407c7c | ||
|
|
a08f8d13e0 | ||
|
|
267ffc0e2e | ||
|
|
40d815946a | ||
|
|
37fd4264ac | ||
|
|
39e9206976 | ||
|
|
50c6ac34f1 | ||
|
|
6a00b2a802 | ||
|
|
010b469914 | ||
|
|
f802f8b7d7 | ||
|
|
219a88e9c6 | ||
|
|
79dacb20a0 | ||
|
|
adbe478e0b | ||
|
|
704c1b8893 | ||
|
|
780ba49da1 | ||
|
|
8be06bc22d | ||
|
|
f2b0adfa05 | ||
|
|
4830be0ea4 | ||
|
|
4a5bd50202 | ||
|
|
6a47d49ee8 | ||
|
|
3d06900e68 | ||
|
|
3259bf71e6 | ||
|
|
526e980a69 | ||
|
|
ab09909f99 | ||
|
|
d8b597b168 | ||
|
|
9bc335b35e | ||
|
|
227f2779d7 | ||
|
|
2ffda45adf | ||
|
|
bb2712fe45 | ||
|
|
cbf61d5524 | ||
|
|
39763a8ca7 | ||
|
|
aa19369466 | ||
|
|
3f65d6c350 | ||
|
|
99646e6436 | ||
|
|
450d624474 | ||
|
|
ca0c35aa15 | ||
|
|
fcfd8ea76e | ||
|
|
2044c36398 | ||
|
|
d374e1c160 | ||
|
|
ee491a0e5e | ||
|
|
e605882451 | ||
|
|
b91c8e17a7 | ||
|
|
dcc622d374 | ||
|
|
a3e5edc367 | ||
|
|
bd7c9e30d3 | ||
|
|
62dfb749f1 | ||
|
|
3b9de3baa3 | ||
|
|
d593988e5d | ||
|
|
0191210145 | ||
|
|
0f30a052b2 | ||
|
|
1c6ab3f831 | ||
|
|
5ffc297a69 | ||
|
|
e7340bfe5b | ||
|
|
e5b6d525c7 | ||
|
|
d1f7e16daa | ||
|
|
f22e9c27a9 | ||
|
|
ca651becf8 | ||
|
|
6de09688ad | ||
|
|
94806b8036 | ||
|
|
fa52826c24 | ||
|
|
7b8f51a465 | ||
|
|
79b993e6d5 | ||
|
|
56bba880e7 | ||
|
|
7acba8a4d8 | ||
|
|
08ca54d3d5 | ||
|
|
7b04732f09 | ||
|
|
74d70121d1 | ||
|
|
b64864f47d | ||
|
|
c237fe9f1c | ||
|
|
5e1c4cde50 | ||
|
|
1559c4fadd | ||
|
|
0cd6d8c139 | ||
|
|
ddb0920fed | ||
|
|
21777f2759 | ||
|
|
afdef8f890 | ||
|
|
d019bbd2c7 | ||
|
|
748d1d70cb | ||
|
|
987fd77042 | ||
|
|
a0984a9be8 | ||
|
|
9920c435ca | ||
|
|
4060fcbb8b | ||
|
|
d0ccac5663 | ||
|
|
06263d7606 | ||
|
|
3245c0a139 | ||
|
|
aed8e38584 | ||
|
|
546b54b15d | ||
|
|
0809d8f527 | ||
|
|
baf16cf834 | ||
|
|
629608c573 | ||
|
|
3746fae2ca | ||
|
|
e143214685 | ||
|
|
2340d83a33 | ||
|
|
69852123e0 | ||
|
|
90a8b81728 | ||
|
|
30fb22fffa | ||
|
|
f329872ce7 | ||
|
|
05db32fea2 | ||
|
|
c116c8fb9b | ||
|
|
1ab4fe43b5 | ||
|
|
f6c21057e1 | ||
|
|
c9085b4f2b | ||
|
|
c44d91c673 | ||
|
|
f6146b212f | ||
|
|
2b429ee43b | ||
|
|
be2a0170b7 | ||
|
|
a258cf3fc6 | ||
|
|
07a5715b9f | ||
|
|
f32398a708 | ||
|
|
f0425d77ef | ||
|
|
e0020b41da | ||
|
|
375c26ccb3 | ||
|
|
40024ac72a | ||
|
|
ab08dd1d26 | ||
|
|
21141f682f | ||
|
|
d8ea28e147 | ||
|
|
82156b6639 | ||
|
|
3085bf1df5 | ||
|
|
58e0946b1e | ||
|
|
f793ac25c7 | ||
|
|
d1fc923b66 | ||
|
|
f1897c4462 | ||
|
|
d8ec6b2003 | ||
|
|
824654964b | ||
|
|
0c52fcd5ff | ||
|
|
926b971497 | ||
|
|
1e95d36809 | ||
|
|
a3e5185e39 | ||
|
|
1cbfca4887 | ||
|
|
b0909ade6f | ||
|
|
036fa6918c | ||
|
|
b587052de4 | ||
|
|
cb9a734ebb | ||
|
|
01dbb8b693 | ||
|
|
68d80ab67d | ||
|
|
14ab3d763e | ||
|
|
3c3ac0a071 | ||
|
|
0b88889cdf | ||
|
|
2f85867963 | ||
|
|
3b1029ada4 | ||
|
|
b33f1f945b | ||
|
|
c7953ac137 | ||
|
|
534b6b5978 | ||
|
|
b6fc29050d | ||
|
|
8cbd57d829 | ||
|
|
7e494e52ab | ||
|
|
75e5ed2f68 | ||
|
|
7624a1ff85 | ||
|
|
1d72edddf6 | ||
|
|
c9b934147a | ||
|
|
65bad61abb | ||
|
|
77df3d6770 | ||
|
|
a8e8acead7 | ||
|
|
6460bb2897 | ||
|
|
44d419c1a1 | ||
|
|
60c81eae0a | ||
|
|
00246f3ea0 | ||
|
|
6f19fa7e91 | ||
|
|
70cdd27e75 | ||
|
|
c6004a8f89 | ||
|
|
85f0909c7f | ||
|
|
37be47fc56 | ||
|
|
86d7009f4c | ||
|
|
530065137d | ||
|
|
59d38d7dd2 | ||
|
|
59bd3b6dcb | ||
|
|
27a356dacf | ||
|
|
22c79cf470 | ||
|
|
2e1add83e7 | ||
|
|
2e6bec7345 | ||
|
|
024dde11d7 | ||
|
|
667e3130fe | ||
|
|
a9961a062a | ||
|
|
af3ca293e4 | ||
|
|
d42ff75ceb | ||
|
|
4156bb9f01 | ||
|
|
5328f103da | ||
|
|
1dee3e227c | ||
|
|
0da55081c9 | ||
|
|
af9d57e4b9 | ||
|
|
8867d2b34c | ||
|
|
eeda132e73 | ||
|
|
97d6b71460 | ||
|
|
1b2d12286f | ||
|
|
c70ed678f6 | ||
|
|
ab9be95442 | ||
|
|
71ef6a0a2b | ||
|
|
d2db799a93 | ||
|
|
07b8040122 | ||
|
|
888da52181 | ||
|
|
bd33a333af | ||
|
|
f7617bc628 | ||
|
|
c5e170961f | ||
|
|
e02e875978 | ||
|
|
52cd17ecc7 | ||
|
|
76160b53c7 | ||
|
|
80cf1324c5 | ||
|
|
0f0d8a01cb | ||
|
|
995edc0b75 | ||
|
|
5344a02bbc | ||
|
|
eb09731a65 | ||
|
|
45ed374b62 | ||
|
|
1e596496a5 | ||
|
|
761799abf5 | ||
|
|
baaa335664 | ||
|
|
0a52f56ba4 | ||
|
|
7c9d40016f | ||
|
|
1d53ed5095 | ||
|
|
6d6ef0f120 | ||
|
|
afb238814d | ||
|
|
a055dc0351 | ||
|
|
f98000753d | ||
|
|
84ef98f067 | ||
|
|
925ae68167 | ||
|
|
d863c3e5f4 | ||
|
|
5a0a8f6a87 | ||
|
|
df815344d1 | ||
|
|
a6e15d7569 | ||
|
|
deb5dcaad1 | ||
|
|
478d6ced4e | ||
|
|
791f836e3d | ||
|
|
cd854b2130 | ||
|
|
26e70fe642 | ||
|
|
0cc60d39d2 | ||
|
|
6c14b4271f | ||
|
|
19fd48e33b | ||
|
|
93832340a5 | ||
|
|
a0936bec02 | ||
|
|
a18a50b7a4 | ||
|
|
d17bdd2658 | ||
|
|
84129a7da1 | ||
|
|
0d952b79db | ||
|
|
0a2131d2d3 | ||
|
|
86a0445984 | ||
|
|
837b10aab5 | ||
|
|
9103ddb7fa | ||
|
|
96e86ac03e | ||
|
|
950c584485 | ||
|
|
6d05ea5716 | ||
|
|
79fafda012 | ||
|
|
a14e757059 | ||
|
|
7f4fc4de93 | ||
|
|
8f6bb8d9ec | ||
|
|
b380e8f2a9 | ||
|
|
0d959a254c | ||
|
|
23c04e2e66 | ||
|
|
4797c7b42c | ||
|
|
4b6fb504a2 | ||
|
|
100ec449fe | ||
|
|
790f3d46aa | ||
|
|
7404ecb11e | ||
|
|
a714bf4720 | ||
|
|
9eeedede49 | ||
|
|
3408866b79 | ||
|
|
804094bf51 | ||
|
|
869b17fe29 | ||
|
|
867aaa4c27 | ||
|
|
d43801a9b7 | ||
|
|
7eb2acaf71 | ||
|
|
0bffdf2463 | ||
|
|
036570d93d | ||
|
|
60da6fb2e1 | ||
|
|
edf24d859c | ||
|
|
33fcd28dba | ||
|
|
8fb413107c | ||
|
|
f976887f23 | ||
|
|
ab8ec45b50 | ||
|
|
96e0814510 | ||
|
|
1d69566cb1 | ||
|
|
b0cae23777 | ||
|
|
ef2b372dd3 | ||
|
|
00354d3264 | ||
|
|
2577e48feb | ||
|
|
020883fd4d | ||
|
|
f8e5c410a2 | ||
|
|
b90c53deb6 | ||
|
|
d6e950f681 | ||
|
|
960412a9b4 | ||
|
|
7a7e221210 | ||
|
|
3d64bd0c49 | ||
|
|
0137763997 | ||
|
|
dcc0c17a29 | ||
|
|
be68ef502e | ||
|
|
c1eda61874 | ||
|
|
bece8d2a39 | ||
|
|
83e14a7b44 | ||
|
|
001f5ae50d | ||
|
|
862fe79f32 | ||
|
|
412923ab5f | ||
|
|
e172379f04 | ||
|
|
e960fe9512 | ||
|
|
8bddf12e05 | ||
|
|
a02b313b89 | ||
|
|
8e648e4d95 | ||
|
|
e5a42ab277 | ||
|
|
2604c935cf | ||
|
|
79856abae9 | ||
|
|
1f1a47c57b | ||
|
|
0c11718917 | ||
|
|
7938677efa | ||
|
|
9b909df543 | ||
|
|
aedd2dea45 | ||
|
|
5154712050 | ||
|
|
76d87183c0 | ||
|
|
0e31e4cff5 | ||
|
|
23571046fb | ||
|
|
34ad6d5ac8 | ||
|
|
9990ddbe52 | ||
|
|
b6717a5bad | ||
|
|
ea81b0c833 | ||
|
|
0eb385c0d6 | ||
|
|
b0c02d8ea6 | ||
|
|
66b73e906e | ||
|
|
d3b1721da0 | ||
|
|
9e2fcda357 | ||
|
|
38bb732673 | ||
|
|
a0bfe2bf72 | ||
|
|
c01f4bf220 | ||
|
|
f45ec312ee | ||
|
|
dd4b1aff2e | ||
|
|
92a0e4e7d8 | ||
|
|
36f4452351 | ||
|
|
845df89e95 | ||
|
|
8f4df45fb4 | ||
|
|
23ab5177b3 | ||
|
|
825e4e99e3 | ||
|
|
4cb51ac7c1 | ||
|
|
a897feef50 | ||
|
|
f4a534855c | ||
|
|
a0f71cc328 | ||
|
|
5884db97d4 | ||
|
|
12ab7e2752 | ||
|
|
e23b2f6fcc | ||
|
|
5b5fe3cad9 | ||
|
|
4664c07034 | ||
|
|
9509e66ae8 | ||
|
|
d19a2faf8e | ||
|
|
3c9cf1dcd6 | ||
|
|
231202d0a3 | ||
|
|
9151f65702 | ||
|
|
478b0d6101 | ||
|
|
9511586f07 | ||
|
|
74914b6313 | ||
|
|
30d10213ec | ||
|
|
c51986d657 | ||
|
|
97bab928bd | ||
|
|
75171b4672 | ||
|
|
7c49bdd953 | ||
|
|
86a82d103e | ||
|
|
c607ea8b31 | ||
|
|
53d9878cf2 | ||
|
|
798bf61fde | ||
|
|
e5635d236d | ||
|
|
05f177b6d6 | ||
|
|
b1921ce484 | ||
|
|
cb28ada0aa | ||
|
|
a20f93b42f | ||
|
|
6c996a7d1a | ||
|
|
5630746794 | ||
|
|
4a4fb77081 | ||
|
|
dbb44a153d | ||
|
|
680a2bc3ec | ||
|
|
f8e61ac914 | ||
|
|
24104dac35 | ||
|
|
7126074f49 | ||
|
|
91d6d77a09 | ||
|
|
f964873a2d | ||
|
|
6f6a4a1013 | ||
|
|
49b8ece776 | ||
|
|
299527370e | ||
|
|
55f9e31f81 | ||
|
|
2ff81caef6 | ||
|
|
f5f744ad2c | ||
|
|
a878749f6c | ||
|
|
9930f610a7 | ||
|
|
d2016d8e0a | ||
|
|
958dd20680 | ||
|
|
defedf6e2b | ||
|
|
b887efdc1c | ||
|
|
c223f28171 | ||
|
|
8ae1c814d5 | ||
|
|
0453e64fa6 | ||
|
|
0a479f77f6 | ||
|
|
2392a09eeb | ||
|
|
f5f00069bd | ||
|
|
640fd87e3b | ||
|
|
43b60e667e | ||
|
|
a2c27ba8a6 | ||
|
|
f5708218ea | ||
|
|
276afefc85 | ||
|
|
36d1ec364e | ||
|
|
dbbeffa712 | ||
|
|
0adfd9f8e9 | ||
|
|
178949038f | ||
|
|
5a332f3c57 | ||
|
|
f72059e7ac | ||
|
|
992afd51eb | ||
|
|
8de5c62cf2 | ||
|
|
ebaa7021a4 | ||
|
|
51437af1cd | ||
|
|
c45dba1691 | ||
|
|
fbe9626b7e | ||
|
|
cf657f1c7b | ||
|
|
f65193e6fb | ||
|
|
7a1945e154 | ||
|
|
f4c66d9e53 | ||
|
|
0fb1ffa88b | ||
|
|
69a3852ef7 | ||
|
|
d649c1311e | ||
|
|
f7eacbb0c5 | ||
|
|
3e928fff2d | ||
|
|
967cc5bd3b | ||
|
|
b8f1e5afa1 | ||
|
|
fe04a0e347 | ||
|
|
0e4d3e7815 | ||
|
|
e631c16b96 | ||
|
|
501245d0c2 | ||
|
|
df55ab3efb | ||
|
|
1e5e1d4458 |
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
**/*.mustache linguist-vendored=true
|
||||||
117
.github/.test/auto-labeler.js
vendored
Normal file
117
.github/.test/auto-labeler.js
vendored
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
let fs = require('fs');
|
||||||
|
let path = require('path');
|
||||||
|
let util = require('util');
|
||||||
|
let yaml = require('./js-yaml.js');
|
||||||
|
let samples = require('./samples.json');
|
||||||
|
|
||||||
|
class LabelMatch {
|
||||||
|
constructor (match, label) {
|
||||||
|
this.match = match;
|
||||||
|
this.label = label;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class FileError {
|
||||||
|
constructor (file, actualLabels, expectedLabels) {
|
||||||
|
this.file = file;
|
||||||
|
this.actual = actualLabels;
|
||||||
|
this.expected = expectedLabels;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class TextError {
|
||||||
|
constructor (text, actualLabels, expectedLabels) {
|
||||||
|
this.text = text;
|
||||||
|
this.actual = actualLabels;
|
||||||
|
this.expected = expectedLabels;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let labels = [];
|
||||||
|
|
||||||
|
function labelsForFile(file) {
|
||||||
|
let body = fs.readFileSync(file);
|
||||||
|
return labelsForText(body)
|
||||||
|
}
|
||||||
|
|
||||||
|
function labelsForText(text) {
|
||||||
|
let addLabels = new Set();
|
||||||
|
let body = text;
|
||||||
|
for (const v of labels) {
|
||||||
|
if (v.match.test(body)) {
|
||||||
|
addLabels.add(v.label)
|
||||||
|
}
|
||||||
|
// reset regex state
|
||||||
|
v.match.lastIndex = 0
|
||||||
|
}
|
||||||
|
return addLabels;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
let config = yaml.safeLoad(fs.readFileSync('../auto-labeler.yml', 'utf8'));
|
||||||
|
|
||||||
|
if (config && config.labels && Object.keys(config.labels).length > 0) {
|
||||||
|
for (const labelName in config.labels) {
|
||||||
|
if (config.labels.hasOwnProperty(labelName)) {
|
||||||
|
let matchAgainst = config.labels[labelName];
|
||||||
|
if (Array.isArray(matchAgainst)) {
|
||||||
|
matchAgainst.forEach(regex => {
|
||||||
|
// noinspection JSCheckFunctionSignatures
|
||||||
|
labels.push(new LabelMatch(new RegExp(regex, 'g'), labelName));
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (labels.length === 0) {
|
||||||
|
// noinspection ExceptionCaughtLocallyJS
|
||||||
|
throw new Error("Expected to parse config.labels, but failed.")
|
||||||
|
}
|
||||||
|
|
||||||
|
let fileErrors = [];
|
||||||
|
samples.files.forEach(function(tester){
|
||||||
|
let file = path.normalize(path.join('..', '..', 'bin', tester.input));
|
||||||
|
let expectedLabels = new Set(tester.matches);
|
||||||
|
let actualLabels = labelsForFile(file);
|
||||||
|
let difference = new Set([...actualLabels].filter(x => !expectedLabels.has(x)));
|
||||||
|
if (difference.size > 0) {
|
||||||
|
fileErrors.push(new FileError(file, actualLabels, expectedLabels));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
let textErrors = [];
|
||||||
|
samples.text.forEach(function(tester){
|
||||||
|
let expectedLabels = new Set(tester.matches);
|
||||||
|
let actualLabels = labelsForText(tester.input);
|
||||||
|
let difference = new Set([...actualLabels].filter(x => !expectedLabels.has(x)));
|
||||||
|
if (difference.size > 0) {
|
||||||
|
textErrors.push(new TextError(tester.input, actualLabels, expectedLabels));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// These are separate (file vs text) in case we want to preview where these would fail in the file. not priority at the moment.
|
||||||
|
if (fileErrors.length > 0) {
|
||||||
|
console.warn('There were %d file tester errors', fileErrors.length);
|
||||||
|
fileErrors.forEach(function(errs) {
|
||||||
|
console.log("file: %j\n actual: %j\n expected: %j", errs.file, util.inspect(errs.actual), util.inspect(errs.expected))
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (textErrors.length > 0) {
|
||||||
|
console.warn('There were %d text tester errors', textErrors.length);
|
||||||
|
textErrors.forEach(function(errs){
|
||||||
|
console.log("input: %j\n actual: %j\n expected: %j", errs.text, util.inspect(errs.actual), util.inspect(errs.expected))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
let totalErrors = fileErrors.length + textErrors.length;
|
||||||
|
if (totalErrors === 0) {
|
||||||
|
console.log('Success!');
|
||||||
|
} else {
|
||||||
|
console.log('Failure: %d total errors', totalErrors);
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.log(e);
|
||||||
|
}
|
||||||
|
|
||||||
3917
.github/.test/js-yaml.js
vendored
Normal file
3917
.github/.test/js-yaml.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1292
.github/.test/samples.json
vendored
Normal file
1292
.github/.test/samples.json
vendored
Normal file
File diff suppressed because it is too large
Load Diff
10
.github/ISSUE_TEMPLATE/announcement.md
vendored
Normal file
10
.github/ISSUE_TEMPLATE/announcement.md
vendored
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
name: Announcement
|
||||||
|
about: Announcements related to the project
|
||||||
|
title: "[Announcement] TITLE"
|
||||||
|
labels: Announcement
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
63
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
63
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
---
|
||||||
|
name: Bug report
|
||||||
|
about: Create a bug report to help us improve
|
||||||
|
title: "[BUG] Description"
|
||||||
|
labels: 'Issue: Bug'
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
#### Bug Report Checklist
|
||||||
|
|
||||||
|
- [ ] Have you provided a full/minimal spec to reproduce the issue?
|
||||||
|
- [ ] Have you validated the input using an OpenAPI validator ([example](https://apidevtools.org/swagger-parser/online/))?
|
||||||
|
- [ ] What's the version of OpenAPI Generator used?
|
||||||
|
- [ ] Have you search for related issues/PRs?
|
||||||
|
- [ ] What's the actual output vs expected output?
|
||||||
|
- [ ] [Optional] Bounty to sponsor the fix ([example](https://www.bountysource.com/issues/66123212-javascript-client-produces-a-wrong-object-for-a-string-enum-type-that-is-used-with-ref))
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Please follow the issue template below for bug reports.
|
||||||
|
Also please indicate in the issue title which language/library is concerned. Eg: [BUG][JAVA] Bug generating foo with bar
|
||||||
|
-->
|
||||||
|
|
||||||
|
##### Description
|
||||||
|
|
||||||
|
<!-- describe what is the question, suggestion or issue and why this is a problem for you. -->
|
||||||
|
|
||||||
|
##### openapi-generator version
|
||||||
|
|
||||||
|
<!-- which version of openapi-generator are you using, is it a regression? -->
|
||||||
|
|
||||||
|
##### OpenAPI declaration file content or url
|
||||||
|
|
||||||
|
<!-- if it is a bug, a json or yaml that produces it.
|
||||||
|
If you post the code inline, please wrap it with
|
||||||
|
```yaml
|
||||||
|
(here your code)
|
||||||
|
```
|
||||||
|
(for YAML code) or
|
||||||
|
```json
|
||||||
|
(here your code)
|
||||||
|
```
|
||||||
|
(for JSON code), so it becomes more readable. If it is longer than about ten lines,
|
||||||
|
please create a Gist (https://gist.github.com) or upload it somewhere else and
|
||||||
|
link it here.
|
||||||
|
-->
|
||||||
|
|
||||||
|
##### Command line used for generation
|
||||||
|
|
||||||
|
<!-- including the language, libraries and various options -->
|
||||||
|
|
||||||
|
##### Steps to reproduce
|
||||||
|
|
||||||
|
<!-- unambiguous set of steps to reproduce the bug.-->
|
||||||
|
|
||||||
|
##### Related issues/PRs
|
||||||
|
|
||||||
|
<!-- has a similar issue/PR been reported/opened before? Please do a search in https://github.com/openapitools/openapi-generator/issues?utf8=%E2%9C%93&q=is%3Aissue%20 -->
|
||||||
|
|
||||||
|
##### Suggest a fix
|
||||||
|
|
||||||
|
<!-- if you can't fix the bug yourself, perhaps you can point to what might be
|
||||||
|
causing the problem (line of code or commit), or simply make a suggestion -->
|
||||||
24
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
24
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
---
|
||||||
|
name: Feature request
|
||||||
|
about: Suggest an idea for this project
|
||||||
|
title: "[REQ] Feature Request Description"
|
||||||
|
labels: 'Enhancement: Feature'
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Is your feature request related to a problem? Please describe.
|
||||||
|
|
||||||
|
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
|
||||||
|
|
||||||
|
## Describe the solution you'd like
|
||||||
|
|
||||||
|
<!-- A clear and concise description of what you want to happen. -->
|
||||||
|
|
||||||
|
## Describe alternatives you've considered
|
||||||
|
|
||||||
|
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
|
||||||
|
|
||||||
|
## Additional context
|
||||||
|
|
||||||
|
<!-- Add any other context or screenshots about the feature request here. -->
|
||||||
4
.github/PULL_REQUEST_TEMPLATE.md
vendored
4
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -1,8 +1,8 @@
|
|||||||
### PR checklist
|
### PR checklist
|
||||||
|
|
||||||
- [ ] Read the [contribution guidelines](https://github.com/openapitools/openapi-generator/blob/master/CONTRIBUTING.md).
|
- [ ] 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: Default: `master`.
|
- [ ] 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.
|
- [ ] 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.
|
||||||
|
|
||||||
### Description of the PR
|
### Description of the PR
|
||||||
|
|||||||
290
.github/auto-labeler.yml
vendored
Normal file
290
.github/auto-labeler.yml
vendored
Normal file
@@ -0,0 +1,290 @@
|
|||||||
|
comment: |
|
||||||
|
👍 Thanks for opening this issue!
|
||||||
|
🏷 I have applied any labels matching special text in your issue.
|
||||||
|
|
||||||
|
The team will review the labels and make any necessary changes.
|
||||||
|
labels:
|
||||||
|
'Announcement':
|
||||||
|
- '\s*?\[[Aa]nnouncement\]\s*?'
|
||||||
|
'Breaking change (with fallback)':
|
||||||
|
- '\s*?[bB]reaking [cC]hange [wW]ith [fF]allback\s*?'
|
||||||
|
'Breaking change (without fallback)':
|
||||||
|
- '\s*?[bB]reaking [cC]hange [wW]ithout [fF]allback\s*?'
|
||||||
|
'Client: Ada':
|
||||||
|
- '\s*?\[ada\]\s*?'
|
||||||
|
- '\s*?-[gl] ada(?!-)\b'
|
||||||
|
'Client: Android':
|
||||||
|
- '\s*?\[android\]\s*?'
|
||||||
|
- '\s*?-[gl] android(?!-)\b'
|
||||||
|
'Client: Apex':
|
||||||
|
- '\s*?\[apex\]\s*?'
|
||||||
|
- '\s*?-[gl] apex(?!-)\b'
|
||||||
|
'Client: Bash':
|
||||||
|
- '\s*?\[bash\]\s*?'
|
||||||
|
- '\s*?-[gl] bash(?!-)\b'
|
||||||
|
'Client: C':
|
||||||
|
- '\s*?\[[cC]\]\s*?'
|
||||||
|
- '\s*?-[gl] c(?!-)\b'
|
||||||
|
# 'Client: Ceylon':
|
||||||
|
'Client: C++':
|
||||||
|
- '\s*?\[cpp(-.*)?-client\]\s*?'
|
||||||
|
- '\s*?-[gl] cpp(-.*)?-client\s*?'
|
||||||
|
- '\s*?-[gl] cpp-restsdk(?!-)\b'
|
||||||
|
- '\s*?-[gl] cpp-tizen(?!-)\b'
|
||||||
|
'Client: C-Sharp':
|
||||||
|
- '\s*?-[gl] csharp(?!-)\b'
|
||||||
|
- '\s*?[cC]-[sS]harp [cC]lient\s*?'
|
||||||
|
- '\s*?-[gl] csharp-dotnet2\s*?'
|
||||||
|
- '\s*?-[gl] csharp-refactor?\s*?'
|
||||||
|
- '\s*?\[[Cc]#\]'
|
||||||
|
- '\s*?\[csharp\]\s*?'
|
||||||
|
'Client: Clojure':
|
||||||
|
- '\s*?\[clojure\]\s*?'
|
||||||
|
- '\s*?-[gl] clojure(?!-)\b'
|
||||||
|
# 'Client: Crystal':
|
||||||
|
'Client: Dart':
|
||||||
|
- '\s*?\[dart\]\s*?'
|
||||||
|
- '\s*?-[gl] dart(?!-)\b'
|
||||||
|
'Client: Dukescript':
|
||||||
|
- '\s*?\[dukescript\]\s*?'
|
||||||
|
- '\s*?-g dukescript\s*?'
|
||||||
|
'Client: Eiffel':
|
||||||
|
- '\s*?\[eiffel\]\s*?'
|
||||||
|
- '\s*?-[gl] eiffel(?!-)\b'
|
||||||
|
'Client: Elixir':
|
||||||
|
- '\s*?\[elixir\]\s*?'
|
||||||
|
- '\s*?-[gl] elixir(?!-)\b'
|
||||||
|
'Client: Elm':
|
||||||
|
- '\s*?\[elm\]\s*?'
|
||||||
|
- '\s*?-[gl] elm(?!-)\b'
|
||||||
|
'Client: Erlang':
|
||||||
|
- '\s*?\[erlang(-.*)?-client\]\s*?'
|
||||||
|
- '\s*?-[gl] erlang(-.*)?-client\s*?'
|
||||||
|
- '\s*?\[erlang-proper\]\s*?'
|
||||||
|
- '\s*?-[gl] erlang-proper\s*?'
|
||||||
|
'Client: Flash/ActionScript':
|
||||||
|
- '\s*?\[flash\]\s*?'
|
||||||
|
- '\s*?-[gl] flash(?!-)\b'
|
||||||
|
'Client: Go':
|
||||||
|
- '\s*?\[go\]\s*?'
|
||||||
|
- '\s*?-[gl] go(?!-)\b'
|
||||||
|
'Client: Groovy':
|
||||||
|
- '\s*?\[groovy\]\s*?'
|
||||||
|
- '\s*?-[gl] groovy(?!-)\b'
|
||||||
|
'Client: HTML':
|
||||||
|
- '\s*?\[html[2]?\]\s*?'
|
||||||
|
- '\s*?-[gl] html[2]?\s*?'
|
||||||
|
'Client: Haskell':
|
||||||
|
- '\s*?\[haskell(-.*)?-client\]\s*?'
|
||||||
|
- '\s*?-[gl] haskell(-.*)?-client\s*?'
|
||||||
|
'Client: JMeter':
|
||||||
|
- '\s*?\[jmeter\]\s*?'
|
||||||
|
- '\s*?-[gl] jmeter\s*?'
|
||||||
|
'Client: Java':
|
||||||
|
- '\s*?\[java\]\s*?'
|
||||||
|
- '\s*?-[gl] java(?!-)\b'
|
||||||
|
'Client: JavaScript/Node.js':
|
||||||
|
- '\s*?\[javascript\]\s*?'
|
||||||
|
- '\s*?-[gl] javascript\s*?'
|
||||||
|
- '\s*?-[gl] javascript-(\S)*\s*?'
|
||||||
|
# 'Client: Julia': # NOTE: Not yet implemented
|
||||||
|
'Client: Kotlin':
|
||||||
|
- '\s*?\[kotlin\]\s*?'
|
||||||
|
- '\s*?-[gl] kotlin(?!-)\b'
|
||||||
|
'Client: Lisp':
|
||||||
|
- '\s*?\[lisp\]\s*?'
|
||||||
|
- '\s*?-[gl] lisp(?!-)\b'
|
||||||
|
'Client: Lua':
|
||||||
|
- '\s*?\[lua\]\s*?'
|
||||||
|
- '\s*?-[gl] lua(?!-)\b'
|
||||||
|
'Client: Objc':
|
||||||
|
- '\s*?\[objc\]\s*?'
|
||||||
|
- '\s*?-[gl] objc\s*?'
|
||||||
|
# 'Client: OCaml':
|
||||||
|
'Client: Perl':
|
||||||
|
- '\s*?\[perl\]\s*?'
|
||||||
|
- '\s*?-[gl] perl(?!-)\b'
|
||||||
|
# 'Client: PHP':
|
||||||
|
'Client: PowerShell':
|
||||||
|
- '\s*?\[powershell\]\s*?'
|
||||||
|
- '\s*?-[gl] powershell\s*?'
|
||||||
|
'Client: Python':
|
||||||
|
- '\s*?\[python\]\s*?'
|
||||||
|
- '\s*?-[gl] python(?!-)\b'
|
||||||
|
'Client: QT':
|
||||||
|
- '\s*?\[cpp-qt5-client\]\s*?'
|
||||||
|
- '\s*?-[gl] cpp-qt5-client\s*?'
|
||||||
|
'Client: R':
|
||||||
|
- '\s*?\[[rR]\]\s*?'
|
||||||
|
- '\s*?-[gl] r(?!-)\b'
|
||||||
|
'Client: Reason ML':
|
||||||
|
- '\s*?\[reasonml\]\s*?'
|
||||||
|
- '\s*?-[g] reasonml\s*?'
|
||||||
|
'Client: Retrofit':
|
||||||
|
- '\s*?retrofit.*?\s*?'
|
||||||
|
'Client: Ruby':
|
||||||
|
- '\s*?\[ruby\]\s*?'
|
||||||
|
- '\s*?-[gl] ruby(?!-)\b'
|
||||||
|
'Client: Rust':
|
||||||
|
- '\s*?\[rust\]\s*?'
|
||||||
|
- '\s*?-[gl] rust(?!-)\b'
|
||||||
|
'Client: Scala':
|
||||||
|
- '\s*?\[scalaz\]\s*?'
|
||||||
|
- '\s*?-[gl] scalaz\s*?'
|
||||||
|
- '\s*?\[scala-(?!finch)[a-z]+\]\b'
|
||||||
|
- '\s*?-[gl] scala-(?!finch)[a-z]+?(?!-)\b'
|
||||||
|
'Client: Swift':
|
||||||
|
- '\s*?\[swift[34]+\]\s*?'
|
||||||
|
- '\s*?-[gl] swift[34]+\s*?'
|
||||||
|
- '\s*?-[gl] swift2-deprecated\s*?'
|
||||||
|
'Client: TypeScript':
|
||||||
|
- '\s*?\[typescript-[\-a-z]+\]\s*?'
|
||||||
|
- '\s*?-[gl] typescript-[\-a-z]+\s*?'
|
||||||
|
# 'Client: VB/VB.net': # NOTE: Not yet implemented
|
||||||
|
# 'Client: Visual Basic': # TODO: REMOVE UNUSED LABEL
|
||||||
|
'Config: Apache':
|
||||||
|
- '\s*?\[apache2\]\s*?'
|
||||||
|
- '\s*?-[gl] apache2\s*?'
|
||||||
|
'Docker':
|
||||||
|
- '\s*?\[docker\]\s*?'
|
||||||
|
'Documentation: Cwiki':
|
||||||
|
- '\s*?\[cwiki\]\s*?'
|
||||||
|
- '\s*?-[gl] cwiki\s*?'
|
||||||
|
'Documentation: Dynamic HTML':
|
||||||
|
- '\s*?\[dynamic-html\]\s*?'
|
||||||
|
- '\s*?-[gl] dynamic-html\s*?'
|
||||||
|
'Enhancement: CI/Test':
|
||||||
|
- '\s*?\[ci\]\s*?'
|
||||||
|
'Enhancement: Code format':
|
||||||
|
- '\s*?\[format(ting)?\]\s*?'
|
||||||
|
# 'Enhancement: Compatibility':
|
||||||
|
'Enhancement: Feature':
|
||||||
|
- '\s*?\[feat(ure)?s*?'
|
||||||
|
'Enhancement: General':
|
||||||
|
- '\s*?\[general\]\s*?'
|
||||||
|
- '\s*?\[core\]\s*?'
|
||||||
|
# 'Enhancement: New generator':
|
||||||
|
'Enhancement: Performance':
|
||||||
|
- '\s*?\[perf\]\s*?'
|
||||||
|
# 'Feature List: API clients':
|
||||||
|
# 'Feature List: API documentations':
|
||||||
|
# 'Feature List: API servers':
|
||||||
|
# 'Feature: Authentication':
|
||||||
|
# 'Feature: Composition / Inheritance':
|
||||||
|
# 'Feature: Documentation':
|
||||||
|
# 'Feature: Enum':
|
||||||
|
# 'Feature: Generator':
|
||||||
|
'Feature: OAS 3.0 spec support':
|
||||||
|
- '\s*?\[oas3[\.0]?\]\s*?'
|
||||||
|
# 'General: Awaiting feedback':
|
||||||
|
'General: Discussion':
|
||||||
|
- '\s*?\[discussion\]\s*?'
|
||||||
|
'General: Question':
|
||||||
|
- '\s*?\[question\]\s*?'
|
||||||
|
'General: Suggestion':
|
||||||
|
- '\s*?\[suggestion\]\s*?'
|
||||||
|
'General: Support':
|
||||||
|
- '\s*?\[support\]\s*?'
|
||||||
|
'Issue: Bug':
|
||||||
|
- '\s*?\[bug(s)?\]\s*?'
|
||||||
|
- '\s*?\[fix(es)?\]\s*?'
|
||||||
|
# 'Issue: Invalid spec':
|
||||||
|
# 'Issue: Migration':
|
||||||
|
# 'Issue: Non-operational':
|
||||||
|
# 'Issue: Platform':
|
||||||
|
# 'Issue: Regression':
|
||||||
|
'Issue: Security':
|
||||||
|
- '\s*?\[security\]\s*?'
|
||||||
|
# 'Issue: Unable to reproduce':
|
||||||
|
# 'Issue: Undo changes':
|
||||||
|
# 'Issue: Usage/Installation':
|
||||||
|
# 'Issue: Workaround available':
|
||||||
|
'OpenAPI Generator CLI':
|
||||||
|
- '\s*?\[cli\]\s*?'
|
||||||
|
'OpenAPI Generator Gradle Plugin':
|
||||||
|
- '\s*?\[gradle\]\s*?'
|
||||||
|
'OpenAPI Generator Maven Plugin':
|
||||||
|
- '\s*?\[maven\]\s*?'
|
||||||
|
'OpenAPI Generator Online':
|
||||||
|
- '\s*?\[online\]\s*?'
|
||||||
|
'Schema: MySQL':
|
||||||
|
- '\s*?\[mysql\]\s*?'
|
||||||
|
- '\s*?-[gl] mysql\s*?'
|
||||||
|
'Schema: GraphQL':
|
||||||
|
- '\s*?\[graphql-schema\]\s*?'
|
||||||
|
- '\s*?-[gl] graphql-schema\s*?'
|
||||||
|
'Server: Ada':
|
||||||
|
- '\s*?\[ada(-.*)?-server\]\s*?'
|
||||||
|
- '\s*?-[gl] ada(-.*)?-server\s*?'
|
||||||
|
'Server: C++':
|
||||||
|
- '\s*?\[cpp(-.*)?-server\]\s*?'
|
||||||
|
- '\s*?-[gl] cpp(-.*)?-server\s*?'
|
||||||
|
'Server: C-Sharp':
|
||||||
|
- '\s*?\[aspnetcore\]\s*?'
|
||||||
|
- '\s*?-[gl] aspnetcore\s*?'
|
||||||
|
- '\s*?\[csharp-nancyfx\]\s*?'
|
||||||
|
- '\s*?-[gl] csharp-nancyfx\s*?'
|
||||||
|
# 'Server: Ceylon': # TODO: REMOVE UNUSED LABEL
|
||||||
|
'Server: Eiffel':
|
||||||
|
- '\s*?\[eiffel(-.*)?-server\]\s*?'
|
||||||
|
- '\s*?-[gl] eiffel(-.*)?-server\s*?'
|
||||||
|
'Server: Elixir':
|
||||||
|
- '\s*?\[elixir(-.*)?-server\]\s*?'
|
||||||
|
- '\s*?-[gl] elixir(-.*)?-server\s*?'
|
||||||
|
'Server: Erlang':
|
||||||
|
- '\s*?\[erlang-server\]\s*?'
|
||||||
|
- '\s*?-[gl] erlang-server\s*?'
|
||||||
|
'Server: Go':
|
||||||
|
- '\s*?\[go(-.*)?-server\]\s*?'
|
||||||
|
- '\s*?-[gl] go(-.*)?-server\s*?'
|
||||||
|
'Server: GraphQL':
|
||||||
|
- '\s*?\[graphql(-.*)?-server\]\s*?'
|
||||||
|
- '\s*?-[gl] graphql(-.*)?-server\s*?'
|
||||||
|
'Server: Haskell':
|
||||||
|
- '\s*?\[haskell]\s*?'
|
||||||
|
- '\s*?-[gl] haskell(?!-)\b'
|
||||||
|
'Server: Java':
|
||||||
|
- '\s*?\[java-.*?\]\s*?'
|
||||||
|
- '\s*?-[gl] java-.*?\s*?'
|
||||||
|
- '\s*?-[gl] jaxrx-.*?\s*?'
|
||||||
|
'Server: Kotlin':
|
||||||
|
- '\s*?\[ktor]\s*?'
|
||||||
|
- '\s*?\[kotlin-spring]\s*?'
|
||||||
|
- '\s*?\[kotlin(-.*)?-server\]\s*?'
|
||||||
|
- '\s*?-[gl] kotlin(-.*)?-server\s*?'
|
||||||
|
- '\s*?-[gl] kotlin-spring\s*?'
|
||||||
|
'Server: Nodejs':
|
||||||
|
- '\s*?\[nodejs(-.*)?-server\]\s*?'
|
||||||
|
- '\s*?-[gl] nodejs(-.*)?-server\s*?'
|
||||||
|
'Server: PHP':
|
||||||
|
- '\s*?\[php-.*?\]\s*?'
|
||||||
|
- '\s*?-[gl] php-.*?\s*?'
|
||||||
|
'Server: Perl':
|
||||||
|
- '\s*?\[perl(-.*)?-server\]\s*?'
|
||||||
|
- '\s*?-g perl(-.*)?-server\s*?'
|
||||||
|
'Server: Python':
|
||||||
|
- '\s*?\[python-.*?\]\s*?'
|
||||||
|
- '\s*?-[gl] python-.*?\s*?'
|
||||||
|
'Server: Ruby':
|
||||||
|
- '\s*?\[ruby-.*?\]\s*?'
|
||||||
|
- '\s*?-[gl] ruby-.*?\s*?'
|
||||||
|
'Server: Rust':
|
||||||
|
- '\s*?\[rust(-.*)?-server\]\s*?'
|
||||||
|
- '\s*?-[gl] rust(-.*)?-server\s*?'
|
||||||
|
'Server: Scala':
|
||||||
|
- '\s*?\[scala(-.*)?-server\]\s*?'
|
||||||
|
- '\s*?-[gl] scala(-.*)?-server\s*?'
|
||||||
|
- '\s*?\[scalatra\]\s*?'
|
||||||
|
- '\s*?-[gl] scalatra\s*?'
|
||||||
|
- '\s*?\[scala-finch\]\s*?'
|
||||||
|
- '\s*?-[gl] scala-finch\s*?'
|
||||||
|
'Server: Spring':
|
||||||
|
- '\s*?\[spring\]\s*?'
|
||||||
|
- '\s*?-[g] spring\s*?'
|
||||||
|
# 'Swagger-Parser':
|
||||||
|
'WIP':
|
||||||
|
- '\s*?\[wip\]\s*?'
|
||||||
|
- '\s*?\[WIP\]\s*?'
|
||||||
|
- '\bWIP:.*?'
|
||||||
|
'help wanted':
|
||||||
|
- '\s*?\[help wanted\]\s*?'
|
||||||
47
.gitignore
vendored
47
.gitignore
vendored
@@ -3,8 +3,10 @@
|
|||||||
out/
|
out/
|
||||||
*.ipr
|
*.ipr
|
||||||
*.iws
|
*.iws
|
||||||
|
*.gpg
|
||||||
classpath.txt
|
classpath.txt
|
||||||
version.properties
|
version.properties
|
||||||
|
modules/openapi-generator-gradle-plugin/bin/
|
||||||
!modules/openapi-generator-cli/src/main/resources/version.properties
|
!modules/openapi-generator-cli/src/main/resources/version.properties
|
||||||
.project
|
.project
|
||||||
.classpath
|
.classpath
|
||||||
@@ -25,6 +27,7 @@ packages/
|
|||||||
.packages
|
.packages
|
||||||
.vagrant/
|
.vagrant/
|
||||||
.vscode/
|
.vscode/
|
||||||
|
**/.vs
|
||||||
|
|
||||||
.settings
|
.settings
|
||||||
|
|
||||||
@@ -58,6 +61,12 @@ samples/client/petstore/qt5cpp/PetStore/PetStore
|
|||||||
samples/client/petstore/qt5cpp/PetStore/Makefile
|
samples/client/petstore/qt5cpp/PetStore/Makefile
|
||||||
samples/client/petstore/qt5cpp/PetStore/PetStore.pro.user
|
samples/client/petstore/qt5cpp/PetStore/PetStore.pro.user
|
||||||
|
|
||||||
|
# cpprestsdk
|
||||||
|
samples/client/petstore/cpp-restsdk/CMakeCache.txt
|
||||||
|
samples/client/petstore/cpp-restsdk/CMakeFiles/
|
||||||
|
samples/client/petstore/cpp-restsdk/Makefile
|
||||||
|
samples/client/petstore/cpp-restsdk/cmake_install.cmake
|
||||||
|
|
||||||
#Java/Android
|
#Java/Android
|
||||||
**/.gradle
|
**/.gradle
|
||||||
samples/client/petstore/java/hello.txt
|
samples/client/petstore/java/hello.txt
|
||||||
@@ -82,19 +91,9 @@ samples/client/petstore/scala/build/
|
|||||||
samples/client/petstore/java/resttemplate/hello.txt
|
samples/client/petstore/java/resttemplate/hello.txt
|
||||||
samples/client/petstore/java/retrofit2/hello.txt
|
samples/client/petstore/java/retrofit2/hello.txt
|
||||||
samples/client/petstore/java/feign/hello.txt
|
samples/client/petstore/java/feign/hello.txt
|
||||||
|
samples/client/petstore/java/jersey2-java6/project/
|
||||||
#PHP
|
samples/client/petstore/java/jersey2-java8/project/
|
||||||
samples/client/petstore/php/OpenAPIToolsClient-php/composer.lock
|
samples/client/petstore/java/jersey2/project/
|
||||||
samples/client/petstore/php/OpenAPIToolsClient-php/vendor/
|
|
||||||
samples/client/petstore/silex/SwaggerServer/composer.lock
|
|
||||||
samples/client/petstore/silex/SwaggerServer/venodr/
|
|
||||||
**/vendor/
|
|
||||||
**/composer.lock
|
|
||||||
|
|
||||||
#PHP-Symfony
|
|
||||||
samples/server/petstore/php-symfony/SymfonyBundle-php/Tests/cache/
|
|
||||||
samples/server/petstore/php-symfony/SymfonyBundle-php/Tests/logs/
|
|
||||||
|
|
||||||
|
|
||||||
# Perl
|
# Perl
|
||||||
samples/client/petstore/perl/deep_module_test/
|
samples/client/petstore/perl/deep_module_test/
|
||||||
@@ -118,19 +117,18 @@ samples/client/petstore/swift/**/SwaggerClientTests/SwaggerClient.xcworkspace/xc
|
|||||||
samples/client/petstore/swift/**/SwaggerClientTests/Pods/
|
samples/client/petstore/swift/**/SwaggerClientTests/Pods/
|
||||||
#samples/client/petstore/swift/**/SwaggerClientTests/Pods/Pods.xcodeproj/xcuserdata
|
#samples/client/petstore/swift/**/SwaggerClientTests/Pods/Pods.xcodeproj/xcuserdata
|
||||||
#samples/client/petstore/swift/**/SwaggerClientTests/Pods/Pods.xcodeproj/xcshareddata/xcschemes
|
#samples/client/petstore/swift/**/SwaggerClientTests/Pods/Pods.xcodeproj/xcshareddata/xcschemes
|
||||||
samples/client/petstore/swift/**/SwaggerClientTests/Podfile.lock
|
samples/client/petstore/swift/**/SwaggerClientTests/Podfile.lock
|
||||||
# Swift3
|
# Swift3
|
||||||
samples/client/petstore/swift3/**/SwaggerClientTests/SwaggerClient.xcodeproj/xcuserdata
|
samples/client/petstore/swift3/**/SwaggerClientTests/SwaggerClient.xcodeproj/xcuserdata
|
||||||
samples/client/petstore/swift3/**/SwaggerClientTests/SwaggerClient.xcworkspace/xcuserdata
|
samples/client/petstore/swift3/**/SwaggerClientTests/SwaggerClient.xcworkspace/xcuserdata
|
||||||
#samples/client/petstore/swift3/**/SwaggerClientTests/Pods/
|
#samples/client/petstore/swift3/**/SwaggerClientTests/Pods/
|
||||||
#samples/client/petstore/swift3/**/SwaggerClientTests/Pods/Pods.xcodeproj/xcuserdata
|
#samples/client/petstore/swift3/**/SwaggerClientTests/Pods/Pods.xcodeproj/xcuserdata
|
||||||
#samples/client/petstore/swift3/**/SwaggerClientTests/Pods/Pods.xcodeproj/xcshareddata/xcschemes
|
#samples/client/petstore/swift3/**/SwaggerClientTests/Pods/Pods.xcodeproj/xcshareddata/xcschemes
|
||||||
samples/client/petstore/swift3/**/SwaggerClientTests/Podfile.lock
|
samples/client/petstore/swift3/**/SwaggerClientTests/Podfile.lock
|
||||||
|
|
||||||
# C#
|
# C#
|
||||||
*.csproj.user
|
*.csproj.user
|
||||||
samples/client/petstore/csharp/SwaggerClient/IO.Swagger.userprefs
|
samples/client/petstore/csharp/SwaggerClient/IO.Swagger.userprefs
|
||||||
samples/client/petstore/csharp/SwaggerClientTest/.vs
|
|
||||||
samples/client/petstore/csharp/SwaggerClientTest/obj
|
samples/client/petstore/csharp/SwaggerClientTest/obj
|
||||||
samples/client/petstore/csharp/SwaggerClientTest/bin
|
samples/client/petstore/csharp/SwaggerClientTest/bin
|
||||||
samples/client/petstore/csharp/SwaggerClientTest/packages
|
samples/client/petstore/csharp/SwaggerClientTest/packages
|
||||||
@@ -148,6 +146,8 @@ samples/client/petstore/csharp/SwaggerClient/bin/Debug/
|
|||||||
samples/client/petstore/csharp/SwaggerClient/packages
|
samples/client/petstore/csharp/SwaggerClient/packages
|
||||||
samples/client/petstore/csharp/SwaggerClient/TestResult.xml
|
samples/client/petstore/csharp/SwaggerClient/TestResult.xml
|
||||||
samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/IO.Swagger.userprefs
|
samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/IO.Swagger.userprefs
|
||||||
|
samples/client/petstore/csharp-refactor/OpenAPIClient/TestResult.xml
|
||||||
|
samples/client/petstore/csharp-refactor/OpenAPIClient/nuget.exe
|
||||||
|
|
||||||
# Python
|
# Python
|
||||||
*.pyc
|
*.pyc
|
||||||
@@ -157,6 +157,9 @@ samples/client/petstore/python/swagger_client.egg-info/SOURCES.txt
|
|||||||
samples/client/petstore/python/.coverage
|
samples/client/petstore/python/.coverage
|
||||||
samples/client/petstore/python/.projectile
|
samples/client/petstore/python/.projectile
|
||||||
samples/client/petstore/python/.venv/
|
samples/client/petstore/python/.venv/
|
||||||
|
samples/client/petstore/python-asyncio/.venv/
|
||||||
|
samples/client/petstore/python-asyncio/.pytest_cache/
|
||||||
|
samples/client/petstore/python-tornado/.venv/
|
||||||
|
|
||||||
# ts
|
# ts
|
||||||
samples/client/petstore/typescript-node/npm/node_modules
|
samples/client/petstore/typescript-node/npm/node_modules
|
||||||
@@ -177,15 +180,21 @@ samples/client/petstore/kotlin/src/main/kotlin/test/
|
|||||||
samples/client/petstore/kotlin-threetenbp/build
|
samples/client/petstore/kotlin-threetenbp/build
|
||||||
samples/client/petstore/kotlin-string/build
|
samples/client/petstore/kotlin-string/build
|
||||||
samples/server/petstore/kotlin-server/ktor/build
|
samples/server/petstore/kotlin-server/ktor/build
|
||||||
|
samples/openapi3/client/petstore/kotlin/build
|
||||||
\?
|
\?
|
||||||
|
|
||||||
# haskell
|
# haskell
|
||||||
.stack-work
|
.stack-work
|
||||||
.cabal-sandbox
|
.cabal-sandbox
|
||||||
cabal.project.local
|
cabal.project.local
|
||||||
|
samples/client/petstore/haskell-http-client/docs/haddock-bundle.min.js
|
||||||
|
samples/client/petstore/haskell-http-client/docs/meta.json
|
||||||
|
samples/client/petstore/haskell-http-client/docs/quick-jump.css
|
||||||
|
|
||||||
# R
|
# R
|
||||||
.Rproj.user
|
.Rproj.user
|
||||||
|
samples/client/petstore/R/**/petstore.Rcheck/
|
||||||
|
samples/client/petstore/R/**/*.tar.gz
|
||||||
|
|
||||||
# elixir
|
# elixir
|
||||||
samples/client/petstore/elixir/_build/
|
samples/client/petstore/elixir/_build/
|
||||||
@@ -198,6 +207,8 @@ samples/client/petstore/groovy/build
|
|||||||
# erlang
|
# erlang
|
||||||
samples/client/petstore/erlang-client/_build/
|
samples/client/petstore/erlang-client/_build/
|
||||||
samples/client/petstore/erlang-client/rebar.lock
|
samples/client/petstore/erlang-client/rebar.lock
|
||||||
|
samples/client/petstore/erlang-proper/_build/
|
||||||
|
samples/client/petstore/erlang-proper/rebar.lock
|
||||||
samples/server/petstore/erlang-server/_build/
|
samples/server/petstore/erlang-server/_build/
|
||||||
samples/server/petstore/erlang-server/rebar.lock
|
samples/server/petstore/erlang-server/rebar.lock
|
||||||
|
|
||||||
@@ -211,3 +222,7 @@ samples/client/petstore/javascript/package-lock.json
|
|||||||
|
|
||||||
# elm
|
# elm
|
||||||
samples/client/petstore/elm/index.html
|
samples/client/petstore/elm/index.html
|
||||||
|
|
||||||
|
# C
|
||||||
|
samples/client/petstore/c/build
|
||||||
|
samples/client/petstore/c/*.so
|
||||||
|
|||||||
36
.hub.cli.dockerfile
Normal file
36
.hub.cli.dockerfile
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
## The builder labeled image acts as a transient container which is meant to
|
||||||
|
## hold all non-artifact code.
|
||||||
|
##
|
||||||
|
## You can build _just_ this part with:
|
||||||
|
## docker --target builder -t container-name:builder -f .hub.cli.dockerfile .
|
||||||
|
FROM jimschubert/8-jdk-alpine-mvn:1.0 as builder
|
||||||
|
|
||||||
|
RUN set -x && \
|
||||||
|
apk add --no-cache bash
|
||||||
|
|
||||||
|
ENV GEN_DIR /opt/openapi-generator
|
||||||
|
WORKDIR ${GEN_DIR}
|
||||||
|
COPY . ${GEN_DIR}
|
||||||
|
|
||||||
|
# Pre-compile openapi-generator-cli
|
||||||
|
RUN mvn -am -pl "modules/openapi-generator-cli" package
|
||||||
|
|
||||||
|
## The final (release) image
|
||||||
|
## The resulting container here only needs the target jar
|
||||||
|
## and ca-certificates (to be able to query HTTPS hosted specs)
|
||||||
|
FROM openjdk:8-jre-alpine
|
||||||
|
|
||||||
|
ENV GEN_DIR /opt/openapi-generator
|
||||||
|
|
||||||
|
RUN apk --no-cache add ca-certificates bash
|
||||||
|
RUN mkdir -p ${GEN_DIR}/modules/openapi-generator-cli/target
|
||||||
|
|
||||||
|
WORKDIR ${GEN_DIR}/modules/openapi-generator-cli/target
|
||||||
|
|
||||||
|
COPY --from=builder ${GEN_DIR}/modules/openapi-generator-cli/target/openapi-generator-cli.jar ${GEN_DIR}/modules/openapi-generator-cli/target/openapi-generator-cli.jar
|
||||||
|
|
||||||
|
COPY docker-entrypoint.sh /usr/local/bin/
|
||||||
|
|
||||||
|
ENTRYPOINT ["docker-entrypoint.sh"]
|
||||||
|
|
||||||
|
CMD ["help"]
|
||||||
35
.hub.online.dockerfile
Normal file
35
.hub.online.dockerfile
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
## The builder labeled image acts as a transient container which is meant to
|
||||||
|
## hold all non-artifact code.
|
||||||
|
##
|
||||||
|
## You can build _just_ this part with:
|
||||||
|
## docker --target builder -t container-name:builder -f .hub.online.dockerfile .
|
||||||
|
FROM jimschubert/8-jdk-alpine-mvn:1.0 as builder
|
||||||
|
|
||||||
|
RUN set -x && \
|
||||||
|
apk add --no-cache bash
|
||||||
|
|
||||||
|
ENV GEN_DIR /opt/openapi-generator
|
||||||
|
WORKDIR ${GEN_DIR}
|
||||||
|
COPY . ${GEN_DIR}
|
||||||
|
|
||||||
|
# Pre-compile openapi-generator-online
|
||||||
|
RUN mvn -am -pl "modules/openapi-generator-online" package
|
||||||
|
|
||||||
|
## The final (release) image
|
||||||
|
## The resulting container here only needs the target jar
|
||||||
|
FROM openjdk:8-jre-alpine
|
||||||
|
|
||||||
|
ENV GEN_DIR /opt/openapi-generator
|
||||||
|
ENV TARGET_DIR /generator
|
||||||
|
|
||||||
|
RUN mkdir -p ${TARGET_DIR}
|
||||||
|
|
||||||
|
WORKDIR ${TARGET_DIR}
|
||||||
|
|
||||||
|
COPY --from=builder ${GEN_DIR}/modules/openapi-generator-online/target/openapi-generator-online.jar ${TARGET_DIR}/openapi-generator-online.jar
|
||||||
|
|
||||||
|
ENV GENERATOR_HOST=http://localhost
|
||||||
|
|
||||||
|
EXPOSE 8080
|
||||||
|
|
||||||
|
CMD ["java", "-jar", "/generator/openapi-generator-online.jar"]
|
||||||
105
.travis.yml
105
.travis.yml
@@ -9,8 +9,9 @@ cache:
|
|||||||
- $HOME/.ivy2
|
- $HOME/.ivy2
|
||||||
- $HOME/.gradle/caches/
|
- $HOME/.gradle/caches/
|
||||||
- $HOME/.gradle/wrapper/
|
- $HOME/.gradle/wrapper/
|
||||||
|
- $HOME/samples/client/petstore/javascript/node_modules
|
||||||
- $HOME/samples/client/petstore/php/OpenAPIToolsClient-php/vendor
|
- $HOME/samples/client/petstore/php/OpenAPIToolsClient-php/vendor
|
||||||
- $HOME/samples/client/petstore/ruby/venodr/bundle
|
- $HOME/samples/client/petstore/ruby/vendor/bundle
|
||||||
- $HOME/samples/client/petstore/python/.venv/
|
- $HOME/samples/client/petstore/python/.venv/
|
||||||
- $HOME/samples/client/petstore/typescript-node/npm/node_modules
|
- $HOME/samples/client/petstore/typescript-node/npm/node_modules
|
||||||
- $HOME/samples/client/petstore/typescript-node/npm/typings/
|
- $HOME/samples/client/petstore/typescript-node/npm/typings/
|
||||||
@@ -24,28 +25,37 @@ cache:
|
|||||||
- $HOME/samples/client/petstore/typescript-fetch/npm/with-npm-version/typings
|
- $HOME/samples/client/petstore/typescript-fetch/npm/with-npm-version/typings
|
||||||
- $HOME/samples/client/petstore/typescript-angular/node_modules
|
- $HOME/samples/client/petstore/typescript-angular/node_modules
|
||||||
- $HOME/samples/client/petstore/typescript-angular/typings
|
- $HOME/samples/client/petstore/typescript-angular/typings
|
||||||
|
- $HOME/samples/server/petstore/rust-server/target
|
||||||
- $HOME/perl5
|
- $HOME/perl5
|
||||||
|
- $HOME/.cargo
|
||||||
|
- $HOME/.pub-cache
|
||||||
|
- $HOME/samples/server/petstore/cpp-pistache/pistache
|
||||||
|
- $HOME/.npm
|
||||||
|
- $HOME/.rvm/gems/ruby-2.4.1
|
||||||
|
- $HOME/website/node_modules/
|
||||||
|
|
||||||
services:
|
services:
|
||||||
- docker
|
- docker
|
||||||
|
|
||||||
# comment out the host table change to use the public petstore server
|
# comment out the host table change to use the public petstore server
|
||||||
addons:
|
addons:
|
||||||
|
apt:
|
||||||
|
sources:
|
||||||
|
- ubuntu-toolchain-r-test
|
||||||
|
packages:
|
||||||
|
- g++-5
|
||||||
|
chrome: stable
|
||||||
hosts:
|
hosts:
|
||||||
- petstore.swagger.io
|
- petstore.swagger.io
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
# install haskell
|
|
||||||
- curl -sSL https://get.haskellstack.org/ | sh
|
|
||||||
- stack upgrade
|
|
||||||
- stack --version
|
|
||||||
# install rust
|
# install rust
|
||||||
- curl -sSf https://static.rust-lang.org/rustup.sh | sh
|
- curl https://sh.rustup.rs -sSf | sh -s -- -y -v
|
||||||
# required when sudo: required for the Ruby petstore tests
|
# required when sudo: required for the Ruby petstore tests
|
||||||
- gem install bundler
|
- gem install bundler
|
||||||
- npm install -g typescript
|
- npm install -g typescript
|
||||||
- npm install -g npm
|
- npm install -g npm
|
||||||
- npm install -g elm
|
- npm install -g elm@0.18.0-exp5
|
||||||
- npm config set registry http://registry.npmjs.org/
|
- npm config set registry http://registry.npmjs.org/
|
||||||
# set python 3.6.3 as default
|
# set python 3.6.3 as default
|
||||||
- source ~/virtualenv/python3.6/bin/activate
|
- source ~/virtualenv/python3.6/bin/activate
|
||||||
@@ -54,10 +64,20 @@ before_install:
|
|||||||
- docker run -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore
|
- docker run -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore
|
||||||
- docker ps -a
|
- docker ps -a
|
||||||
# Add bats test framework and cURL for Bash script integration tests
|
# Add bats test framework and cURL for Bash script integration tests
|
||||||
- sudo add-apt-repository ppa:duggan/bats --yes
|
#- sudo add-apt-repository ppa:duggan/bats --yes
|
||||||
- sudo apt-get update -qq
|
#- sudo apt-get update -qq
|
||||||
- sudo apt-get install -qq bats
|
#- sudo apt-get install -qq bats
|
||||||
- sudo apt-get install -qq curl
|
#- sudo apt-get install -qq curl
|
||||||
|
# install dart
|
||||||
|
#- sudo apt-get update
|
||||||
|
#- sudo apt-get install apt-transport-https
|
||||||
|
#- sudo sh -c 'curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -'
|
||||||
|
#- sudo sh -c 'curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list'
|
||||||
|
#- sudo apt-get update
|
||||||
|
#- sudo apt-get install dart
|
||||||
|
# switch to php7
|
||||||
|
- phpenv global 7.1
|
||||||
|
- php -v
|
||||||
# install perl module
|
# install perl module
|
||||||
#- cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
|
#- cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
|
||||||
#- cpanm Test::Exception Test::More Log::Any LWP::UserAgent JSON URI:Query Module::Runtime DateTime Module::Find Moose::Role
|
#- cpanm Test::Exception Test::More Log::Any LWP::UserAgent JSON URI:Query Module::Runtime DateTime Module::Find Moose::Role
|
||||||
@@ -72,13 +92,24 @@ before_install:
|
|||||||
- cat /etc/hosts
|
- cat /etc/hosts
|
||||||
# show java version
|
# show java version
|
||||||
- java -version
|
- java -version
|
||||||
|
- if [ "$TRAVIS_BRANCH" = "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
|
||||||
|
openssl aes-256-cbc -K $encrypted_6e2c8bba47c6_key -iv $encrypted_6e2c8bba47c6_iv -in sec.gpg.enc -out sec.gpg -d ;
|
||||||
|
gpg --keyserver keyserver.ubuntu.com --recv-key $SIGNING_KEY ;
|
||||||
|
gpg --check-trustdb ;
|
||||||
|
fi;
|
||||||
|
- pushd .; cd website; npm install; popd
|
||||||
|
|
||||||
install:
|
install:
|
||||||
# Add Godeps dependencies to GOPATH and PATH
|
# Add Godeps dependencies to GOPATH and PATH
|
||||||
- eval "$(curl -sL https://raw.githubusercontent.com/travis-ci/gimme/master/gimme | GIMME_GO_VERSION=1.4 bash)"
|
#- eval "$(curl -sL https://raw.githubusercontent.com/travis-ci/gimme/master/gimme | GIMME_GO_VERSION=1.4 bash)"
|
||||||
- export GOPATH="${TRAVIS_BUILD_DIR}/Godeps/_workspace"
|
#- export GOPATH="${TRAVIS_BUILD_DIR}/Godeps/_workspace"
|
||||||
- export PATH="${TRAVIS_BUILD_DIR}/Godeps/_workspace/bin:$PATH"
|
- export PATH="${TRAVIS_BUILD_DIR}/Godeps/_workspace/bin:$HOME/.cargo/bin:$PATH:/usr/lib/dart/bin"
|
||||||
- go version
|
#- go version
|
||||||
|
- gcc -v
|
||||||
|
- echo $CC
|
||||||
|
- echo $CXX
|
||||||
|
#- pub version
|
||||||
|
#- dart --version
|
||||||
|
|
||||||
script:
|
script:
|
||||||
# fail fast
|
# fail fast
|
||||||
@@ -90,18 +121,46 @@ script:
|
|||||||
# fail if generators contain tab '\t'
|
# fail if generators contain tab '\t'
|
||||||
- /bin/bash ./bin/utils/detect_tab_in_java_class.sh
|
- /bin/bash ./bin/utils/detect_tab_in_java_class.sh
|
||||||
# run integration tests defined in maven pom.xml
|
# run integration tests defined in maven pom.xml
|
||||||
- mvn --quiet clean install
|
- ./run-in-docker.sh mvn --quiet --batch-mode clean install
|
||||||
- mvn --quiet verify -Psamples
|
- mvn --quiet --batch-mode verify -Psamples
|
||||||
after_success:
|
after_success:
|
||||||
# push a snapshot version to maven repo
|
# push to maven repo
|
||||||
- if [ $SONATYPE_USERNAME ] && [ -z $TRAVIS_TAG ] && [ "$TRAVIS_BRANCH" = "master" ]; then
|
- if [ $SONATYPE_USERNAME ] && [ -z $TRAVIS_TAG ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
|
||||||
mvn clean deploy --settings CI/settings.xml;
|
if [ "$TRAVIS_BRANCH" = "master" ]; then
|
||||||
echo "Finished mvn clean deploy for $TRAVIS_BRANCH";
|
mvn clean deploy -DskipTests=true -B -U -P release --settings CI/settings.xml;
|
||||||
|
echo "Finished mvn clean deploy for $TRAVIS_BRANCH";
|
||||||
|
pushd .;
|
||||||
|
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;
|
||||||
|
echo "Finished mvn clean deploy for $TRAVIS_BRANCH";
|
||||||
|
pushd .;
|
||||||
|
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;
|
fi;
|
||||||
## docker: build and push openapi-generator-online to DockerHub
|
## docker: build and push openapi-generator-online to DockerHub
|
||||||
- if [ $DOCKER_HUB_USERNAME ]; then echo "$DOCKER_HUB_PASSWORD" | docker login --username=$DOCKER_HUB_USERNAME --password-stdin && docker build -t $DOCKER_GENERATOR_IMAGE_NAME ./modules/openapi-generator-online && if [ ! -z "$TRAVIS_TAG" ]; then docker tag $DOCKER_GENERATOR_IMAGE_NAME:latest $DOCKER_GENERATOR_IMAGE_NAME:$TRAVIS_TAG; fi && if [ ! -z "$TRAVIS_TAG" ] || [ "$TRAVIS_BRANCH" = "master" ]; then docker push $DOCKER_GENERATOR_IMAGE_NAME && echo "Pushed to $DOCKER_GENERATOR_IMAGE_NAME"; fi; fi
|
- if [ $DOCKER_HUB_USERNAME ]; then echo "$DOCKER_HUB_PASSWORD" | docker login --username=$DOCKER_HUB_USERNAME --password-stdin && docker build -t $DOCKER_GENERATOR_IMAGE_NAME ./modules/openapi-generator-online && if [ ! -z "$TRAVIS_TAG" ]; then docker tag $DOCKER_GENERATOR_IMAGE_NAME:latest $DOCKER_GENERATOR_IMAGE_NAME:$TRAVIS_TAG; fi && if [ ! -z "$TRAVIS_TAG" ] || [ "$TRAVIS_BRANCH" = "master" ]; then docker push $DOCKER_GENERATOR_IMAGE_NAME && echo "Pushed to $DOCKER_GENERATOR_IMAGE_NAME"; fi; fi
|
||||||
## docker: build cli image and push to Docker Hub
|
## docker: build cli image and push to Docker Hub
|
||||||
- if [ $DOCKER_HUB_USERNAME ]; then echo "$DOCKER_HUB_PASSWORD" | docker login --username=$DOCKER_HUB_USERNAME --password-stdin && docker build -t $DOCKER_CODEGEN_CLI_IMAGE_NAME ./modules/openapi-generator-cli && if [ ! -z "$TRAVIS_TAG" ]; then docker tag $DOCKER_CODEGEN_CLI_IMAGE_NAME:latest $DOCKER_CODEGEN_CLI_IMAGE_NAME:$TRAVIS_TAG; fi && if [ ! -z "$TRAVIS_TAG" ] || [ "$TRAVIS_BRANCH" = "master" ]; then docker push $DOCKER_CODEGEN_CLI_IMAGE_NAME && echo "Pushed to $DOCKER_CODEGEN_CLI_IMAGE_NAME"; fi; fi
|
- if [ $DOCKER_HUB_USERNAME ]; then echo "$DOCKER_HUB_PASSWORD" | docker login --username=$DOCKER_HUB_USERNAME --password-stdin && cp docker-entrypoint.sh ./modules/openapi-generator-cli && docker build -t $DOCKER_CODEGEN_CLI_IMAGE_NAME ./modules/openapi-generator-cli && if [ ! -z "$TRAVIS_TAG" ]; then docker tag $DOCKER_CODEGEN_CLI_IMAGE_NAME:latest $DOCKER_CODEGEN_CLI_IMAGE_NAME:$TRAVIS_TAG; fi && if [ ! -z "$TRAVIS_TAG" ] || [ "$TRAVIS_BRANCH" = "master" ]; then docker push $DOCKER_CODEGEN_CLI_IMAGE_NAME && echo "Pushed to $DOCKER_CODEGEN_CLI_IMAGE_NAME"; fi; fi
|
||||||
|
## publish latest website, variables below are secure environment variables which are unavailable to PRs from forks.
|
||||||
|
- if [ "$TRAVIS_BRANCH" = "master" ] && [ -z $TRAVIS_TAG ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
|
||||||
|
cd website;
|
||||||
|
git config --global user.name "${GH_NAME}";
|
||||||
|
git config --global user.email "${GH_EMAIL}";
|
||||||
|
echo "machine github.com login ${GH_NAME} password ${GH_TOKEN}" > ~/.netrc;
|
||||||
|
npm install;
|
||||||
|
GIT_USER="${GH_NAME}" npm run-script publish-gh-pages;
|
||||||
|
fi;
|
||||||
|
|
||||||
env:
|
env:
|
||||||
- DOCKER_GENERATOR_IMAGE_NAME=openapitools/openapi-generator-online DOCKER_CODEGEN_CLI_IMAGE_NAME=openapitools/openapi-generator-cli
|
- DOCKER_GENERATOR_IMAGE_NAME=openapitools/openapi-generator-online DOCKER_CODEGEN_CLI_IMAGE_NAME=openapitools/openapi-generator-cli NODE_ENV=test CC=gcc-5 CXX=g++-5
|
||||||
|
|||||||
29
CI/.travis.yml.jdk6
Normal file
29
CI/.travis.yml.jdk6
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
dist: trusty
|
||||||
|
sudo: required
|
||||||
|
language: java
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- openjdk-6-jdk
|
||||||
|
jdk: openjdk6
|
||||||
|
|
||||||
|
cache:
|
||||||
|
directories:
|
||||||
|
- $HOME/.m2
|
||||||
|
- $HOME/.ivy2
|
||||||
|
- $HOME/.gradle/caches/
|
||||||
|
- $HOME/.gradle/wrapper/
|
||||||
|
|
||||||
|
install:
|
||||||
|
- jdk_switcher use openjdk6
|
||||||
|
- java -version
|
||||||
|
- curl -s "https://get.sdkman.io" | bash
|
||||||
|
- source "$HOME/.sdkman/bin/sdkman-init.sh"
|
||||||
|
- sdk version
|
||||||
|
- sdk install gradle 2.9
|
||||||
|
- sdk list gradle
|
||||||
|
- sdk version
|
||||||
|
- gradle --version
|
||||||
|
|
||||||
|
script:
|
||||||
|
- cd samples/client/petstore/java/jersey2-java6 && gradle test
|
||||||
49
CI/circle_parallel.sh
Executable file
49
CI/circle_parallel.sh
Executable file
@@ -0,0 +1,49 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# A bash script to run CircleCI node/test in parallel
|
||||||
|
#
|
||||||
|
|
||||||
|
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
|
||||||
|
# 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
|
||||||
|
java -version
|
||||||
|
#cp CI/pom.xml.circleci.java7 pom.xml
|
||||||
|
mvn --quiet verify -Psamples.circleci.jdk7
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
941
CI/pom.xml.bash
941
CI/pom.xml.bash
@@ -1,941 +0,0 @@
|
|||||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
|
||||||
<parent>
|
|
||||||
<groupId>org.sonatype.oss</groupId>
|
|
||||||
<artifactId>oss-parent</artifactId>
|
|
||||||
<version>5</version>
|
|
||||||
</parent>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<groupId>org.openapitools</groupId>
|
|
||||||
<artifactId>openapi-generator-project</artifactId>
|
|
||||||
<packaging>pom</packaging>
|
|
||||||
<name>openapi-generator-project</name>
|
|
||||||
<version>3.0.0</version>
|
|
||||||
<url>https://github.com/openapi-tools/openapi-generator</url>
|
|
||||||
<scm>
|
|
||||||
<connection>scm:git:git@github.com:openapi-tools/openapi-generator.git</connection>
|
|
||||||
<developerConnection>scm:git:git@github.com:openapi-tools/openapi-generator.git</developerConnection>
|
|
||||||
<url>https://github.com/openapi-tools/openapi-generator</url>
|
|
||||||
</scm>
|
|
||||||
<developers>
|
|
||||||
<!-- original author of the project -->
|
|
||||||
<developer>
|
|
||||||
<id>fehguy</id>
|
|
||||||
<name>Tony Tam</name>
|
|
||||||
<email>fehguy@gmail.com</email>
|
|
||||||
</developer>
|
|
||||||
<!-- openapi-generator core team -->
|
|
||||||
<developer>
|
|
||||||
<id>wing328</id>
|
|
||||||
<name>William Cheng</name>
|
|
||||||
<email>wing328hk@gmail.com</email>
|
|
||||||
</developer>
|
|
||||||
<developer>
|
|
||||||
<id>jimschubert</id>
|
|
||||||
<name>Jim Schubert</name>
|
|
||||||
<email>james.schubert@gmail.com</email>
|
|
||||||
</developer>
|
|
||||||
<developer>
|
|
||||||
<id>cbornet</id>
|
|
||||||
<name>Christophe Bornet</name>
|
|
||||||
</developer>
|
|
||||||
<developer>
|
|
||||||
<id>jaz-ah</id>
|
|
||||||
<name>Joseph Zuromski</name>
|
|
||||||
</developer>
|
|
||||||
<developer>
|
|
||||||
<id>ackintosh</id>
|
|
||||||
<name>Akihito Nakano</name>
|
|
||||||
</developer>
|
|
||||||
<developer>
|
|
||||||
<id>JFCote</id>
|
|
||||||
<name>Jean-François Côté</name>
|
|
||||||
</developer>
|
|
||||||
<developer>
|
|
||||||
<id>jmini</id>
|
|
||||||
<name>Jérémie Bresson</name>
|
|
||||||
<email>dev@jmini.fr</email>
|
|
||||||
</developer>
|
|
||||||
</developers>
|
|
||||||
<issueManagement>
|
|
||||||
<system>github</system>
|
|
||||||
<url>https://github.com/openapi-tools/openapi-generator/issues</url>
|
|
||||||
</issueManagement>
|
|
||||||
<licenses>
|
|
||||||
<license>
|
|
||||||
<name>Apache License 2.0</name>
|
|
||||||
<url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
|
|
||||||
<distribution>repo</distribution>
|
|
||||||
</license>
|
|
||||||
</licenses>
|
|
||||||
<build>
|
|
||||||
<sourceDirectory>src/main/java</sourceDirectory>
|
|
||||||
<outputDirectory>target/classes</outputDirectory>
|
|
||||||
<extensions>
|
|
||||||
<extension>
|
|
||||||
<groupId>org.jvnet.wagon-svn</groupId>
|
|
||||||
<artifactId>wagon-svn</artifactId>
|
|
||||||
<version>1.8</version>
|
|
||||||
</extension>
|
|
||||||
<extension>
|
|
||||||
<groupId>org.apache.maven.wagon</groupId>
|
|
||||||
<artifactId>wagon-ssh-external</artifactId>
|
|
||||||
<version>1.0-alpha-6</version>
|
|
||||||
</extension>
|
|
||||||
<extension>
|
|
||||||
<groupId>org.apache.maven.wagon</groupId>
|
|
||||||
<artifactId>wagon-webdav</artifactId>
|
|
||||||
<version>1.0-beta-1</version>
|
|
||||||
</extension>
|
|
||||||
</extensions>
|
|
||||||
<defaultGoal>install</defaultGoal>
|
|
||||||
<directory>target</directory>
|
|
||||||
<finalName>${project.artifactId}-${project.version}</finalName>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>net.revelc.code</groupId>
|
|
||||||
<artifactId>formatter-maven-plugin</artifactId>
|
|
||||||
<!-- Uncomment this to format before checkstyle -->
|
|
||||||
<!-- <executions>
|
|
||||||
<execution>
|
|
||||||
<id>format</id>
|
|
||||||
<phase>validate</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>format</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions> -->
|
|
||||||
<configuration>
|
|
||||||
<compilerSource>1.8</compilerSource>
|
|
||||||
<compilerCompliance>1.8</compilerCompliance>
|
|
||||||
<compilerTargetPlatform>1.8</compilerTargetPlatform>
|
|
||||||
<lineEnding>LF</lineEnding>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<!--<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
|
||||||
<version>2.17</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>validate</id>
|
|
||||||
<phase>validate</phase>
|
|
||||||
<configuration>
|
|
||||||
<configLocation>google_checkstyle.xml</configLocation>
|
|
||||||
Don't include generated sources a la http://stackoverflow.com/a/30406454
|
|
||||||
<sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
|
|
||||||
<encoding>UTF-8</encoding>
|
|
||||||
<consoleOutput>true</consoleOutput>
|
|
||||||
<failsOnError>true</failsOnError>
|
|
||||||
<linkXRef>false</linkXRef>
|
|
||||||
</configuration>
|
|
||||||
<goals>
|
|
||||||
<goal>check</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.puppycrawl.tools</groupId>
|
|
||||||
<artifactId>checkstyle</artifactId>
|
|
||||||
<version>6.19</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
</plugin>-->
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
|
||||||
<version>${surefire-version}</version>
|
|
||||||
<configuration>
|
|
||||||
<testNGArtifactName>none:none</testNGArtifactName>
|
|
||||||
<argLine>-XX:+StartAttachListener</argLine>
|
|
||||||
</configuration>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>test-testng</id>
|
|
||||||
<phase>test</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>test</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<junitArtifactName>none:none</junitArtifactName>
|
|
||||||
<testNGArtifactName>org.testng:testng</testNGArtifactName>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-dependency-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<phase>package</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>copy-dependencies</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<outputDirectory>${project.build.directory}/lib</outputDirectory>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
|
||||||
<version>3.6.1</version>
|
|
||||||
<configuration>
|
|
||||||
<source>1.8</source>
|
|
||||||
<target>1.8</target>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-jar-plugin</artifactId>
|
|
||||||
<version>3.0.2</version>
|
|
||||||
<configuration>
|
|
||||||
<archive>
|
|
||||||
<manifestEntries>
|
|
||||||
<mode>development</mode>
|
|
||||||
<url>${project.url}</url>
|
|
||||||
<implementation-version>${project.version}</implementation-version>
|
|
||||||
<package>org.openapi-tools</package>
|
|
||||||
</manifestEntries>
|
|
||||||
</archive>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-site-plugin</artifactId>
|
|
||||||
<version>3.5.1</version>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-release-plugin</artifactId>
|
|
||||||
<version>2.5.3</version>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
|
||||||
<version>2.10.4</version>
|
|
||||||
<configuration>
|
|
||||||
<aggregate>true</aggregate>
|
|
||||||
<source>1.8</source>
|
|
||||||
<encoding>UTF-8</encoding>
|
|
||||||
<maxmemory>1g</maxmemory>
|
|
||||||
<excludePackageNames>${javadoc.package.exclude}</excludePackageNames>
|
|
||||||
</configuration>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>attach-javadocs</id>
|
|
||||||
<phase>verify</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>jar</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-source-plugin</artifactId>
|
|
||||||
<version>3.0.1</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>attach-sources</id>
|
|
||||||
<phase>verify</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>jar-no-fork</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-enforcer-plugin</artifactId>
|
|
||||||
<version>1.4.1</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>enforce-versions</id>
|
|
||||||
<goals>
|
|
||||||
<goal>enforce</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<rules>
|
|
||||||
<requireMavenVersion>
|
|
||||||
<version>3.2.5</version>
|
|
||||||
</requireMavenVersion>
|
|
||||||
</rules>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
<pluginManagement>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>net.revelc.code</groupId>
|
|
||||||
<artifactId>formatter-maven-plugin</artifactId>
|
|
||||||
<version>0.5.2</version>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</pluginManagement>
|
|
||||||
</build>
|
|
||||||
<profiles>
|
|
||||||
<profile>
|
|
||||||
<id>release-profile</id>
|
|
||||||
<properties>
|
|
||||||
<skipTests>true</skipTests>
|
|
||||||
</properties>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>net.alchim31.maven</groupId>
|
|
||||||
<artifactId>scala-maven-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<goals>
|
|
||||||
<goal>compile</goal>
|
|
||||||
<goal>testCompile</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
<configuration/>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>build-helper-maven-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>add-source</id>
|
|
||||||
<phase>prepare-package</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>add-source</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<sources>
|
|
||||||
<source>src/main/scala</source>
|
|
||||||
</sources>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>release-sign-artifacts</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>performRelease</name>
|
|
||||||
<value>true</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-gpg-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>sign-artifacts</id>
|
|
||||||
<phase>verify</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>sign</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</profile>
|
|
||||||
<!-- Samples -->
|
|
||||||
<profile>
|
|
||||||
<id>android-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/android/volley</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>bash-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/bash</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>clojure-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>clojure</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/clojure</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>haskell-http-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>haskell-http-client</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/haskell-http-client</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>haskell-http-client-integration-test</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>haskell-http-client</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/haskell-http-client/tests-integration</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-client-jersey1</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/java/jersey1</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-client-jersey2</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/java/jersey2</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-client-jersey2-java6</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/java/jersey2-java6</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-client-okhttp-gson</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/java/okhttp-gson</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-client-okhttp-gson-parcelable</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/java/okhttp-gson/parcelableModel</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-client-retrofit</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/java/retrofit</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-client-retrofit2</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/java/retrofit2</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-client-retrofit2-rx</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/java/retrofit2rx</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-client-feign</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/java/feign</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>javascript-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>javascript</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/javascript</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>scala-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>scala</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/scala</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-msf4j-server</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/java-msf4/</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>jaxrs-cxf-server</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/jaxrs-cxf</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>jaxrs-resteasy-server</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/jaxrs-resteasy/default</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>jaxrs-resteasy-server-joda</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/jaxrs-resteasy/joda</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>jaxrs-resteasy-eap-server</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/jaxrs-resteasy/eap</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>jaxrs-resteasy-eap-server-joda</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/jaxrs-resteasy/eap-joda</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>jaxrs-server</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/jaxrs/jersey2</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>jaxrs-server-jersey1</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/jaxrs/jersey1</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>typescript-fetch-client-tests-default</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/typescript-fetch/tests/default</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>typescript-fetch-client-builds-default</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/typescript-fetch/builds/default</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>typescript-fetch-client-builds-es6-target</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/typescript-fetch/builds/es6-target</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>typescript-fetch-client-builds-with-npm-version</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/typescript-fetch/builds/with-npm-version</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>typescript-angularjs-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/typescript-angularjs/npm</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>typescript-node-npm-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/typescript-node/npm</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>python-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/python</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>ruby-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/ruby</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>go-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/go</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>spring-mvc</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/spring-mvc</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>springboot-beanvalidation</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/springboot-beanvalidation</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>springboot-reactive</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/springboot-reactive</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>springboot</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/springboot</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>spring-cloud</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/spring-cloud</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>scalatra-server</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/scalatra</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-inflector</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/java-inflector</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-undertowr</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/undertow</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>samples</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>samples</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/bash</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
</profiles>
|
|
||||||
<modules>
|
|
||||||
<module>modules/openapi-generator</module>
|
|
||||||
<module>modules/openapi-generator-cli</module>
|
|
||||||
<module>modules/openapi-generator-maven-plugin</module>
|
|
||||||
<module>modules/openapi-generator-online</module>
|
|
||||||
</modules>
|
|
||||||
<reporting>
|
|
||||||
<outputDirectory>target/site</outputDirectory>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>net.alchim31.maven</groupId>
|
|
||||||
<artifactId>scala-maven-plugin</artifactId>
|
|
||||||
<version>${scala-maven-plugin-version}</version>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-jxr-plugin</artifactId>
|
|
||||||
<version>2.5</version>
|
|
||||||
<configuration>
|
|
||||||
<aggregate>true</aggregate>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-project-info-reports-plugin</artifactId>
|
|
||||||
<version>2.9</version>
|
|
||||||
<reportSets>
|
|
||||||
<reportSet>
|
|
||||||
<reports>
|
|
||||||
<report>project-team</report>
|
|
||||||
</reports>
|
|
||||||
</reportSet>
|
|
||||||
</reportSets>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</reporting>
|
|
||||||
<dependencyManagement>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<version>${junit-version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.testng</groupId>
|
|
||||||
<artifactId>testng</artifactId>
|
|
||||||
<version>${testng-version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jmockit</groupId>
|
|
||||||
<artifactId>jmockit</artifactId>
|
|
||||||
<version>${jmockit-version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
</dependencyManagement>
|
|
||||||
<repositories>
|
|
||||||
<repository>
|
|
||||||
<id>sonatype-snapshots</id>
|
|
||||||
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
|
|
||||||
<snapshots>
|
|
||||||
<enabled>true</enabled>
|
|
||||||
</snapshots>
|
|
||||||
</repository>
|
|
||||||
</repositories>
|
|
||||||
<properties>
|
|
||||||
<swagger-parser-version>2.0.1</swagger-parser-version>
|
|
||||||
<swagger-core-version>2.0.1</swagger-core-version>
|
|
||||||
<scala-version>2.11.1</scala-version>
|
|
||||||
<felix-version>3.3.0</felix-version>
|
|
||||||
<commons-io-version>2.4</commons-io-version>
|
|
||||||
<commons-cli-version>1.2</commons-cli-version>
|
|
||||||
<junit-version>4.8.1</junit-version>
|
|
||||||
<jackson-version>2.8.9</jackson-version>
|
|
||||||
<maven-plugin-version>1.0.0</maven-plugin-version>
|
|
||||||
<commons-lang-version>3.4</commons-lang-version>
|
|
||||||
<slf4j-version>1.7.12</slf4j-version>
|
|
||||||
<scala-maven-plugin-version>3.2.1</scala-maven-plugin-version>
|
|
||||||
<jmustache-version>1.14</jmustache-version>
|
|
||||||
<testng-version>6.9.6</testng-version>
|
|
||||||
<surefire-version>2.19.1</surefire-version>
|
|
||||||
<jmockit-version>1.25</jmockit-version>
|
|
||||||
<reflections-version>0.9.10</reflections-version>
|
|
||||||
<spring-boot-version>2.0.2.RELEASE</spring-boot-version>
|
|
||||||
</properties>
|
|
||||||
</project>
|
|
||||||
@@ -1,990 +0,0 @@
|
|||||||
<!-- for integration tests with Java8 -->
|
|
||||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
|
||||||
<parent>
|
|
||||||
<groupId>org.sonatype.oss</groupId>
|
|
||||||
<artifactId>oss-parent</artifactId>
|
|
||||||
<version>5</version>
|
|
||||||
</parent>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<groupId>org.openapitools</groupId>
|
|
||||||
<artifactId>openapi-generator-project</artifactId>
|
|
||||||
<packaging>pom</packaging>
|
|
||||||
<name>openapi-generator-project</name>
|
|
||||||
<version>3.0.0</version>
|
|
||||||
<url>https://github.com/openapitools/openapi-generator</url>
|
|
||||||
<scm>
|
|
||||||
<connection>scm:git:git@github.com:openapitools/openapi-generator.git</connection>
|
|
||||||
<developerConnection>scm:git:git@github.com:openapitools/openapi-generator.git</developerConnection>
|
|
||||||
<url>https://github.com/openapitools/openapi-generator</url>
|
|
||||||
</scm>
|
|
||||||
<prerequisites>
|
|
||||||
<maven>2.2.0</maven>
|
|
||||||
</prerequisites>
|
|
||||||
<developers>
|
|
||||||
<!-- original author of the project -->
|
|
||||||
<developer>
|
|
||||||
<id>fehguy</id>
|
|
||||||
<name>Tony Tam</name>
|
|
||||||
<email>fehguy@gmail.com</email>
|
|
||||||
</developer>
|
|
||||||
<!-- openapi-generator core team -->
|
|
||||||
<developer>
|
|
||||||
<id>wing328</id>
|
|
||||||
<name>William Cheng</name>
|
|
||||||
<email>wing328hk@gmail.com</email>
|
|
||||||
</developer>
|
|
||||||
<developer>
|
|
||||||
<id>jimschubert</id>
|
|
||||||
<name>Jim Schubert</name>
|
|
||||||
<email>james.schubert@gmail.com</email>
|
|
||||||
</developer>
|
|
||||||
<developer>
|
|
||||||
<id>cbornet</id>
|
|
||||||
<name>Christophe Bornet</name>
|
|
||||||
</developer>
|
|
||||||
<developer>
|
|
||||||
<id>jaz-ah</id>
|
|
||||||
<name>Joseph Zuromski</name>
|
|
||||||
</developer>
|
|
||||||
<developer>
|
|
||||||
<id>ackintosh</id>
|
|
||||||
<name>Akihito Nakano</name>
|
|
||||||
</developer>
|
|
||||||
<developer>
|
|
||||||
<id>JFCote</id>
|
|
||||||
<name>Jean-François Côté</name>
|
|
||||||
</developer>
|
|
||||||
<developer>
|
|
||||||
<id>jmini</id>
|
|
||||||
<name>Jérémie Bresson</name>
|
|
||||||
<email>dev@jmini.fr</email>
|
|
||||||
</developer>
|
|
||||||
</developers>
|
|
||||||
<issueManagement>
|
|
||||||
<system>github</system>
|
|
||||||
<url>https://github.com/openapitools/openapi-generator/issues</url>
|
|
||||||
</issueManagement>
|
|
||||||
<licenses>
|
|
||||||
<license>
|
|
||||||
<name>Apache License 2.0</name>
|
|
||||||
<url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
|
|
||||||
<distribution>repo</distribution>
|
|
||||||
</license>
|
|
||||||
</licenses>
|
|
||||||
<build>
|
|
||||||
<sourceDirectory>src/main/java</sourceDirectory>
|
|
||||||
<outputDirectory>target/classes</outputDirectory>
|
|
||||||
<extensions>
|
|
||||||
<extension>
|
|
||||||
<groupId>org.jvnet.wagon-svn</groupId>
|
|
||||||
<artifactId>wagon-svn</artifactId>
|
|
||||||
<version>1.8</version>
|
|
||||||
</extension>
|
|
||||||
<extension>
|
|
||||||
<groupId>org.apache.maven.wagon</groupId>
|
|
||||||
<artifactId>wagon-ssh-external</artifactId>
|
|
||||||
<version>1.0-alpha-6</version>
|
|
||||||
</extension>
|
|
||||||
<extension>
|
|
||||||
<groupId>org.apache.maven.wagon</groupId>
|
|
||||||
<artifactId>wagon-webdav</artifactId>
|
|
||||||
<version>1.0-beta-1</version>
|
|
||||||
</extension>
|
|
||||||
</extensions>
|
|
||||||
<defaultGoal>install</defaultGoal>
|
|
||||||
<directory>target</directory>
|
|
||||||
<finalName>${project.artifactId}-${project.version}</finalName>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>net.revelc.code</groupId>
|
|
||||||
<artifactId>formatter-maven-plugin</artifactId>
|
|
||||||
<!-- Uncomment this to format before checkstyle -->
|
|
||||||
<!-- <executions>
|
|
||||||
<execution>
|
|
||||||
<id>format</id>
|
|
||||||
<phase>validate</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>format</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions> -->
|
|
||||||
<configuration>
|
|
||||||
<compilerSource>1.8</compilerSource>
|
|
||||||
<compilerCompliance>1.8</compilerCompliance>
|
|
||||||
<compilerTargetPlatform>1.8</compilerTargetPlatform>
|
|
||||||
<lineEnding>LF</lineEnding>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<!--<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
|
||||||
<version>2.17</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>validate</id>
|
|
||||||
<phase>validate</phase>
|
|
||||||
<configuration>
|
|
||||||
<configLocation>google_checkstyle.xml</configLocation>
|
|
||||||
Don't include generated sources a la http://stackoverflow.com/a/30406454
|
|
||||||
<sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
|
|
||||||
<encoding>UTF-8</encoding>
|
|
||||||
<consoleOutput>true</consoleOutput>
|
|
||||||
<failsOnError>true</failsOnError>
|
|
||||||
<linkXRef>false</linkXRef>
|
|
||||||
</configuration>
|
|
||||||
<goals>
|
|
||||||
<goal>check</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.puppycrawl.tools</groupId>
|
|
||||||
<artifactId>checkstyle</artifactId>
|
|
||||||
<version>6.19</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
</plugin>-->
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
|
||||||
<version>${surefire-version}</version>
|
|
||||||
<configuration>
|
|
||||||
<testNGArtifactName>none:none</testNGArtifactName>
|
|
||||||
<argLine>-XX:+StartAttachListener</argLine>
|
|
||||||
</configuration>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>test-testng</id>
|
|
||||||
<phase>test</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>test</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<junitArtifactName>none:none</junitArtifactName>
|
|
||||||
<testNGArtifactName>org.testng:testng</testNGArtifactName>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-dependency-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<phase>package</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>copy-dependencies</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<outputDirectory>${project.build.directory}/lib</outputDirectory>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
|
||||||
<version>3.6.1</version>
|
|
||||||
<configuration>
|
|
||||||
<source>1.8</source>
|
|
||||||
<target>1.8</target>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-jar-plugin</artifactId>
|
|
||||||
<version>3.0.2</version>
|
|
||||||
<configuration>
|
|
||||||
<archive>
|
|
||||||
<manifestEntries>
|
|
||||||
<mode>development</mode>
|
|
||||||
<url>${project.url}</url>
|
|
||||||
<implementation-version>${project.version}</implementation-version>
|
|
||||||
<package>org.openapitools</package>
|
|
||||||
</manifestEntries>
|
|
||||||
</archive>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-site-plugin</artifactId>
|
|
||||||
<version>3.5.1</version>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-release-plugin</artifactId>
|
|
||||||
<version>2.5.3</version>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
|
||||||
<version>2.10.4</version>
|
|
||||||
<configuration>
|
|
||||||
<aggregate>true</aggregate>
|
|
||||||
<source>1.8</source>
|
|
||||||
<encoding>UTF-8</encoding>
|
|
||||||
<maxmemory>1g</maxmemory>
|
|
||||||
<excludePackageNames>${javadoc.package.exclude}</excludePackageNames>
|
|
||||||
</configuration>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>attach-javadocs</id>
|
|
||||||
<phase>verify</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>jar</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-source-plugin</artifactId>
|
|
||||||
<version>3.0.1</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>attach-sources</id>
|
|
||||||
<phase>verify</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>jar-no-fork</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
<pluginManagement>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>net.revelc.code</groupId>
|
|
||||||
<artifactId>formatter-maven-plugin</artifactId>
|
|
||||||
<version>0.5.2</version>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</pluginManagement>
|
|
||||||
</build>
|
|
||||||
<profiles>
|
|
||||||
<profile>
|
|
||||||
<id>release-profile</id>
|
|
||||||
<properties>
|
|
||||||
<skipTests>true</skipTests>
|
|
||||||
</properties>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>net.alchim31.maven</groupId>
|
|
||||||
<artifactId>scala-maven-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<goals>
|
|
||||||
<goal>compile</goal>
|
|
||||||
<goal>testCompile</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
<configuration/>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>build-helper-maven-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>add-source</id>
|
|
||||||
<phase>prepare-package</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>add-source</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<sources>
|
|
||||||
<source>src/main/scala</source>
|
|
||||||
</sources>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>release-sign-artifacts</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>performRelease</name>
|
|
||||||
<value>true</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-gpg-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>sign-artifacts</id>
|
|
||||||
<phase>verify</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>sign</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</profile>
|
|
||||||
<!-- Samples -->
|
|
||||||
<profile>
|
|
||||||
<id>android-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/android/volley</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>bash-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/bash</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>clojure-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>clojure</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/clojure</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-client-jersey1</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/java/jersey1</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-client-jersey2</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/java/jersey2</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-client-jersey2-java6</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/java/jersey2-java6</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-client-okhttp-gson</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/java/okhttp-gson</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-client-okhttp-gson-parcelable</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/java/okhttp-gson/parcelableModel</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-client-retrofit</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/java/retrofit</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-client-retrofit2</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/java/retrofit2</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-client-retrofit2-rx</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/java/retrofit2rx</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-client-feign</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/java/feign</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>javascript-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>javascript</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/javascript</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>scala-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>scala</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/scala</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-msf4j-server</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/java-msf4/</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>jaxrs-cxf-server</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/jaxrs-cxf</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>jaxrs-resteasy-server</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/jaxrs-resteasy/default</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>jaxrs-resteasy-server-joda</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/jaxrs-resteasy/joda</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>jaxrs-resteasy-eap-server</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/jaxrs-resteasy/eap</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>jaxrs-resteasy-eap-server-java8</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/jaxrs-resteasy/eap-java8</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>jaxrs-resteasy-eap-server-joda</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/jaxrs-resteasy/eap-joda</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>jaxrs-server</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/jaxrs/jersey2</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>jaxrs-server-jersey1</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/jaxrs/jersey1</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>typescript-fetch-client-tests-default</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/typescript-fetch/tests/default</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>typescript-fetch-client-builds-default</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/typescript-fetch/builds/default</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>typescript-fetch-client-builds-es6-target</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/typescript-fetch/builds/es6-target</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>typescript-fetch-client-builds-with-npm-version</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/typescript-fetch/builds/with-npm-version</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>typescript-angularjs-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/typescript-angularjs/npm</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>typescript-node-npm-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/typescript-node/npm</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>python-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/python</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>ruby-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/ruby</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>go-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/go</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>spring-mvc</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/spring-mvc</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>springboot-useoptional</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/springboot-useoptional</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>springboot-beanvalidation</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/springboot-beanvalidation</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>springboot-reactive</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/springboot-reactive</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>springboot</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/springboot</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>spring-cloud</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/spring-cloud</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>scalatra-server</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/scalatra</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-inflector</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/java-inflector</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-undertowr</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/undertow</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>samples</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>samples</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<!-- clients -->
|
|
||||||
<!-- test java-related projects -->
|
|
||||||
<module>samples/client/petstore/akka-scala</module>
|
|
||||||
<module>samples/client/petstore/scala</module>
|
|
||||||
<module>samples/client/petstore/scalaz</module>
|
|
||||||
<module>samples/client/petstore/clojure</module>
|
|
||||||
<module>samples/client/petstore/java/feign</module>
|
|
||||||
<module>samples/client/petstore/java/jersey1</module>
|
|
||||||
<module>samples/client/petstore/java/jersey2</module>
|
|
||||||
<module>samples/client/petstore/java/okhttp-gson</module>
|
|
||||||
<module>samples/client/petstore/java/retrofit</module>
|
|
||||||
<module>samples/client/petstore/java/retrofit2</module>
|
|
||||||
<module>samples/client/petstore/java/retrofit2rx</module>
|
|
||||||
<module>samples/client/petstore/jaxrs-cxf-client</module>
|
|
||||||
<module>samples/client/petstore/java/resttemplate</module>
|
|
||||||
<module>samples/client/petstore/java/resttemplate-withXml</module>
|
|
||||||
<module>samples/client/petstore/java/vertx</module>
|
|
||||||
<module>samples/client/petstore/java/resteasy</module>
|
|
||||||
<module>samples/client/petstore/java/google-api-client</module>
|
|
||||||
<module>samples/client/petstore/java/rest-assured</module>
|
|
||||||
<module>samples/client/petstore/kotlin/</module>
|
|
||||||
<module>samples/client/petstore/kotlin-threetenbp/</module>
|
|
||||||
<module>samples/client/petstore/kotlin-string/</module>
|
|
||||||
<!-- test non-java projects -->
|
|
||||||
<module>samples/client/petstore/go</module>
|
|
||||||
<!-- servers -->
|
|
||||||
<module>samples/server/petstore/java-vertx/rx</module>
|
|
||||||
<module>samples/server/petstore/java-vertx/async</module>
|
|
||||||
<module>samples/server/petstore/java-inflector</module>
|
|
||||||
<module>samples/server/petstore/java-pkmst</module>
|
|
||||||
<module>samples/server/petstore/java-play-framework</module>
|
|
||||||
<module>samples/server/petstore/java-play-framework-no-wrap-calls</module>
|
|
||||||
<module>samples/server/petstore/java-play-framework-no-swagger-ui</module>
|
|
||||||
<module>samples/server/petstore/java-play-framework-no-interface</module>
|
|
||||||
<module>samples/server/petstore/java-play-framework-no-exception-handling</module>
|
|
||||||
<module>samples/server/petstore/java-play-framework-no-bean-validation</module>
|
|
||||||
<module>samples/server/petstore/java-play-framework-fake-endpoints</module>
|
|
||||||
<module>samples/server/petstore/java-play-framework-controller-only</module>
|
|
||||||
<module>samples/server/petstore/java-play-framework-api-package-override</module>
|
|
||||||
<module>samples/server/petstore/undertow</module>
|
|
||||||
<module>samples/server/petstore/jaxrs/jersey1</module>
|
|
||||||
<module>samples/server/petstore/jaxrs/jersey2</module>
|
|
||||||
<module>samples/server/petstore/jaxrs/jersey1-useTags</module>
|
|
||||||
<module>samples/server/petstore/jaxrs/jersey2-useTags</module>
|
|
||||||
<module>samples/server/petstore/jaxrs-datelib-j8</module>
|
|
||||||
<module>samples/server/petstore/jaxrs-resteasy/default</module>
|
|
||||||
<module>samples/server/petstore/jaxrs-resteasy/eap</module>
|
|
||||||
<module>samples/server/petstore/jaxrs-resteasy/eap-joda</module>
|
|
||||||
<module>samples/server/petstore/jaxrs-resteasy/eap-java8</module>
|
|
||||||
<module>samples/server/petstore/jaxrs-resteasy/joda</module>
|
|
||||||
<!--<module>samples/server/petstore/kotlin-server/ktor</module>-->
|
|
||||||
<module>samples/server/petstore/spring-mvc</module>
|
|
||||||
<module>samples/server/petstore/spring-mvc-j8-async</module>
|
|
||||||
<module>samples/server/petstore/spring-mvc-j8-localdatetime</module>
|
|
||||||
<module>samples/client/petstore/spring-cloud</module>
|
|
||||||
<module>samples/server/petstore/springboot</module>
|
|
||||||
<module>samples/server/petstore/springboot-beanvalidation</module>
|
|
||||||
<module>samples/server/petstore/springboot-useoptional</module>
|
|
||||||
<module>samples/server/petstore/jaxrs-cxf</module>
|
|
||||||
<module>samples/server/petstore/jaxrs-cxf-annotated-base-path</module>
|
|
||||||
<module>samples/server/petstore/jaxrs-cxf-cdi</module>
|
|
||||||
<module>samples/server/petstore/jaxrs-cxf-non-spring-app</module>
|
|
||||||
<module>samples/server/petstore/java-msf4j</module>
|
|
||||||
<module>samples/server/petstore/jaxrs-spec-interface</module>
|
|
||||||
<module>samples/server/petstore/scala-lagom-server</module>
|
|
||||||
<module>samples/server/petstore/scalatra</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
</profiles>
|
|
||||||
<modules>
|
|
||||||
<module>modules/openapi-generator</module>
|
|
||||||
<module>modules/openapi-generator-cli</module>
|
|
||||||
<module>modules/openapi-generator-maven-plugin</module>
|
|
||||||
<module>modules/openapi-generator-online</module>
|
|
||||||
</modules>
|
|
||||||
<reporting>
|
|
||||||
<outputDirectory>target/site</outputDirectory>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>net.alchim31.maven</groupId>
|
|
||||||
<artifactId>scala-maven-plugin</artifactId>
|
|
||||||
<version>${scala-maven-plugin-version}</version>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-jxr-plugin</artifactId>
|
|
||||||
<version>2.5</version>
|
|
||||||
<configuration>
|
|
||||||
<aggregate>true</aggregate>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-project-info-reports-plugin</artifactId>
|
|
||||||
<version>2.9</version>
|
|
||||||
<reportSets>
|
|
||||||
<reportSet>
|
|
||||||
<reports>
|
|
||||||
<report>project-team</report>
|
|
||||||
</reports>
|
|
||||||
</reportSet>
|
|
||||||
</reportSets>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</reporting>
|
|
||||||
<dependencyManagement>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<version>${junit-version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.testng</groupId>
|
|
||||||
<artifactId>testng</artifactId>
|
|
||||||
<version>${testng-version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jmockit</groupId>
|
|
||||||
<artifactId>jmockit</artifactId>
|
|
||||||
<version>${jmockit-version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
</dependencyManagement>
|
|
||||||
<repositories>
|
|
||||||
<repository>
|
|
||||||
<id>sonatype-snapshots</id>
|
|
||||||
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
|
|
||||||
<snapshots>
|
|
||||||
<enabled>true</enabled>
|
|
||||||
</snapshots>
|
|
||||||
</repository>
|
|
||||||
</repositories>
|
|
||||||
<properties>
|
|
||||||
<swagger-parser-version>2.0.1</swagger-parser-version>
|
|
||||||
<swagger-core-version>2.0.1</swagger-core-version>
|
|
||||||
<scala-version>2.11.1</scala-version>
|
|
||||||
<felix-version>3.3.0</felix-version>
|
|
||||||
<commons-io-version>2.4</commons-io-version>
|
|
||||||
<commons-cli-version>1.2</commons-cli-version>
|
|
||||||
<junit-version>4.8.1</junit-version>
|
|
||||||
<jackson-version>2.8.9</jackson-version>
|
|
||||||
<maven-plugin-version>1.0.0</maven-plugin-version>
|
|
||||||
<commons-lang-version>3.4</commons-lang-version>
|
|
||||||
<slf4j-version>1.7.12</slf4j-version>
|
|
||||||
<scala-maven-plugin-version>3.2.1</scala-maven-plugin-version>
|
|
||||||
<jmustache-version>1.14</jmustache-version>
|
|
||||||
<testng-version>6.9.6</testng-version>
|
|
||||||
<surefire-version>2.19.1</surefire-version>
|
|
||||||
<jmockit-version>1.25</jmockit-version>
|
|
||||||
<reflections-version>0.9.10</reflections-version>
|
|
||||||
<spring-boot-version>2.0.2.RELEASE</spring-boot-version>
|
|
||||||
</properties>
|
|
||||||
</project>
|
|
||||||
@@ -1,971 +0,0 @@
|
|||||||
<!-- for integration tests with Java7 -->
|
|
||||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
|
||||||
<parent>
|
|
||||||
<groupId>org.sonatype.oss</groupId>
|
|
||||||
<artifactId>oss-parent</artifactId>
|
|
||||||
<version>5</version>
|
|
||||||
</parent>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<groupId>org.openapitools</groupId>
|
|
||||||
<artifactId>openapi-generator-project</artifactId>
|
|
||||||
<packaging>pom</packaging>
|
|
||||||
<name>openapi-generator-project</name>
|
|
||||||
<version>3.0.0</version>
|
|
||||||
<url>https://github.com/openapitools/openapi-generator</url>
|
|
||||||
<scm>
|
|
||||||
<connection>scm:git:git@github.com:openapitools/openapi-generator.git</connection>
|
|
||||||
<developerConnection>scm:git:git@github.com:openapitools/openapi-generator.git</developerConnection>
|
|
||||||
<url>https://github.com/openapitools/openapi-generator</url>
|
|
||||||
</scm>
|
|
||||||
<prerequisites>
|
|
||||||
<maven>2.2.0</maven>
|
|
||||||
</prerequisites>
|
|
||||||
<developers>
|
|
||||||
<!-- original author of the project -->
|
|
||||||
<developer>
|
|
||||||
<id>fehguy</id>
|
|
||||||
<name>Tony Tam</name>
|
|
||||||
<email>fehguy@gmail.com</email>
|
|
||||||
</developer>
|
|
||||||
<!-- openapi-generator core team -->
|
|
||||||
<developer>
|
|
||||||
<id>wing328</id>
|
|
||||||
<name>William Cheng</name>
|
|
||||||
<email>wing328hk@gmail.com</email>
|
|
||||||
</developer>
|
|
||||||
<developer>
|
|
||||||
<id>jimschubert</id>
|
|
||||||
<name>Jim Schubert</name>
|
|
||||||
<email>james.schubert@gmail.com</email>
|
|
||||||
</developer>
|
|
||||||
<developer>
|
|
||||||
<id>cbornet</id>
|
|
||||||
<name>Christophe Bornet</name>
|
|
||||||
</developer>
|
|
||||||
<developer>
|
|
||||||
<id>jaz-ah</id>
|
|
||||||
<name>Joseph Zuromski</name>
|
|
||||||
</developer>
|
|
||||||
<developer>
|
|
||||||
<id>ackintosh</id>
|
|
||||||
<name>Akihito Nakano</name>
|
|
||||||
</developer>
|
|
||||||
<developer>
|
|
||||||
<id>JFCote</id>
|
|
||||||
<name>Jean-François Côté</name>
|
|
||||||
</developer>
|
|
||||||
<developer>
|
|
||||||
<id>jmini</id>
|
|
||||||
<name>Jérémie Bresson</name>
|
|
||||||
<email>dev@jmini.fr</email>
|
|
||||||
</developer>
|
|
||||||
</developers>
|
|
||||||
<issueManagement>
|
|
||||||
<system>github</system>
|
|
||||||
<url>https://github.com/openapitools/openapi-generator/issues</url>
|
|
||||||
</issueManagement>
|
|
||||||
<licenses>
|
|
||||||
<license>
|
|
||||||
<name>Apache License 2.0</name>
|
|
||||||
<url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
|
|
||||||
<distribution>repo</distribution>
|
|
||||||
</license>
|
|
||||||
</licenses>
|
|
||||||
<build>
|
|
||||||
<sourceDirectory>src/main/java</sourceDirectory>
|
|
||||||
<outputDirectory>target/classes</outputDirectory>
|
|
||||||
<extensions>
|
|
||||||
<extension>
|
|
||||||
<groupId>org.jvnet.wagon-svn</groupId>
|
|
||||||
<artifactId>wagon-svn</artifactId>
|
|
||||||
<version>1.8</version>
|
|
||||||
</extension>
|
|
||||||
<extension>
|
|
||||||
<groupId>org.apache.maven.wagon</groupId>
|
|
||||||
<artifactId>wagon-ssh-external</artifactId>
|
|
||||||
<version>1.0-alpha-6</version>
|
|
||||||
</extension>
|
|
||||||
<extension>
|
|
||||||
<groupId>org.apache.maven.wagon</groupId>
|
|
||||||
<artifactId>wagon-webdav</artifactId>
|
|
||||||
<version>1.0-beta-1</version>
|
|
||||||
</extension>
|
|
||||||
</extensions>
|
|
||||||
<defaultGoal>install</defaultGoal>
|
|
||||||
<directory>target</directory>
|
|
||||||
<finalName>${project.artifactId}-${project.version}</finalName>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>net.revelc.code</groupId>
|
|
||||||
<artifactId>formatter-maven-plugin</artifactId>
|
|
||||||
<!-- Uncomment this to format before checkstyle -->
|
|
||||||
<!-- <executions>
|
|
||||||
<execution>
|
|
||||||
<id>format</id>
|
|
||||||
<phase>validate</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>format</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions> -->
|
|
||||||
<configuration>
|
|
||||||
<compilerSource>1.8</compilerSource>
|
|
||||||
<compilerCompliance>1.8</compilerCompliance>
|
|
||||||
<compilerTargetPlatform>1.8</compilerTargetPlatform>
|
|
||||||
<lineEnding>LF</lineEnding>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<!--<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
|
||||||
<version>2.17</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>validate</id>
|
|
||||||
<phase>validate</phase>
|
|
||||||
<configuration>
|
|
||||||
<configLocation>google_checkstyle.xml</configLocation>
|
|
||||||
Don't include generated sources a la http://stackoverflow.com/a/30406454
|
|
||||||
<sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
|
|
||||||
<encoding>UTF-8</encoding>
|
|
||||||
<consoleOutput>true</consoleOutput>
|
|
||||||
<failsOnError>true</failsOnError>
|
|
||||||
<linkXRef>false</linkXRef>
|
|
||||||
</configuration>
|
|
||||||
<goals>
|
|
||||||
<goal>check</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.puppycrawl.tools</groupId>
|
|
||||||
<artifactId>checkstyle</artifactId>
|
|
||||||
<version>6.19</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
</plugin>-->
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
|
||||||
<version>${surefire-version}</version>
|
|
||||||
<configuration>
|
|
||||||
<testNGArtifactName>none:none</testNGArtifactName>
|
|
||||||
<argLine>-XX:+StartAttachListener</argLine>
|
|
||||||
</configuration>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>test-testng</id>
|
|
||||||
<phase>test</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>test</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<junitArtifactName>none:none</junitArtifactName>
|
|
||||||
<testNGArtifactName>org.testng:testng</testNGArtifactName>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-dependency-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<phase>package</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>copy-dependencies</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<outputDirectory>${project.build.directory}/lib</outputDirectory>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
|
||||||
<version>3.6.1</version>
|
|
||||||
<configuration>
|
|
||||||
<source>1.8</source>
|
|
||||||
<target>1.8</target>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-jar-plugin</artifactId>
|
|
||||||
<version>3.0.2</version>
|
|
||||||
<configuration>
|
|
||||||
<archive>
|
|
||||||
<manifestEntries>
|
|
||||||
<mode>development</mode>
|
|
||||||
<url>${project.url}</url>
|
|
||||||
<implementation-version>${project.version}</implementation-version>
|
|
||||||
<package>org.openapitools</package>
|
|
||||||
</manifestEntries>
|
|
||||||
</archive>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-site-plugin</artifactId>
|
|
||||||
<version>3.5.1</version>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-release-plugin</artifactId>
|
|
||||||
<version>2.5.3</version>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
|
||||||
<version>2.10.4</version>
|
|
||||||
<configuration>
|
|
||||||
<aggregate>true</aggregate>
|
|
||||||
<source>1.8</source>
|
|
||||||
<encoding>UTF-8</encoding>
|
|
||||||
<maxmemory>1g</maxmemory>
|
|
||||||
<excludePackageNames>${javadoc.package.exclude}</excludePackageNames>
|
|
||||||
</configuration>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>attach-javadocs</id>
|
|
||||||
<phase>verify</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>jar</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-source-plugin</artifactId>
|
|
||||||
<version>3.0.1</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>attach-sources</id>
|
|
||||||
<phase>verify</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>jar-no-fork</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
<pluginManagement>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>net.revelc.code</groupId>
|
|
||||||
<artifactId>formatter-maven-plugin</artifactId>
|
|
||||||
<version>0.5.2</version>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</pluginManagement>
|
|
||||||
</build>
|
|
||||||
<profiles>
|
|
||||||
<profile>
|
|
||||||
<id>release-profile</id>
|
|
||||||
<properties>
|
|
||||||
<skipTests>true</skipTests>
|
|
||||||
</properties>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>net.alchim31.maven</groupId>
|
|
||||||
<artifactId>scala-maven-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<goals>
|
|
||||||
<goal>compile</goal>
|
|
||||||
<goal>testCompile</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
<configuration/>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>build-helper-maven-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>add-source</id>
|
|
||||||
<phase>prepare-package</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>add-source</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<sources>
|
|
||||||
<source>src/main/scala</source>
|
|
||||||
</sources>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>release-sign-artifacts</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>performRelease</name>
|
|
||||||
<value>true</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-gpg-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>sign-artifacts</id>
|
|
||||||
<phase>verify</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>sign</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</profile>
|
|
||||||
<!-- Samples -->
|
|
||||||
<profile>
|
|
||||||
<id>android-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/android/volley</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>bash-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/bash</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>clojure-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>clojure</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/clojure</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-client-jersey1</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/java/jersey1</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-client-jersey2</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/java/jersey2</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-client-jersey2-java6</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/java/jersey2-java6</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-client-okhttp-gson</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/java/okhttp-gson</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-client-okhttp-gson-parcelable</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/java/okhttp-gson/parcelableModel</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-client-retrofit</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/java/retrofit</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-client-retrofit2</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/java/retrofit2</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-client-retrofit2-rx</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/java/retrofit2rx</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-client-feign</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/java/feign</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>javascript-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>javascript</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/javascript</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>scala-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>scala</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/scala</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-msf4j-server</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/java-msf4/</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>jaxrs-cxf-server</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/jaxrs-cxf</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>jaxrs-resteasy-server</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/jaxrs-resteasy/default</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>jaxrs-resteasy-server-joda</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/jaxrs-resteasy/joda</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>jaxrs-resteasy-eap-server</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/jaxrs-resteasy/eap</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>jaxrs-resteasy-eap-server-java8</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/jaxrs-resteasy/eap-java8</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>jaxrs-resteasy-eap-server-joda</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/jaxrs-resteasy/eap-joda</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>jaxrs-server</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/jaxrs/jersey2</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>jaxrs-server-jersey1</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/jaxrs/jersey1</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>typescript-fetch-client-tests-default</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/typescript-fetch/tests/default</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>typescript-fetch-client-builds-default</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/typescript-fetch/builds/default</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>typescript-fetch-client-builds-es6-target</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/typescript-fetch/builds/es6-target</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>typescript-fetch-client-builds-with-npm-version</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/typescript-fetch/builds/with-npm-version</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>typescript-angularjs-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/typescript-angularjs/npm</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>typescript-node-npm-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/typescript-node/npm</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>python-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/python</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>ruby-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/ruby</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>go-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/go</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>spring-mvc</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/spring-mvc</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>springboot-useoptional</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/springboot-useoptional</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>springboot-beanvalidation</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/springboot-beanvalidation</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>springboot-reactive</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/springboot-reactive</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>springboot</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/springboot</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>spring-cloud</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/spring-cloud</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>scalatra-server</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/scalatra</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-inflector</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/java-inflector</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-undertowr</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/undertow</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>samples</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>samples</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<!-- clients -->
|
|
||||||
<!-- test java-related projects -->
|
|
||||||
<module>samples/client/petstore/akka-scala</module>
|
|
||||||
<module>samples/client/petstore/scala</module>
|
|
||||||
<module>samples/client/petstore/scalaz</module>
|
|
||||||
<module>samples/client/petstore/clojure</module>
|
|
||||||
<module>samples/client/petstore/java/feign</module>
|
|
||||||
<module>samples/client/petstore/java/jersey1</module>
|
|
||||||
<module>samples/client/petstore/java/jersey2</module>
|
|
||||||
<module>samples/client/petstore/java/okhttp-gson</module>
|
|
||||||
<module>samples/client/petstore/java/retrofit</module>
|
|
||||||
<module>samples/client/petstore/java/retrofit2</module>
|
|
||||||
<module>samples/client/petstore/java/retrofit2rx</module>
|
|
||||||
<module>samples/client/petstore/jaxrs-cxf-client</module>
|
|
||||||
<module>samples/client/petstore/java/resttemplate</module>
|
|
||||||
<module>samples/client/petstore/java/resttemplate-withXml</module>
|
|
||||||
<module>samples/client/petstore/java/vertx</module>
|
|
||||||
<module>samples/client/petstore/java/resteasy</module>
|
|
||||||
<module>samples/client/petstore/java/google-api-client</module>
|
|
||||||
<module>samples/client/petstore/kotlin/</module>
|
|
||||||
<!-- test non-java projects -->
|
|
||||||
<!--<module>samples/client/petstore/go</module>-->
|
|
||||||
<!-- servers -->
|
|
||||||
<module>samples/server/petstore/java-vertx/rx</module>
|
|
||||||
<module>samples/server/petstore/java-vertx/async</module>
|
|
||||||
<module>samples/server/petstore/java-inflector</module>
|
|
||||||
<module>samples/server/petstore/undertow</module>
|
|
||||||
<module>samples/server/petstore/jaxrs/jersey1</module>
|
|
||||||
<module>samples/server/petstore/jaxrs/jersey2</module>
|
|
||||||
<module>samples/server/petstore/jaxrs/jersey1-useTags</module>
|
|
||||||
<module>samples/server/petstore/jaxrs/jersey2-useTags</module>
|
|
||||||
<module>samples/server/petstore/jaxrs-resteasy/default</module>
|
|
||||||
<module>samples/server/petstore/jaxrs-resteasy/eap</module>
|
|
||||||
<module>samples/server/petstore/jaxrs-resteasy/eap-joda</module>
|
|
||||||
<module>samples/server/petstore/jaxrs-resteasy/eap-java8</module>
|
|
||||||
<module>samples/server/petstore/jaxrs-resteasy/joda</module>
|
|
||||||
<module>samples/server/petstore/spring-mvc</module>
|
|
||||||
<module>samples/client/petstore/spring-cloud</module>
|
|
||||||
<module>samples/server/petstore/springboot</module>
|
|
||||||
<module>samples/server/petstore/springboot-beanvalidation</module>
|
|
||||||
<module>samples/server/petstore/springboot-useoptional</module>
|
|
||||||
<module>samples/server/petstore/jaxrs-cxf</module>
|
|
||||||
<module>samples/server/petstore/jaxrs-cxf-annotated-base-path</module>
|
|
||||||
<module>samples/server/petstore/jaxrs-cxf-cdi</module>
|
|
||||||
<module>samples/server/petstore/jaxrs-cxf-non-spring-app</module>
|
|
||||||
<module>samples/server/petstore/java-msf4j</module>
|
|
||||||
<module>samples/server/petstore/jaxrs-spec-interface</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
</profiles>
|
|
||||||
<modules>
|
|
||||||
<module>modules/openapi-generator</module>
|
|
||||||
<module>modules/openapi-generator-cli</module>
|
|
||||||
<module>modules/openapi-generator-maven-plugin</module>
|
|
||||||
<module>modules/openapi-generator-online</module>
|
|
||||||
</modules>
|
|
||||||
<reporting>
|
|
||||||
<outputDirectory>target/site</outputDirectory>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>net.alchim31.maven</groupId>
|
|
||||||
<artifactId>scala-maven-plugin</artifactId>
|
|
||||||
<version>${scala-maven-plugin-version}</version>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-jxr-plugin</artifactId>
|
|
||||||
<version>2.5</version>
|
|
||||||
<configuration>
|
|
||||||
<aggregate>true</aggregate>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-project-info-reports-plugin</artifactId>
|
|
||||||
<version>2.9</version>
|
|
||||||
<reportSets>
|
|
||||||
<reportSet>
|
|
||||||
<reports>
|
|
||||||
<report>project-team</report>
|
|
||||||
</reports>
|
|
||||||
</reportSet>
|
|
||||||
</reportSets>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</reporting>
|
|
||||||
<dependencyManagement>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<version>${junit-version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.testng</groupId>
|
|
||||||
<artifactId>testng</artifactId>
|
|
||||||
<version>${testng-version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jmockit</groupId>
|
|
||||||
<artifactId>jmockit</artifactId>
|
|
||||||
<version>${jmockit-version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
</dependencyManagement>
|
|
||||||
<repositories>
|
|
||||||
<repository>
|
|
||||||
<id>sonatype-snapshots</id>
|
|
||||||
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
|
|
||||||
<snapshots>
|
|
||||||
<enabled>true</enabled>
|
|
||||||
</snapshots>
|
|
||||||
</repository>
|
|
||||||
</repositories>
|
|
||||||
<properties>
|
|
||||||
<swagger-parser-version>2.0.1</swagger-parser-version>
|
|
||||||
<swagger-core-version>2.0.1</swagger-core-version>
|
|
||||||
<scala-version>2.11.1</scala-version>
|
|
||||||
<felix-version>3.3.0</felix-version>
|
|
||||||
<commons-io-version>2.4</commons-io-version>
|
|
||||||
<commons-cli-version>1.2</commons-cli-version>
|
|
||||||
<junit-version>4.8.1</junit-version>
|
|
||||||
<jackson-version>2.8.9</jackson-version>
|
|
||||||
<maven-plugin-version>1.0.0</maven-plugin-version>
|
|
||||||
<commons-lang-version>3.4</commons-lang-version>
|
|
||||||
<slf4j-version>1.7.12</slf4j-version>
|
|
||||||
<scala-maven-plugin-version>3.2.1</scala-maven-plugin-version>
|
|
||||||
<jmustache-version>1.12</jmustache-version>
|
|
||||||
<testng-version>6.9.6</testng-version>
|
|
||||||
<surefire-version>2.19.1</surefire-version>
|
|
||||||
<jmockit-version>1.25</jmockit-version>
|
|
||||||
<reflections-version>0.9.10</reflections-version>
|
|
||||||
<spring-boot-version>2.0.2.RELEASE</spring-boot-version>
|
|
||||||
</properties>
|
|
||||||
</project>
|
|
||||||
949
CI/pom.xml.ios
949
CI/pom.xml.ios
@@ -1,949 +0,0 @@
|
|||||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
|
||||||
<parent>
|
|
||||||
<groupId>org.sonatype.oss</groupId>
|
|
||||||
<artifactId>oss-parent</artifactId>
|
|
||||||
<version>5</version>
|
|
||||||
</parent>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<groupId>org.openapitools</groupId>
|
|
||||||
<artifactId>openapi-generator-project</artifactId>
|
|
||||||
<packaging>pom</packaging>
|
|
||||||
<name>openapi-generator-project</name>
|
|
||||||
<version>3.0.0</version>
|
|
||||||
<url>https://github.com/openapitools/openapi-generator</url>
|
|
||||||
<scm>
|
|
||||||
<connection>scm:git:git@github.com:openapitools/openapi-generator.git</connection>
|
|
||||||
<developerConnection>scm:git:git@github.com:openapitools/openapi-generator.git</developerConnection>
|
|
||||||
<url>https://github.com/openapitools/openapi-generator</url>
|
|
||||||
</scm>
|
|
||||||
<developers>
|
|
||||||
<!-- original author of the project -->
|
|
||||||
<developer>
|
|
||||||
<id>fehguy</id>
|
|
||||||
<name>Tony Tam</name>
|
|
||||||
<email>fehguy@gmail.com</email>
|
|
||||||
</developer>
|
|
||||||
<!-- openapi-generator core team -->
|
|
||||||
<developer>
|
|
||||||
<id>wing328</id>
|
|
||||||
<name>William Cheng</name>
|
|
||||||
<email>wing328hk@gmail.com</email>
|
|
||||||
</developer>
|
|
||||||
<developer>
|
|
||||||
<id>jimschubert</id>
|
|
||||||
<name>Jim Schubert</name>
|
|
||||||
<email>james.schubert@gmail.com</email>
|
|
||||||
</developer>
|
|
||||||
<developer>
|
|
||||||
<id>cbornet</id>
|
|
||||||
<name>Christophe Bornet</name>
|
|
||||||
</developer>
|
|
||||||
<developer>
|
|
||||||
<id>jaz-ah</id>
|
|
||||||
<name>Joseph Zuromski</name>
|
|
||||||
</developer>
|
|
||||||
<developer>
|
|
||||||
<id>ackintosh</id>
|
|
||||||
<name>Akihito Nakano</name>
|
|
||||||
</developer>
|
|
||||||
<developer>
|
|
||||||
<id>JFCote</id>
|
|
||||||
<name>Jean-François Côté</name>
|
|
||||||
</developer>
|
|
||||||
<developer>
|
|
||||||
<id>jmini</id>
|
|
||||||
<name>Jérémie Bresson</name>
|
|
||||||
<email>dev@jmini.fr</email>
|
|
||||||
</developer>
|
|
||||||
</developers>
|
|
||||||
<issueManagement>
|
|
||||||
<system>github</system>
|
|
||||||
<url>https://github.com/openapitools/openapi-generator/issues</url>
|
|
||||||
</issueManagement>
|
|
||||||
<licenses>
|
|
||||||
<license>
|
|
||||||
<name>Apache License 2.0</name>
|
|
||||||
<url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
|
|
||||||
<distribution>repo</distribution>
|
|
||||||
</license>
|
|
||||||
</licenses>
|
|
||||||
<build>
|
|
||||||
<sourceDirectory>src/main/java</sourceDirectory>
|
|
||||||
<outputDirectory>target/classes</outputDirectory>
|
|
||||||
<extensions>
|
|
||||||
<extension>
|
|
||||||
<groupId>org.jvnet.wagon-svn</groupId>
|
|
||||||
<artifactId>wagon-svn</artifactId>
|
|
||||||
<version>1.8</version>
|
|
||||||
</extension>
|
|
||||||
<extension>
|
|
||||||
<groupId>org.apache.maven.wagon</groupId>
|
|
||||||
<artifactId>wagon-ssh-external</artifactId>
|
|
||||||
<version>1.0-alpha-6</version>
|
|
||||||
</extension>
|
|
||||||
<extension>
|
|
||||||
<groupId>org.apache.maven.wagon</groupId>
|
|
||||||
<artifactId>wagon-webdav</artifactId>
|
|
||||||
<version>1.0-beta-1</version>
|
|
||||||
</extension>
|
|
||||||
</extensions>
|
|
||||||
<defaultGoal>install</defaultGoal>
|
|
||||||
<directory>target</directory>
|
|
||||||
<finalName>${project.artifactId}-${project.version}</finalName>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>net.revelc.code</groupId>
|
|
||||||
<artifactId>formatter-maven-plugin</artifactId>
|
|
||||||
<!-- Uncomment this to format before checkstyle -->
|
|
||||||
<!-- <executions>
|
|
||||||
<execution>
|
|
||||||
<id>format</id>
|
|
||||||
<phase>validate</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>format</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions> -->
|
|
||||||
<configuration>
|
|
||||||
<compilerSource>1.8</compilerSource>
|
|
||||||
<compilerCompliance>1.8</compilerCompliance>
|
|
||||||
<compilerTargetPlatform>1.8</compilerTargetPlatform>
|
|
||||||
<lineEnding>LF</lineEnding>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<!--<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
|
||||||
<version>2.17</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>validate</id>
|
|
||||||
<phase>validate</phase>
|
|
||||||
<configuration>
|
|
||||||
<configLocation>google_checkstyle.xml</configLocation>
|
|
||||||
Don't include generated sources a la http://stackoverflow.com/a/30406454
|
|
||||||
<sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
|
|
||||||
<encoding>UTF-8</encoding>
|
|
||||||
<consoleOutput>true</consoleOutput>
|
|
||||||
<failsOnError>true</failsOnError>
|
|
||||||
<linkXRef>false</linkXRef>
|
|
||||||
</configuration>
|
|
||||||
<goals>
|
|
||||||
<goal>check</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.puppycrawl.tools</groupId>
|
|
||||||
<artifactId>checkstyle</artifactId>
|
|
||||||
<version>6.19</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
</plugin>-->
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
|
||||||
<version>${surefire-version}</version>
|
|
||||||
<configuration>
|
|
||||||
<testNGArtifactName>none:none</testNGArtifactName>
|
|
||||||
<argLine>-XX:+StartAttachListener</argLine>
|
|
||||||
</configuration>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>test-testng</id>
|
|
||||||
<phase>test</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>test</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<junitArtifactName>none:none</junitArtifactName>
|
|
||||||
<testNGArtifactName>org.testng:testng</testNGArtifactName>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-dependency-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<phase>package</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>copy-dependencies</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<outputDirectory>${project.build.directory}/lib</outputDirectory>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
|
||||||
<version>3.6.1</version>
|
|
||||||
<configuration>
|
|
||||||
<source>1.8</source>
|
|
||||||
<target>1.8</target>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-jar-plugin</artifactId>
|
|
||||||
<version>3.0.2</version>
|
|
||||||
<configuration>
|
|
||||||
<archive>
|
|
||||||
<manifestEntries>
|
|
||||||
<mode>development</mode>
|
|
||||||
<url>${project.url}</url>
|
|
||||||
<implementation-version>${project.version}</implementation-version>
|
|
||||||
<package>org.openapitools</package>
|
|
||||||
</manifestEntries>
|
|
||||||
</archive>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-site-plugin</artifactId>
|
|
||||||
<version>3.5.1</version>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-release-plugin</artifactId>
|
|
||||||
<version>2.5.3</version>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
|
||||||
<version>2.10.4</version>
|
|
||||||
<configuration>
|
|
||||||
<aggregate>true</aggregate>
|
|
||||||
<source>1.8</source>
|
|
||||||
<encoding>UTF-8</encoding>
|
|
||||||
<maxmemory>1g</maxmemory>
|
|
||||||
<excludePackageNames>${javadoc.package.exclude}</excludePackageNames>
|
|
||||||
</configuration>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>attach-javadocs</id>
|
|
||||||
<phase>verify</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>jar</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-source-plugin</artifactId>
|
|
||||||
<version>3.0.1</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>attach-sources</id>
|
|
||||||
<phase>verify</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>jar-no-fork</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-enforcer-plugin</artifactId>
|
|
||||||
<version>1.4.1</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>enforce-versions</id>
|
|
||||||
<goals>
|
|
||||||
<goal>enforce</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<rules>
|
|
||||||
<requireMavenVersion>
|
|
||||||
<version>3.2.5</version>
|
|
||||||
</requireMavenVersion>
|
|
||||||
</rules>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
<pluginManagement>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>net.revelc.code</groupId>
|
|
||||||
<artifactId>formatter-maven-plugin</artifactId>
|
|
||||||
<version>0.5.2</version>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</pluginManagement>
|
|
||||||
</build>
|
|
||||||
<profiles>
|
|
||||||
<profile>
|
|
||||||
<id>release-profile</id>
|
|
||||||
<properties>
|
|
||||||
<skipTests>true</skipTests>
|
|
||||||
</properties>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>net.alchim31.maven</groupId>
|
|
||||||
<artifactId>scala-maven-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<goals>
|
|
||||||
<goal>compile</goal>
|
|
||||||
<goal>testCompile</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
<configuration/>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>build-helper-maven-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>add-source</id>
|
|
||||||
<phase>prepare-package</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>add-source</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<sources>
|
|
||||||
<source>src/main/scala</source>
|
|
||||||
</sources>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>release-sign-artifacts</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>performRelease</name>
|
|
||||||
<value>true</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-gpg-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>sign-artifacts</id>
|
|
||||||
<phase>verify</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>sign</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</profile>
|
|
||||||
<!-- Samples -->
|
|
||||||
<profile>
|
|
||||||
<id>android-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/android/volley</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>bash-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/bash</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>clojure-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>clojure</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/clojure</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>haskell-http-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>haskell-http-client</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/haskell-http-client</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>haskell-http-client-integration-test</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>haskell-http-client</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/haskell-http-client/tests-integration</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-client-jersey1</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/java/jersey1</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-client-jersey2</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/java/jersey2</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-client-jersey2-java6</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/java/jersey2-java6</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-client-okhttp-gson</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/java/okhttp-gson</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-client-okhttp-gson-parcelable</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/java/okhttp-gson/parcelableModel</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-client-retrofit</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/java/retrofit</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-client-retrofit2</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/java/retrofit2</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-client-retrofit2-rx</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/java/retrofit2rx</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-client-feign</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/java/feign</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>javascript-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>javascript</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/javascript</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>scala-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>scala</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/scala</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-msf4j-server</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/java-msf4/</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>jaxrs-cxf-server</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/jaxrs-cxf</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>jaxrs-resteasy-server</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/jaxrs-resteasy/default</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>jaxrs-resteasy-server-joda</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/jaxrs-resteasy/joda</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>jaxrs-resteasy-eap-server</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/jaxrs-resteasy/eap</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>jaxrs-resteasy-eap-server-joda</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/jaxrs-resteasy/eap-joda</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>jaxrs-server</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/jaxrs/jersey2</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>jaxrs-server-jersey1</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/jaxrs/jersey1</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>typescript-fetch-client-tests-default</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/typescript-fetch/tests/default</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>typescript-fetch-client-builds-default</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/typescript-fetch/builds/default</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>typescript-fetch-client-builds-es6-target</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/typescript-fetch/builds/es6-target</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>typescript-fetch-client-builds-with-npm-version</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/typescript-fetch/builds/with-npm-version</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>typescript-angularjs-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/typescript-angularjs/npm</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>typescript-node-npm-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/typescript-node/npm</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>python-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/python</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>ruby-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/ruby</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>go-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/go</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>spring-mvc</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/spring-mvc</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>springboot-beanvalidation</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/springboot-beanvalidation</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>springboot-reactive</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/springboot-reactive</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>springboot</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/springboot</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>spring-cloud</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/spring-cloud</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>scalatra-server</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/scalatra</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-inflector</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/java-inflector</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-undertowr</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/server/petstore/undertow</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>samples</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>samples</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>samples/client/petstore/swift3/default/SwaggerClientTests</module>
|
|
||||||
<module>samples/client/petstore/swift3/promisekit/SwaggerClientTests</module>
|
|
||||||
<module>samples/client/petstore/swift3/rxswift/SwaggerClientTests</module>
|
|
||||||
<module>samples/client/petstore/swift/default/SwaggerClientTests</module>
|
|
||||||
<module>samples/client/petstore/swift/promisekit/SwaggerClientTests</module>
|
|
||||||
<module>samples/client/petstore/swift/rxswift/SwaggerClientTests</module>
|
|
||||||
<!-- comment out objc tests as it's timing out
|
|
||||||
<module>samples/client/petstore/objc/default/SwaggerClientTests</module>
|
|
||||||
<module>samples/client/petstore/objc/core-data/SwaggerClientTests</module>-->
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
</profiles>
|
|
||||||
<modules>
|
|
||||||
<module>modules/openapi-generator</module>
|
|
||||||
<module>modules/openapi-generator-cli</module>
|
|
||||||
<module>modules/openapi-generator-maven-plugin</module>
|
|
||||||
<module>modules/openapi-generator-online</module>
|
|
||||||
</modules>
|
|
||||||
<reporting>
|
|
||||||
<outputDirectory>target/site</outputDirectory>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>net.alchim31.maven</groupId>
|
|
||||||
<artifactId>scala-maven-plugin</artifactId>
|
|
||||||
<version>${scala-maven-plugin-version}</version>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-jxr-plugin</artifactId>
|
|
||||||
<version>2.5</version>
|
|
||||||
<configuration>
|
|
||||||
<aggregate>true</aggregate>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-project-info-reports-plugin</artifactId>
|
|
||||||
<version>2.9</version>
|
|
||||||
<reportSets>
|
|
||||||
<reportSet>
|
|
||||||
<reports>
|
|
||||||
<report>project-team</report>
|
|
||||||
</reports>
|
|
||||||
</reportSet>
|
|
||||||
</reportSets>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</reporting>
|
|
||||||
<dependencyManagement>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<version>${junit-version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.testng</groupId>
|
|
||||||
<artifactId>testng</artifactId>
|
|
||||||
<version>${testng-version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jmockit</groupId>
|
|
||||||
<artifactId>jmockit</artifactId>
|
|
||||||
<version>${jmockit-version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
</dependencyManagement>
|
|
||||||
<repositories>
|
|
||||||
<repository>
|
|
||||||
<id>sonatype-snapshots</id>
|
|
||||||
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
|
|
||||||
<snapshots>
|
|
||||||
<enabled>true</enabled>
|
|
||||||
</snapshots>
|
|
||||||
</repository>
|
|
||||||
</repositories>
|
|
||||||
<properties>
|
|
||||||
<swagger-parser-version>2.0.1</swagger-parser-version>
|
|
||||||
<swagger-core-version>2.0.1</swagger-core-version>
|
|
||||||
<scala-version>2.11.1</scala-version>
|
|
||||||
<felix-version>3.3.0</felix-version>
|
|
||||||
<commons-io-version>2.4</commons-io-version>
|
|
||||||
<commons-cli-version>1.2</commons-cli-version>
|
|
||||||
<junit-version>4.8.1</junit-version>
|
|
||||||
<jackson-version>2.8.9</jackson-version>
|
|
||||||
<maven-plugin-version>1.0.0</maven-plugin-version>
|
|
||||||
<commons-lang-version>3.4</commons-lang-version>
|
|
||||||
<slf4j-version>1.7.12</slf4j-version>
|
|
||||||
<scala-maven-plugin-version>3.2.1</scala-maven-plugin-version>
|
|
||||||
<jmustache-version>1.14</jmustache-version>
|
|
||||||
<testng-version>6.9.6</testng-version>
|
|
||||||
<surefire-version>2.19.1</surefire-version>
|
|
||||||
<jmockit-version>1.25</jmockit-version>
|
|
||||||
<reflections-version>0.9.10</reflections-version>
|
|
||||||
<spring-boot-version>2.0.2.RELEASE</spring-boot-version>
|
|
||||||
</properties>
|
|
||||||
</project>
|
|
||||||
@@ -1,946 +0,0 @@
|
|||||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
|
||||||
<parent>
|
|
||||||
<groupId>org.sonatype.oss</groupId>
|
|
||||||
<artifactId>oss-parent</artifactId>
|
|
||||||
<version>5</version>
|
|
||||||
</parent>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<groupId>org.openapitools</groupId>
|
|
||||||
<artifactId>openapi-generator-project</artifactId>
|
|
||||||
<packaging>pom</packaging>
|
|
||||||
<name>openapi-generator-project</name>
|
|
||||||
<version>3.0.0</version>
|
|
||||||
<url>https://github.com/openapitools/openapi-generator</url>
|
|
||||||
<scm>
|
|
||||||
<connection>scm:git:git@github.com:openapitools/openapi-generator.git</connection>
|
|
||||||
<developerConnection>scm:git:git@github.com:openapitools/openapi-generator.git</developerConnection>
|
|
||||||
<url>https://github.com/openapitools/openapi-generator</url>
|
|
||||||
</scm>
|
|
||||||
<developers>
|
|
||||||
<!-- original author of the project -->
|
|
||||||
<developer>
|
|
||||||
<id>fehguy</id>
|
|
||||||
<name>Tony Tam</name>
|
|
||||||
<email>fehguy@gmail.com</email>
|
|
||||||
</developer>
|
|
||||||
<!-- openapi-generator core team -->
|
|
||||||
<developer>
|
|
||||||
<id>wing328</id>
|
|
||||||
<name>William Cheng</name>
|
|
||||||
<email>wing328hk@gmail.com</email>
|
|
||||||
</developer>
|
|
||||||
<developer>
|
|
||||||
<id>jimschubert</id>
|
|
||||||
<name>Jim Schubert</name>
|
|
||||||
<email>james.schubert@gmail.com</email>
|
|
||||||
</developer>
|
|
||||||
<developer>
|
|
||||||
<id>cbornet</id>
|
|
||||||
<name>Christophe Bornet</name>
|
|
||||||
</developer>
|
|
||||||
<developer>
|
|
||||||
<id>jaz-ah</id>
|
|
||||||
<name>Joseph Zuromski</name>
|
|
||||||
</developer>
|
|
||||||
<developer>
|
|
||||||
<id>ackintosh</id>
|
|
||||||
<name>Akihito Nakano</name>
|
|
||||||
</developer>
|
|
||||||
<developer>
|
|
||||||
<id>JFCote</id>
|
|
||||||
<name>Jean-François Côté</name>
|
|
||||||
</developer>
|
|
||||||
<developer>
|
|
||||||
<id>jmini</id>
|
|
||||||
<name>Jérémie Bresson</name>
|
|
||||||
<email>dev@jmini.fr</email>
|
|
||||||
</developer>
|
|
||||||
</developers>
|
|
||||||
<issueManagement>
|
|
||||||
<system>github</system>
|
|
||||||
<url>https://github.com/openapitools/openapi-generator/issues</url>
|
|
||||||
</issueManagement>
|
|
||||||
<licenses>
|
|
||||||
<license>
|
|
||||||
<name>Apache License 2.0</name>
|
|
||||||
<url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
|
|
||||||
<distribution>repo</distribution>
|
|
||||||
</license>
|
|
||||||
</licenses>
|
|
||||||
<build>
|
|
||||||
<sourceDirectory>src/main/java</sourceDirectory>
|
|
||||||
<outputDirectory>target/classes</outputDirectory>
|
|
||||||
<extensions>
|
|
||||||
<extension>
|
|
||||||
<groupId>org.jvnet.wagon-svn</groupId>
|
|
||||||
<artifactId>wagon-svn</artifactId>
|
|
||||||
<version>1.8</version>
|
|
||||||
</extension>
|
|
||||||
<extension>
|
|
||||||
<groupId>org.apache.maven.wagon</groupId>
|
|
||||||
<artifactId>wagon-ssh-external</artifactId>
|
|
||||||
<version>1.0-alpha-6</version>
|
|
||||||
</extension>
|
|
||||||
<extension>
|
|
||||||
<groupId>org.apache.maven.wagon</groupId>
|
|
||||||
<artifactId>wagon-webdav</artifactId>
|
|
||||||
<version>1.0-beta-1</version>
|
|
||||||
</extension>
|
|
||||||
</extensions>
|
|
||||||
<defaultGoal>install</defaultGoal>
|
|
||||||
<directory>target</directory>
|
|
||||||
<finalName>${project.artifactId}-${project.version}</finalName>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>net.revelc.code</groupId>
|
|
||||||
<artifactId>formatter-maven-plugin</artifactId>
|
|
||||||
<!-- Uncomment this to format before checkstyle -->
|
|
||||||
<!-- <executions>
|
|
||||||
<execution>
|
|
||||||
<id>format</id>
|
|
||||||
<phase>validate</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>format</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions> -->
|
|
||||||
<configuration>
|
|
||||||
<compilerSource>1.8</compilerSource>
|
|
||||||
<compilerCompliance>1.8</compilerCompliance>
|
|
||||||
<compilerTargetPlatform>1.8</compilerTargetPlatform>
|
|
||||||
<lineEnding>LF</lineEnding>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
|
||||||
<version>2.17</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>validate</id>
|
|
||||||
<phase>validate</phase>
|
|
||||||
<configuration>
|
|
||||||
<configLocation>../google_checkstyle.xml</configLocation>
|
|
||||||
<!-- Don't include generated sources a la http://stackoverflow.com/a/30406454 -->
|
|
||||||
<sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
|
|
||||||
<encoding>UTF-8</encoding>
|
|
||||||
<consoleOutput>true</consoleOutput>
|
|
||||||
<failsOnError>true</failsOnError>
|
|
||||||
<linkXRef>false</linkXRef>
|
|
||||||
</configuration>
|
|
||||||
<goals>
|
|
||||||
<goal>check</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.puppycrawl.tools</groupId>
|
|
||||||
<artifactId>checkstyle</artifactId>
|
|
||||||
<version>6.19</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
|
||||||
<version>${surefire-version}</version>
|
|
||||||
<configuration>
|
|
||||||
<testNGArtifactName>none:none</testNGArtifactName>
|
|
||||||
<argLine>-XX:+StartAttachListener</argLine>
|
|
||||||
</configuration>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>test-testng</id>
|
|
||||||
<phase>test</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>test</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<junitArtifactName>none:none</junitArtifactName>
|
|
||||||
<testNGArtifactName>org.testng:testng</testNGArtifactName>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-dependency-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<phase>package</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>copy-dependencies</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<outputDirectory>${project.build.directory}/lib</outputDirectory>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
|
||||||
<version>3.6.1</version>
|
|
||||||
<configuration>
|
|
||||||
<source>1.8</source>
|
|
||||||
<target>1.8</target>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-jar-plugin</artifactId>
|
|
||||||
<version>3.0.2</version>
|
|
||||||
<configuration>
|
|
||||||
<archive>
|
|
||||||
<manifestEntries>
|
|
||||||
<mode>development</mode>
|
|
||||||
<url>${project.url}</url>
|
|
||||||
<implementation-version>${project.version}</implementation-version>
|
|
||||||
<package>org.openapitools</package>
|
|
||||||
</manifestEntries>
|
|
||||||
</archive>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-site-plugin</artifactId>
|
|
||||||
<version>3.5.1</version>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-release-plugin</artifactId>
|
|
||||||
<version>2.5.3</version>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
|
||||||
<version>2.10.4</version>
|
|
||||||
<configuration>
|
|
||||||
<aggregate>true</aggregate>
|
|
||||||
<source>1.8</source>
|
|
||||||
<encoding>UTF-8</encoding>
|
|
||||||
<maxmemory>1g</maxmemory>
|
|
||||||
<excludePackageNames>${javadoc.package.exclude}</excludePackageNames>
|
|
||||||
</configuration>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>attach-javadocs</id>
|
|
||||||
<phase>verify</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>jar</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-source-plugin</artifactId>
|
|
||||||
<version>3.0.1</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>attach-sources</id>
|
|
||||||
<phase>verify</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>jar-no-fork</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-enforcer-plugin</artifactId>
|
|
||||||
<version>1.4.1</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>enforce-versions</id>
|
|
||||||
<goals>
|
|
||||||
<goal>enforce</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<rules>
|
|
||||||
<requireMavenVersion>
|
|
||||||
<version>3.2.5</version>
|
|
||||||
</requireMavenVersion>
|
|
||||||
</rules>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
<pluginManagement>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>net.revelc.code</groupId>
|
|
||||||
<artifactId>formatter-maven-plugin</artifactId>
|
|
||||||
<version>0.5.2</version>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</pluginManagement>
|
|
||||||
</build>
|
|
||||||
<profiles>
|
|
||||||
<profile>
|
|
||||||
<id>release-profile</id>
|
|
||||||
<properties>
|
|
||||||
<skipTests>true</skipTests>
|
|
||||||
</properties>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>net.alchim31.maven</groupId>
|
|
||||||
<artifactId>scala-maven-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<goals>
|
|
||||||
<goal>compile</goal>
|
|
||||||
<goal>testCompile</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
<configuration/>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>build-helper-maven-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>add-source</id>
|
|
||||||
<phase>prepare-package</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>add-source</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<sources>
|
|
||||||
<source>src/main/scala</source>
|
|
||||||
</sources>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>release-sign-artifacts</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>performRelease</name>
|
|
||||||
<value>true</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-gpg-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>sign-artifacts</id>
|
|
||||||
<phase>verify</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>sign</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</profile>
|
|
||||||
<!-- Samples -->
|
|
||||||
<profile>
|
|
||||||
<id>android-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>../samples/client/petstore/android/volley</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>bash-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>../samples/client/petstore/bash</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>clojure-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>clojure</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>../samples/client/petstore/clojure</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>haskell-http-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>haskell-http-client</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<!--<module>../samples/client/petstore/haskell-http-client</module>-->
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>haskell-http-client-integration-test</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>haskell-http-client</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>../samples/client/petstore/haskell-http-client/tests-integration</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-client-jersey1</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>../samples/client/petstore/java/jersey1</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-client-jersey2</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>../samples/client/petstore/java/jersey2</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-client-jersey2-java6</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>../samples/client/petstore/java/jersey2-java6</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-client-okhttp-gson</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>../samples/client/petstore/java/okhttp-gson</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-client-okhttp-gson-parcelable</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>../samples/client/petstore/java/okhttp-gson/parcelableModel</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-client-retrofit</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>../samples/client/petstore/java/retrofit</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-client-retrofit2</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>../samples/client/petstore/java/retrofit2</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-client-retrofit2-rx</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>../samples/client/petstore/java/retrofit2rx</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-client-feign</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>../samples/client/petstore/java/feign</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>javascript-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>javascript</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>../samples/client/petstore/javascript</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>scala-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>scala</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>../samples/client/petstore/scala</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-msf4j-server</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>../samples/server/petstore/java-msf4/</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>jaxrs-cxf-server</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>../samples/server/petstore/jaxrs-cxf</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>jaxrs-resteasy-server</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>../samples/server/petstore/jaxrs-resteasy/default</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>jaxrs-resteasy-server-joda</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>../samples/server/petstore/jaxrs-resteasy/joda</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>jaxrs-resteasy-eap-server</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>../samples/server/petstore/jaxrs-resteasy/eap</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>jaxrs-resteasy-eap-server-joda</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>../samples/server/petstore/jaxrs-resteasy/eap-joda</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>jaxrs-server</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>../samples/server/petstore/jaxrs/jersey2</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>jaxrs-server-jersey1</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>../samples/server/petstore/jaxrs/jersey1</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>typescript-fetch-client-tests-default</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>../samples/client/petstore/typescript-fetch/tests/default</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>typescript-fetch-client-builds-default</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>../samples/client/petstore/typescript-fetch/builds/default</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>typescript-fetch-client-builds-es6-target</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>../samples/client/petstore/typescript-fetch/builds/es6-target</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>typescript-fetch-client-builds-with-npm-version</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>../samples/client/petstore/typescript-fetch/builds/with-npm-version</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>typescript-angularjs-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>../samples/client/petstore/typescript-angularjs/npm</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>typescript-node-npm-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>../samples/client/petstore/typescript-node/npm</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>python-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>../samples/client/petstore/python</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>ruby-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>../samples/client/petstore/ruby</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>go-client</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>../samples/client/petstore/go</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>spring-mvc</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>../samples/server/petstore/spring-mvc</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>springboot-beanvalidation</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>../samples/server/petstore/springboot-beanvalidation</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>springboot-reactive</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>../samples/server/petstore/springboot-reactive</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>springboot</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>../samples/server/petstore/springboot</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>spring-cloud</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>../samples/client/petstore/spring-cloud</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>scalatra-server</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>../samples/server/petstore/scalatra</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-inflector</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>../samples/server/petstore/java-inflector</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>java-undertowr</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>java</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<module>../samples/server/petstore/undertow</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>samples</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>env</name>
|
|
||||||
<value>samples</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<modules>
|
|
||||||
<!-- clients -->
|
|
||||||
<module>../samples/client/petstore/elixir</module>
|
|
||||||
<!--<module>../samples/client/petstore/haskell-http-client</module>-->
|
|
||||||
<module>../samples/client/petstore/erlang-client</module>
|
|
||||||
<!-- servers -->
|
|
||||||
<module>../samples/server/petstore/erlang-server</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
</profiles>
|
|
||||||
<modules>
|
|
||||||
<module>../modules/openapi-generator</module>
|
|
||||||
<module>../modules/openapi-generator-cli</module>
|
|
||||||
<module>../modules/openapi-generator-maven-plugin</module>
|
|
||||||
<module>../modules/openapi-generator-online</module>
|
|
||||||
</modules>
|
|
||||||
<reporting>
|
|
||||||
<outputDirectory>target/site</outputDirectory>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>net.alchim31.maven</groupId>
|
|
||||||
<artifactId>scala-maven-plugin</artifactId>
|
|
||||||
<version>${scala-maven-plugin-version}</version>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-jxr-plugin</artifactId>
|
|
||||||
<version>2.5</version>
|
|
||||||
<configuration>
|
|
||||||
<aggregate>true</aggregate>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-project-info-reports-plugin</artifactId>
|
|
||||||
<version>2.9</version>
|
|
||||||
<reportSets>
|
|
||||||
<reportSet>
|
|
||||||
<reports>
|
|
||||||
<report>project-team</report>
|
|
||||||
</reports>
|
|
||||||
</reportSet>
|
|
||||||
</reportSets>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</reporting>
|
|
||||||
<dependencyManagement>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<version>${junit-version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.testng</groupId>
|
|
||||||
<artifactId>testng</artifactId>
|
|
||||||
<version>${testng-version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jmockit</groupId>
|
|
||||||
<artifactId>jmockit</artifactId>
|
|
||||||
<version>${jmockit-version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
</dependencyManagement>
|
|
||||||
<repositories>
|
|
||||||
<repository>
|
|
||||||
<id>sonatype-snapshots</id>
|
|
||||||
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
|
|
||||||
<snapshots>
|
|
||||||
<enabled>true</enabled>
|
|
||||||
</snapshots>
|
|
||||||
</repository>
|
|
||||||
</repositories>
|
|
||||||
<properties>
|
|
||||||
<swagger-parser-version>2.0.1</swagger-parser-version>
|
|
||||||
<swagger-core-version>2.0.1</swagger-core-version>
|
|
||||||
<scala-version>2.11.1</scala-version>
|
|
||||||
<felix-version>3.3.0</felix-version>
|
|
||||||
<commons-io-version>2.4</commons-io-version>
|
|
||||||
<commons-cli-version>1.2</commons-cli-version>
|
|
||||||
<junit-version>4.8.1</junit-version>
|
|
||||||
<jackson-version>2.8.9</jackson-version>
|
|
||||||
<maven-plugin-version>1.0.0</maven-plugin-version>
|
|
||||||
<commons-lang-version>3.4</commons-lang-version>
|
|
||||||
<slf4j-version>1.7.12</slf4j-version>
|
|
||||||
<scala-maven-plugin-version>3.2.1</scala-maven-plugin-version>
|
|
||||||
<jmustache-version>1.12</jmustache-version>
|
|
||||||
<testng-version>6.9.6</testng-version>
|
|
||||||
<surefire-version>2.19.1</surefire-version>
|
|
||||||
<jmockit-version>1.25</jmockit-version>
|
|
||||||
<reflections-version>0.9.10</reflections-version>
|
|
||||||
<spring-boot-version>2.0.2.RELEASE</spring-boot-version>
|
|
||||||
</properties>
|
|
||||||
</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>
|
||||||
@@ -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>
|
||||||
122
CI/samples.ci/client/petstore/java/jersey2-java6/build.gradle
Normal file
122
CI/samples.ci/client/petstore/java/jersey2-java6/build.gradle
Normal file
@@ -0,0 +1,122 @@
|
|||||||
|
apply plugin: 'idea'
|
||||||
|
apply plugin: 'eclipse'
|
||||||
|
|
||||||
|
group = 'org.openapitools'
|
||||||
|
version = '1.0.0'
|
||||||
|
|
||||||
|
buildscript {
|
||||||
|
repositories {
|
||||||
|
jcenter {
|
||||||
|
url "http://jcenter.bintray.com/"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dependencies {
|
||||||
|
classpath 'com.android.tools.build:gradle:2.3.+'
|
||||||
|
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
jcenter {
|
||||||
|
url "http://jcenter.bintray.com/"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(hasProperty('target') && target == 'android') {
|
||||||
|
|
||||||
|
apply plugin: 'com.android.library'
|
||||||
|
apply plugin: 'com.github.dcendents.android-maven'
|
||||||
|
|
||||||
|
android {
|
||||||
|
compileSdkVersion 25
|
||||||
|
buildToolsVersion '25.0.2'
|
||||||
|
defaultConfig {
|
||||||
|
minSdkVersion 14
|
||||||
|
targetSdkVersion 25
|
||||||
|
}
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility JavaVersion.VERSION_1_6
|
||||||
|
targetCompatibility JavaVersion.VERSION_1_6
|
||||||
|
}
|
||||||
|
|
||||||
|
// Rename the aar correctly
|
||||||
|
libraryVariants.all { variant ->
|
||||||
|
variant.outputs.each { output ->
|
||||||
|
def outputFile = output.outputFile
|
||||||
|
if (outputFile != null && outputFile.name.endsWith('.aar')) {
|
||||||
|
def fileName = "${project.name}-${variant.baseName}-${version}.aar"
|
||||||
|
output.outputFile = new File(outputFile.parent, fileName)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
provided 'javax.annotation:jsr250-api:1.0'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
afterEvaluate {
|
||||||
|
android.libraryVariants.all { variant ->
|
||||||
|
def task = project.tasks.create "jar${variant.name.capitalize()}", Jar
|
||||||
|
task.description = "Create jar artifact for ${variant.name}"
|
||||||
|
task.dependsOn variant.javaCompile
|
||||||
|
task.from variant.javaCompile.destinationDir
|
||||||
|
task.destinationDir = project.file("${project.buildDir}/outputs/jar")
|
||||||
|
task.archiveName = "${project.name}-${variant.baseName}-${version}.jar"
|
||||||
|
artifacts.add('archives', task);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
task sourcesJar(type: Jar) {
|
||||||
|
from android.sourceSets.main.java.srcDirs
|
||||||
|
classifier = 'sources'
|
||||||
|
}
|
||||||
|
|
||||||
|
artifacts {
|
||||||
|
archives sourcesJar
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
apply plugin: 'java'
|
||||||
|
apply plugin: 'maven'
|
||||||
|
sourceCompatibility = JavaVersion.VERSION_1_6
|
||||||
|
targetCompatibility = JavaVersion.VERSION_1_6
|
||||||
|
|
||||||
|
install {
|
||||||
|
repositories.mavenInstaller {
|
||||||
|
pom.artifactId = 'petstore-jersey2-java6'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
task execute(type:JavaExec) {
|
||||||
|
main = System.getProperty('mainClass')
|
||||||
|
classpath = sourceSets.main.runtimeClasspath
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ext {
|
||||||
|
swagger_annotations_version = "1.5.20"
|
||||||
|
jackson_version = "2.9.6"
|
||||||
|
jersey_version = "2.6"
|
||||||
|
commons_io_version=2.5
|
||||||
|
commons_lang3_version=3.6
|
||||||
|
junit_version = "4.12"
|
||||||
|
threetenbp_version = "2.6.4"
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||||
|
compile "org.glassfish.jersey.core:jersey-client:$jersey_version"
|
||||||
|
compile "org.glassfish.jersey.media:jersey-media-multipart:$jersey_version"
|
||||||
|
compile "org.glassfish.jersey.media:jersey-media-json-jackson:$jersey_version"
|
||||||
|
compile "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||||
|
compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||||
|
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_version"
|
||||||
|
compile "commons-io:commons-io:$commons_io_version"
|
||||||
|
compile "org.apache.commons:commons-lang3:$commons_lang3_version"
|
||||||
|
compile "com.github.joschi.jackson:jackson-datatype-threetenbp:$threetenbp_version"
|
||||||
|
compile "com.brsanthu:migbase64:2.2"
|
||||||
|
testCompile "junit:junit:$junit_version"
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package org.openapitools.client;
|
||||||
|
|
||||||
|
import org.junit.*;
|
||||||
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
|
|
||||||
|
public class ConfigurationTest {
|
||||||
|
@Test
|
||||||
|
public void testDefaultApiClient() {
|
||||||
|
ApiClient apiClient = Configuration.getDefaultApiClient();
|
||||||
|
assertNotNull(apiClient);
|
||||||
|
assertEquals("http://petstore.swagger.io:80/v2", apiClient.getBasePath());
|
||||||
|
assertFalse(apiClient.isDebugging());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package org.openapitools.client;
|
||||||
|
|
||||||
|
import org.junit.*;
|
||||||
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
|
|
||||||
|
public class StringUtilTest {
|
||||||
|
@Test
|
||||||
|
public void testContainsIgnoreCase() {
|
||||||
|
assertTrue(StringUtil.containsIgnoreCase(new String[]{"abc"}, "abc"));
|
||||||
|
assertTrue(StringUtil.containsIgnoreCase(new String[]{"abc"}, "ABC"));
|
||||||
|
assertTrue(StringUtil.containsIgnoreCase(new String[]{"ABC"}, "abc"));
|
||||||
|
assertTrue(StringUtil.containsIgnoreCase(new String[]{null, "abc"}, "ABC"));
|
||||||
|
assertTrue(StringUtil.containsIgnoreCase(new String[]{null, "abc"}, null));
|
||||||
|
|
||||||
|
assertFalse(StringUtil.containsIgnoreCase(new String[]{"abc"}, "def"));
|
||||||
|
assertFalse(StringUtil.containsIgnoreCase(new String[]{}, "ABC"));
|
||||||
|
assertFalse(StringUtil.containsIgnoreCase(new String[]{}, null));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testJoin() {
|
||||||
|
String[] array = {"aa", "bb", "cc"};
|
||||||
|
assertEquals("aa,bb,cc", StringUtil.join(array, ","));
|
||||||
|
assertEquals("aa, bb, cc", StringUtil.join(array, ", "));
|
||||||
|
assertEquals("aabbcc", StringUtil.join(array, ""));
|
||||||
|
assertEquals("aa bb cc", StringUtil.join(array, " "));
|
||||||
|
assertEquals("aa\nbb\ncc", StringUtil.join(array, "\n"));
|
||||||
|
|
||||||
|
assertEquals("", StringUtil.join(new String[]{}, ","));
|
||||||
|
assertEquals("abc", StringUtil.join(new String[]{"abc"}, ","));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,292 @@
|
|||||||
|
package org.openapitools.client;
|
||||||
|
|
||||||
|
import org.openapitools.client.auth.*;
|
||||||
|
|
||||||
|
import java.text.DateFormat;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
import org.junit.*;
|
||||||
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
|
|
||||||
|
public class ApiClientTest {
|
||||||
|
ApiClient apiClient = null;
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void setup() {
|
||||||
|
apiClient = new ApiClient();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testParseAndFormatDate() {
|
||||||
|
// default date format
|
||||||
|
String dateStr = "2015-11-07T03:49:09.356Z";
|
||||||
|
assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T03:49:09.356+00:00")));
|
||||||
|
assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T03:49:09.356Z")));
|
||||||
|
assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T05:49:09.356+02:00")));
|
||||||
|
assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T02:49:09.356-01:00")));
|
||||||
|
|
||||||
|
// custom date format: without milli-seconds, custom time zone
|
||||||
|
DateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX", Locale.ROOT);
|
||||||
|
format.setTimeZone(TimeZone.getTimeZone("GMT+10"));
|
||||||
|
apiClient.setDateFormat(format);
|
||||||
|
dateStr = "2015-11-07T13:49:09+10:00";
|
||||||
|
assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T03:49:09+00:00")));
|
||||||
|
assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T03:49:09Z")));
|
||||||
|
assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T00:49:09-03:00")));
|
||||||
|
assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T13:49:09+10:00")));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testIsJsonMime() {
|
||||||
|
assertFalse(apiClient.isJsonMime(null));
|
||||||
|
assertFalse(apiClient.isJsonMime(""));
|
||||||
|
assertFalse(apiClient.isJsonMime("text/plain"));
|
||||||
|
assertFalse(apiClient.isJsonMime("application/xml"));
|
||||||
|
assertFalse(apiClient.isJsonMime("application/jsonp"));
|
||||||
|
assertFalse(apiClient.isJsonMime("example/json"));
|
||||||
|
assertFalse(apiClient.isJsonMime("example/foo+bar+jsonx"));
|
||||||
|
assertFalse(apiClient.isJsonMime("example/foo+bar+xjson"));
|
||||||
|
|
||||||
|
assertTrue(apiClient.isJsonMime("application/json"));
|
||||||
|
assertTrue(apiClient.isJsonMime("application/json; charset=UTF8"));
|
||||||
|
assertTrue(apiClient.isJsonMime("APPLICATION/JSON"));
|
||||||
|
|
||||||
|
assertTrue(apiClient.isJsonMime("application/problem+json"));
|
||||||
|
assertTrue(apiClient.isJsonMime("APPLICATION/PROBLEM+JSON"));
|
||||||
|
assertTrue(apiClient.isJsonMime("application/json\t"));
|
||||||
|
assertTrue(apiClient.isJsonMime("example/foo+bar+json"));
|
||||||
|
assertTrue(apiClient.isJsonMime("example/foo+json;x;y"));
|
||||||
|
assertTrue(apiClient.isJsonMime("example/foo+json\t;"));
|
||||||
|
assertTrue(apiClient.isJsonMime("Example/fOO+JSON"));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testSelectHeaderAccept() {
|
||||||
|
String[] accepts = {"application/json", "application/xml"};
|
||||||
|
assertEquals("application/json", apiClient.selectHeaderAccept(accepts));
|
||||||
|
|
||||||
|
accepts = new String[]{"APPLICATION/XML", "APPLICATION/JSON"};
|
||||||
|
assertEquals("APPLICATION/JSON", apiClient.selectHeaderAccept(accepts));
|
||||||
|
|
||||||
|
accepts = new String[]{"application/xml", "application/json; charset=UTF8"};
|
||||||
|
assertEquals("application/json; charset=UTF8", apiClient.selectHeaderAccept(accepts));
|
||||||
|
|
||||||
|
accepts = new String[]{"text/plain", "application/xml"};
|
||||||
|
assertEquals("text/plain,application/xml", apiClient.selectHeaderAccept(accepts));
|
||||||
|
|
||||||
|
accepts = new String[]{};
|
||||||
|
assertNull(apiClient.selectHeaderAccept(accepts));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testSelectHeaderContentType() {
|
||||||
|
String[] contentTypes = {"application/json", "application/xml"};
|
||||||
|
assertEquals("application/json", apiClient.selectHeaderContentType(contentTypes));
|
||||||
|
|
||||||
|
contentTypes = new String[]{"APPLICATION/JSON", "APPLICATION/XML"};
|
||||||
|
assertEquals("APPLICATION/JSON", apiClient.selectHeaderContentType(contentTypes));
|
||||||
|
|
||||||
|
contentTypes = new String[]{"application/xml", "application/json; charset=UTF8"};
|
||||||
|
assertEquals("application/json; charset=UTF8", apiClient.selectHeaderContentType(contentTypes));
|
||||||
|
|
||||||
|
contentTypes = new String[]{"text/plain", "application/xml"};
|
||||||
|
assertEquals("text/plain", apiClient.selectHeaderContentType(contentTypes));
|
||||||
|
|
||||||
|
contentTypes = new String[]{};
|
||||||
|
assertEquals("application/json", apiClient.selectHeaderContentType(contentTypes));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testGetAuthentications() {
|
||||||
|
Map<String, Authentication> auths = apiClient.getAuthentications();
|
||||||
|
|
||||||
|
Authentication auth = auths.get("api_key");
|
||||||
|
assertNotNull(auth);
|
||||||
|
assertTrue(auth instanceof ApiKeyAuth);
|
||||||
|
ApiKeyAuth apiKeyAuth = (ApiKeyAuth) auth;
|
||||||
|
assertEquals("header", apiKeyAuth.getLocation());
|
||||||
|
assertEquals("api_key", apiKeyAuth.getParamName());
|
||||||
|
|
||||||
|
auth = auths.get("petstore_auth");
|
||||||
|
assertTrue(auth instanceof OAuth);
|
||||||
|
assertSame(auth, apiClient.getAuthentication("petstore_auth"));
|
||||||
|
|
||||||
|
assertNull(auths.get("unknown"));
|
||||||
|
|
||||||
|
try {
|
||||||
|
auths.put("my_auth", new HttpBasicAuth());
|
||||||
|
fail("the authentications returned should not be modifiable");
|
||||||
|
} catch (UnsupportedOperationException e) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Ignore("There is no more basic auth in petstore security definitions")
|
||||||
|
@Test
|
||||||
|
public void testSetUsernameAndPassword() {
|
||||||
|
HttpBasicAuth auth = null;
|
||||||
|
for (Authentication _auth : apiClient.getAuthentications().values()) {
|
||||||
|
if (_auth instanceof HttpBasicAuth) {
|
||||||
|
auth = (HttpBasicAuth) _auth;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
auth.setUsername(null);
|
||||||
|
auth.setPassword(null);
|
||||||
|
|
||||||
|
apiClient.setUsername("my-username");
|
||||||
|
apiClient.setPassword("my-password");
|
||||||
|
assertEquals("my-username", auth.getUsername());
|
||||||
|
assertEquals("my-password", auth.getPassword());
|
||||||
|
|
||||||
|
// reset values
|
||||||
|
auth.setUsername(null);
|
||||||
|
auth.setPassword(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testSetApiKeyAndPrefix() {
|
||||||
|
ApiKeyAuth auth = null;
|
||||||
|
for (Authentication _auth : apiClient.getAuthentications().values()) {
|
||||||
|
if (_auth instanceof ApiKeyAuth) {
|
||||||
|
auth = (ApiKeyAuth) _auth;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
auth.setApiKey(null);
|
||||||
|
auth.setApiKeyPrefix(null);
|
||||||
|
|
||||||
|
apiClient.setApiKey("my-api-key");
|
||||||
|
apiClient.setApiKeyPrefix("Token");
|
||||||
|
assertEquals("my-api-key", auth.getApiKey());
|
||||||
|
assertEquals("Token", auth.getApiKeyPrefix());
|
||||||
|
|
||||||
|
// reset values
|
||||||
|
auth.setApiKey(null);
|
||||||
|
auth.setApiKeyPrefix(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testParameterToPairWhenNameIsInvalid() throws Exception {
|
||||||
|
List<Pair> pairs_a = apiClient.parameterToPair(null, new Integer(1));
|
||||||
|
List<Pair> pairs_b = apiClient.parameterToPair("", new Integer(1));
|
||||||
|
|
||||||
|
assertTrue(pairs_a.isEmpty());
|
||||||
|
assertTrue(pairs_b.isEmpty());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testParameterToPairWhenValueIsNull() throws Exception {
|
||||||
|
List<Pair> pairs = apiClient.parameterToPair("param-a", null);
|
||||||
|
|
||||||
|
assertTrue(pairs.isEmpty());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testParameterToPairWhenValueIsEmptyString() throws Exception {
|
||||||
|
// single empty string
|
||||||
|
List<Pair> pairs = apiClient.parameterToPair("param-a", " ");
|
||||||
|
assertEquals(1, pairs.size());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testParameterToPairWhenValueIsNotCollection() throws Exception {
|
||||||
|
String name = "param-a";
|
||||||
|
Integer value = 1;
|
||||||
|
|
||||||
|
List<Pair> pairs = apiClient.parameterToPair(name, value);
|
||||||
|
|
||||||
|
assertEquals(1, pairs.size());
|
||||||
|
assertEquals(value, Integer.valueOf(pairs.get(0).getValue()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testParameterToPairWhenValueIsCollection() throws Exception {
|
||||||
|
List<Object> values = new ArrayList<Object>();
|
||||||
|
values.add("value-a");
|
||||||
|
values.add(123);
|
||||||
|
values.add(new Date());
|
||||||
|
|
||||||
|
List<Pair> pairs = apiClient.parameterToPair("param-a", values);
|
||||||
|
assertEquals(0, pairs.size());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testParameterToPairsWhenNameIsInvalid() throws Exception {
|
||||||
|
List<Integer> objects = new ArrayList<Integer>();
|
||||||
|
objects.add(new Integer(1));
|
||||||
|
|
||||||
|
List<Pair> pairs_a = apiClient.parameterToPairs("csv", null, objects);
|
||||||
|
List<Pair> pairs_b = apiClient.parameterToPairs("csv", "", objects);
|
||||||
|
|
||||||
|
assertTrue(pairs_a.isEmpty());
|
||||||
|
assertTrue(pairs_b.isEmpty());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testParameterToPairsWhenValueIsNull() throws Exception {
|
||||||
|
List<Pair> pairs = apiClient.parameterToPairs("csv", "param-a", null);
|
||||||
|
|
||||||
|
assertTrue(pairs.isEmpty());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testParameterToPairsWhenValueIsEmptyStrings() throws Exception {
|
||||||
|
// list of empty strings
|
||||||
|
List<String> strs = new ArrayList<String>();
|
||||||
|
strs.add(" ");
|
||||||
|
strs.add(" ");
|
||||||
|
strs.add(" ");
|
||||||
|
|
||||||
|
List<Pair> concatStrings = apiClient.parameterToPairs("csv", "param-a", strs);
|
||||||
|
|
||||||
|
assertEquals(1, concatStrings.size());
|
||||||
|
assertFalse(concatStrings.get(0).getValue().isEmpty()); // should contain some delimiters
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testParameterToPairsWhenValueIsCollection() throws Exception {
|
||||||
|
Map<String, String> collectionFormatMap = new HashMap<String, String>();
|
||||||
|
collectionFormatMap.put("csv", ",");
|
||||||
|
collectionFormatMap.put("tsv", "\t");
|
||||||
|
collectionFormatMap.put("ssv", " ");
|
||||||
|
collectionFormatMap.put("pipes", "|");
|
||||||
|
collectionFormatMap.put("", ","); // no format, must default to csv
|
||||||
|
collectionFormatMap.put("unknown", ","); // all other formats, must default to csv
|
||||||
|
|
||||||
|
String name = "param-a";
|
||||||
|
|
||||||
|
List<Object> values = new ArrayList<Object>();
|
||||||
|
values.add("value-a");
|
||||||
|
values.add(123);
|
||||||
|
values.add(new Date());
|
||||||
|
|
||||||
|
// check for multi separately
|
||||||
|
List<Pair> multiPairs = apiClient.parameterToPairs("multi", name, values);
|
||||||
|
assertEquals(values.size(), multiPairs.size());
|
||||||
|
for (int i = 0; i < values.size(); i++) {
|
||||||
|
assertEquals(apiClient.escapeString(apiClient.parameterToString(values.get(i))), multiPairs.get(i).getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
// all other formats
|
||||||
|
for (String collectionFormat : collectionFormatMap.keySet()) {
|
||||||
|
List<Pair> pairs = apiClient.parameterToPairs(collectionFormat, name, values);
|
||||||
|
|
||||||
|
assertEquals(1, pairs.size());
|
||||||
|
|
||||||
|
String delimiter = collectionFormatMap.get(collectionFormat);
|
||||||
|
if (!delimiter.equals(",")) {
|
||||||
|
// commas are not escaped because they are reserved characters in URIs
|
||||||
|
delimiter = apiClient.escapeString(delimiter);
|
||||||
|
}
|
||||||
|
String[] pairValueSplit = pairs.get(0).getValue().split(delimiter);
|
||||||
|
|
||||||
|
// must equal input values
|
||||||
|
assertEquals(values.size(), pairValueSplit.length);
|
||||||
|
for (int i = 0; i < values.size(); i++) {
|
||||||
|
assertEquals(apiClient.escapeString(apiClient.parameterToString(values.get(i))), pairValueSplit[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
package org.openapitools.client.auth;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.openapitools.client.Pair;
|
||||||
|
import org.junit.*;
|
||||||
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
|
|
||||||
|
public class ApiKeyAuthTest {
|
||||||
|
@Test
|
||||||
|
public void testApplyToParamsInQuery() {
|
||||||
|
List<Pair> queryParams = new ArrayList<Pair>();
|
||||||
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
ApiKeyAuth auth = new ApiKeyAuth("query", "api_key");
|
||||||
|
auth.setApiKey("my-api-key");
|
||||||
|
auth.applyToParams(queryParams, headerParams);
|
||||||
|
|
||||||
|
assertEquals(1, queryParams.size());
|
||||||
|
for (Pair queryParam : queryParams) {
|
||||||
|
assertEquals("my-api-key", queryParam.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
// no changes to header parameters
|
||||||
|
assertEquals(0, headerParams.size());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testApplyToParamsInHeaderWithPrefix() {
|
||||||
|
List<Pair> queryParams = new ArrayList<Pair>();
|
||||||
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
ApiKeyAuth auth = new ApiKeyAuth("header", "X-API-TOKEN");
|
||||||
|
auth.setApiKey("my-api-token");
|
||||||
|
auth.setApiKeyPrefix("Token");
|
||||||
|
auth.applyToParams(queryParams, headerParams);
|
||||||
|
|
||||||
|
// no changes to query parameters
|
||||||
|
assertEquals(0, queryParams.size());
|
||||||
|
assertEquals(1, headerParams.size());
|
||||||
|
assertEquals("Token my-api-token", headerParams.get("X-API-TOKEN"));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
package org.openapitools.client.auth;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.openapitools.client.Pair;
|
||||||
|
import org.junit.*;
|
||||||
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
|
|
||||||
|
public class HttpBasicAuthTest {
|
||||||
|
HttpBasicAuth auth = null;
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void setup() {
|
||||||
|
auth = new HttpBasicAuth();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testApplyToParams() {
|
||||||
|
List<Pair> queryParams = new ArrayList<Pair>();
|
||||||
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
auth.setUsername("my-username");
|
||||||
|
auth.setPassword("my-password");
|
||||||
|
auth.applyToParams(queryParams, headerParams);
|
||||||
|
|
||||||
|
// no changes to query parameters
|
||||||
|
assertEquals(0, queryParams.size());
|
||||||
|
assertEquals(1, headerParams.size());
|
||||||
|
// the string below is base64-encoded result of "my-username:my-password" with the "Basic " prefix
|
||||||
|
String expected = "Basic bXktdXNlcm5hbWU6bXktcGFzc3dvcmQ=";
|
||||||
|
assertEquals(expected, headerParams.get("Authorization"));
|
||||||
|
|
||||||
|
// null username should be treated as empty string
|
||||||
|
auth.setUsername(null);
|
||||||
|
auth.applyToParams(queryParams, headerParams);
|
||||||
|
// the string below is base64-encoded result of ":my-password" with the "Basic " prefix
|
||||||
|
expected = "Basic Om15LXBhc3N3b3Jk";
|
||||||
|
assertEquals(expected, headerParams.get("Authorization"));
|
||||||
|
|
||||||
|
// null password should be treated as empty string
|
||||||
|
auth.setUsername("my-username");
|
||||||
|
auth.setPassword(null);
|
||||||
|
auth.applyToParams(queryParams, headerParams);
|
||||||
|
// the string below is base64-encoded result of "my-username:" with the "Basic " prefix
|
||||||
|
expected = "Basic bXktdXNlcm5hbWU6";
|
||||||
|
assertEquals(expected, headerParams.get("Authorization"));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
package org.openapitools.client.model;
|
||||||
|
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import com.fasterxml.jackson.databind.ObjectWriter;
|
||||||
|
import com.fasterxml.jackson.databind.SerializationFeature;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertEquals;
|
||||||
|
import static org.junit.Assert.assertTrue;
|
||||||
|
import static org.junit.Assert.fail;
|
||||||
|
|
||||||
|
public class EnumValueTest {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testEnumClass() {
|
||||||
|
assertEquals(EnumClass._ABC.toString(), "_abc");
|
||||||
|
assertEquals(EnumClass._EFG.toString(), "-efg");
|
||||||
|
assertEquals(EnumClass._XYZ_.toString(), "(xyz)");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testEnumTest() {
|
||||||
|
// test enum value
|
||||||
|
EnumTest enumTest = new EnumTest();
|
||||||
|
enumTest.setEnumString(EnumTest.EnumStringEnum.LOWER);
|
||||||
|
enumTest.setEnumInteger(EnumTest.EnumIntegerEnum.NUMBER_1);
|
||||||
|
enumTest.setEnumNumber(EnumTest.EnumNumberEnum.NUMBER_1_DOT_1);
|
||||||
|
|
||||||
|
assertEquals(EnumTest.EnumStringEnum.UPPER.toString(), "UPPER");
|
||||||
|
assertEquals(EnumTest.EnumStringEnum.UPPER.getValue(), "UPPER");
|
||||||
|
assertEquals(EnumTest.EnumStringEnum.LOWER.toString(), "lower");
|
||||||
|
assertEquals(EnumTest.EnumStringEnum.LOWER.getValue(), "lower");
|
||||||
|
|
||||||
|
assertEquals(EnumTest.EnumIntegerEnum.NUMBER_1.toString(), "1");
|
||||||
|
assertTrue(EnumTest.EnumIntegerEnum.NUMBER_1.getValue() == 1);
|
||||||
|
assertEquals(EnumTest.EnumIntegerEnum.NUMBER_MINUS_1.toString(), "-1");
|
||||||
|
assertTrue(EnumTest.EnumIntegerEnum.NUMBER_MINUS_1.getValue() == -1);
|
||||||
|
|
||||||
|
assertEquals(EnumTest.EnumNumberEnum.NUMBER_1_DOT_1.toString(), "1.1");
|
||||||
|
assertTrue(EnumTest.EnumNumberEnum.NUMBER_1_DOT_1.getValue() == 1.1);
|
||||||
|
assertEquals(EnumTest.EnumNumberEnum.NUMBER_MINUS_1_DOT_2.toString(), "-1.2");
|
||||||
|
assertTrue(EnumTest.EnumNumberEnum.NUMBER_MINUS_1_DOT_2.getValue() == -1.2);
|
||||||
|
|
||||||
|
try {
|
||||||
|
// test serialization (object => json)
|
||||||
|
ObjectMapper mapper = new ObjectMapper();
|
||||||
|
mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING);
|
||||||
|
ObjectWriter ow = mapper.writer();
|
||||||
|
String json = ow.writeValueAsString(enumTest);
|
||||||
|
assertEquals(json, "{\"enum_string\":\"lower\",\"enum_string_required\":null,\"enum_integer\":1,\"enum_number\":1.1,\"outerEnum\":null}");
|
||||||
|
|
||||||
|
// test deserialization (json => object)
|
||||||
|
EnumTest fromString = mapper.readValue(json, EnumTest.class);
|
||||||
|
assertEquals(fromString.getEnumString().toString(), "lower");
|
||||||
|
assertEquals(fromString.getEnumInteger().toString(), "1");
|
||||||
|
assertEquals(fromString.getEnumNumber().toString(), "1.1");
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
fail("Exception thrown during serialization/deserialzation of JSON: " + e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
package org.openapitools.client;
|
||||||
|
|
||||||
|
import org.openapitools.client.model.Order;
|
||||||
|
|
||||||
|
import java.lang.Exception;
|
||||||
|
|
||||||
|
import java.time.OffsetDateTime;
|
||||||
|
import java.time.ZoneId;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
|
import org.junit.*;
|
||||||
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
|
|
||||||
|
public class JSONTest {
|
||||||
|
JSON json = null;
|
||||||
|
Order order = null;
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void setup() {
|
||||||
|
json = new JSON();
|
||||||
|
order = new Order();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testDefaultDate() throws Exception {
|
||||||
|
final DateTimeFormatter dateFormat = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
|
||||||
|
final String dateStr = "2015-11-07T14:11:05.267Z";
|
||||||
|
order.setShipDate(dateFormat.parse(dateStr, OffsetDateTime::from));
|
||||||
|
|
||||||
|
String str = json.getContext(null).writeValueAsString(order);
|
||||||
|
Order o = json.getContext(null).readValue(str, Order.class);
|
||||||
|
assertEquals(dateStr, dateFormat.format(o.getShipDate()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testCustomDate() throws Exception {
|
||||||
|
final DateTimeFormatter dateFormat = DateTimeFormatter.ISO_OFFSET_DATE_TIME.withZone(ZoneId.of("Etc/GMT+2"));
|
||||||
|
final String dateStr = "2015-11-07T14:11:05-02:00";
|
||||||
|
order.setShipDate(dateFormat.parse(dateStr, OffsetDateTime::from));
|
||||||
|
|
||||||
|
String str = json.getContext(null).writeValueAsString(order);
|
||||||
|
Order o = json.getContext(null).readValue(str, Order.class);
|
||||||
|
assertEquals(dateStr, dateFormat.format(o.getShipDate()));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,250 @@
|
|||||||
|
package org.openapitools.client;
|
||||||
|
|
||||||
|
import org.openapitools.client.auth.*;
|
||||||
|
|
||||||
|
import java.text.DateFormat;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
import org.junit.*;
|
||||||
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
|
|
||||||
|
public class ApiClientTest {
|
||||||
|
ApiClient apiClient = null;
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void setup() {
|
||||||
|
apiClient = new ApiClient();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testParseAndFormatDate() {
|
||||||
|
// default date format
|
||||||
|
String dateStr = "2015-11-07T03:49:09.356Z";
|
||||||
|
assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T03:49:09.356+00:00")));
|
||||||
|
assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T03:49:09.356Z")));
|
||||||
|
assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T05:49:09.356+02:00")));
|
||||||
|
assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T02:49:09.356-01:00")));
|
||||||
|
|
||||||
|
// custom date format: without milli-seconds, custom time zone
|
||||||
|
DateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX", Locale.ROOT);
|
||||||
|
format.setTimeZone(TimeZone.getTimeZone("GMT+10"));
|
||||||
|
apiClient.setDateFormat(format);
|
||||||
|
dateStr = "2015-11-07T13:49:09+10:00";
|
||||||
|
assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T03:49:09+00:00")));
|
||||||
|
assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T03:49:09Z")));
|
||||||
|
assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T00:49:09-03:00")));
|
||||||
|
assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T13:49:09+10:00")));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testIsJsonMime() {
|
||||||
|
assertFalse(apiClient.isJsonMime(null));
|
||||||
|
assertFalse(apiClient.isJsonMime(""));
|
||||||
|
assertFalse(apiClient.isJsonMime("text/plain"));
|
||||||
|
assertFalse(apiClient.isJsonMime("application/xml"));
|
||||||
|
assertFalse(apiClient.isJsonMime("application/jsonp"));
|
||||||
|
assertFalse(apiClient.isJsonMime("example/json"));
|
||||||
|
assertFalse(apiClient.isJsonMime("example/foo+bar+jsonx"));
|
||||||
|
assertFalse(apiClient.isJsonMime("example/foo+bar+xjson"));
|
||||||
|
|
||||||
|
assertTrue(apiClient.isJsonMime("application/json"));
|
||||||
|
assertTrue(apiClient.isJsonMime("application/json; charset=UTF8"));
|
||||||
|
assertTrue(apiClient.isJsonMime("APPLICATION/JSON"));
|
||||||
|
|
||||||
|
assertTrue(apiClient.isJsonMime("application/problem+json"));
|
||||||
|
assertTrue(apiClient.isJsonMime("APPLICATION/PROBLEM+JSON"));
|
||||||
|
assertTrue(apiClient.isJsonMime("application/json\t"));
|
||||||
|
assertTrue(apiClient.isJsonMime("example/foo+bar+json"));
|
||||||
|
assertTrue(apiClient.isJsonMime("example/foo+json;x;y"));
|
||||||
|
assertTrue(apiClient.isJsonMime("example/foo+json\t;"));
|
||||||
|
assertTrue(apiClient.isJsonMime("Example/fOO+JSON"));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testSelectHeaderAccept() {
|
||||||
|
String[] accepts = {"application/json", "application/xml"};
|
||||||
|
assertEquals("application/json", apiClient.selectHeaderAccept(accepts));
|
||||||
|
|
||||||
|
accepts = new String[]{"APPLICATION/XML", "APPLICATION/JSON"};
|
||||||
|
assertEquals("APPLICATION/JSON", apiClient.selectHeaderAccept(accepts));
|
||||||
|
|
||||||
|
accepts = new String[]{"application/xml", "application/json; charset=UTF8"};
|
||||||
|
assertEquals("application/json; charset=UTF8", apiClient.selectHeaderAccept(accepts));
|
||||||
|
|
||||||
|
accepts = new String[]{"text/plain", "application/xml"};
|
||||||
|
assertEquals("text/plain,application/xml", apiClient.selectHeaderAccept(accepts));
|
||||||
|
|
||||||
|
accepts = new String[]{};
|
||||||
|
assertNull(apiClient.selectHeaderAccept(accepts));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testSelectHeaderContentType() {
|
||||||
|
String[] contentTypes = {"application/json", "application/xml"};
|
||||||
|
assertEquals("application/json", apiClient.selectHeaderContentType(contentTypes));
|
||||||
|
|
||||||
|
contentTypes = new String[]{"APPLICATION/JSON", "APPLICATION/XML"};
|
||||||
|
assertEquals("APPLICATION/JSON", apiClient.selectHeaderContentType(contentTypes));
|
||||||
|
|
||||||
|
contentTypes = new String[]{"application/xml", "application/json; charset=UTF8"};
|
||||||
|
assertEquals("application/json; charset=UTF8", apiClient.selectHeaderContentType(contentTypes));
|
||||||
|
|
||||||
|
contentTypes = new String[]{"text/plain", "application/xml"};
|
||||||
|
assertEquals("text/plain", apiClient.selectHeaderContentType(contentTypes));
|
||||||
|
|
||||||
|
contentTypes = new String[]{};
|
||||||
|
assertEquals("application/json", apiClient.selectHeaderContentType(contentTypes));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testGetAuthentications() {
|
||||||
|
Map<String, Authentication> auths = apiClient.getAuthentications();
|
||||||
|
|
||||||
|
Authentication auth = auths.get("api_key");
|
||||||
|
assertNotNull(auth);
|
||||||
|
assertTrue(auth instanceof ApiKeyAuth);
|
||||||
|
ApiKeyAuth apiKeyAuth = (ApiKeyAuth) auth;
|
||||||
|
assertEquals("header", apiKeyAuth.getLocation());
|
||||||
|
assertEquals("api_key", apiKeyAuth.getParamName());
|
||||||
|
|
||||||
|
auth = auths.get("petstore_auth");
|
||||||
|
assertTrue(auth instanceof OAuth);
|
||||||
|
assertSame(auth, apiClient.getAuthentication("petstore_auth"));
|
||||||
|
|
||||||
|
assertNull(auths.get("unknown"));
|
||||||
|
|
||||||
|
try {
|
||||||
|
auths.put("my_auth", new HttpBasicAuth());
|
||||||
|
fail("the authentications returned should not be modifiable");
|
||||||
|
} catch (UnsupportedOperationException e) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Ignore("There is no more basic auth in petstore security definitions")
|
||||||
|
@Test
|
||||||
|
public void testSetUsernameAndPassword() {
|
||||||
|
HttpBasicAuth auth = null;
|
||||||
|
for (Authentication _auth : apiClient.getAuthentications().values()) {
|
||||||
|
if (_auth instanceof HttpBasicAuth) {
|
||||||
|
auth = (HttpBasicAuth) _auth;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
auth.setUsername(null);
|
||||||
|
auth.setPassword(null);
|
||||||
|
|
||||||
|
apiClient.setUsername("my-username");
|
||||||
|
apiClient.setPassword("my-password");
|
||||||
|
assertEquals("my-username", auth.getUsername());
|
||||||
|
assertEquals("my-password", auth.getPassword());
|
||||||
|
|
||||||
|
// reset values
|
||||||
|
auth.setUsername(null);
|
||||||
|
auth.setPassword(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testSetApiKeyAndPrefix() {
|
||||||
|
ApiKeyAuth auth = null;
|
||||||
|
for (Authentication _auth : apiClient.getAuthentications().values()) {
|
||||||
|
if (_auth instanceof ApiKeyAuth) {
|
||||||
|
auth = (ApiKeyAuth) _auth;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
auth.setApiKey(null);
|
||||||
|
auth.setApiKeyPrefix(null);
|
||||||
|
|
||||||
|
apiClient.setApiKey("my-api-key");
|
||||||
|
apiClient.setApiKeyPrefix("Token");
|
||||||
|
assertEquals("my-api-key", auth.getApiKey());
|
||||||
|
assertEquals("Token", auth.getApiKeyPrefix());
|
||||||
|
|
||||||
|
// reset values
|
||||||
|
auth.setApiKey(null);
|
||||||
|
auth.setApiKeyPrefix(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testParameterToPairsWhenNameIsInvalid() throws Exception {
|
||||||
|
List<Pair> pairs_a = apiClient.parameterToPairs("csv", null, new Integer(1));
|
||||||
|
List<Pair> pairs_b = apiClient.parameterToPairs("csv", "", new Integer(1));
|
||||||
|
|
||||||
|
assertTrue(pairs_a.isEmpty());
|
||||||
|
assertTrue(pairs_b.isEmpty());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testParameterToPairsWhenValueIsNull() throws Exception {
|
||||||
|
List<Pair> pairs = apiClient.parameterToPairs("csv", "param-a", null);
|
||||||
|
|
||||||
|
assertTrue(pairs.isEmpty());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testParameterToPairsWhenValueIsEmptyStrings() throws Exception {
|
||||||
|
|
||||||
|
// single empty string
|
||||||
|
List<Pair> pairs = apiClient.parameterToPairs("csv", "param-a", " ");
|
||||||
|
assertEquals(1, pairs.size());
|
||||||
|
|
||||||
|
// list of empty strings
|
||||||
|
List<String> strs = new ArrayList<String>();
|
||||||
|
strs.add(" ");
|
||||||
|
strs.add(" ");
|
||||||
|
strs.add(" ");
|
||||||
|
|
||||||
|
List<Pair> concatStrings = apiClient.parameterToPairs("csv", "param-a", strs);
|
||||||
|
|
||||||
|
assertEquals(1, concatStrings.size());
|
||||||
|
assertFalse(concatStrings.get(0).getValue().isEmpty()); // should contain some delimiters
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testParameterToPairsWhenValueIsNotCollection() throws Exception {
|
||||||
|
String name = "param-a";
|
||||||
|
Integer value = 1;
|
||||||
|
|
||||||
|
List<Pair> pairs = apiClient.parameterToPairs("csv", name, value);
|
||||||
|
|
||||||
|
assertEquals(1, pairs.size());
|
||||||
|
assertEquals(value, Integer.valueOf(pairs.get(0).getValue()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testParameterToPairsWhenValueIsCollection() throws Exception {
|
||||||
|
Map<String, String> collectionFormatMap = new HashMap<String, String>();
|
||||||
|
collectionFormatMap.put("csv", ",");
|
||||||
|
collectionFormatMap.put("tsv", "\t");
|
||||||
|
collectionFormatMap.put("ssv", " ");
|
||||||
|
collectionFormatMap.put("pipes", "\\|");
|
||||||
|
collectionFormatMap.put("", ","); // no format, must default to csv
|
||||||
|
collectionFormatMap.put("unknown", ","); // all other formats, must default to csv
|
||||||
|
|
||||||
|
String name = "param-a";
|
||||||
|
|
||||||
|
List<Object> values = new ArrayList<Object>();
|
||||||
|
values.add("value-a");
|
||||||
|
values.add(123);
|
||||||
|
values.add(new Date());
|
||||||
|
|
||||||
|
// check for multi separately
|
||||||
|
List<Pair> multiPairs = apiClient.parameterToPairs("multi", name, values);
|
||||||
|
assertEquals(values.size(), multiPairs.size());
|
||||||
|
|
||||||
|
// all other formats
|
||||||
|
for (String collectionFormat : collectionFormatMap.keySet()) {
|
||||||
|
List<Pair> pairs = apiClient.parameterToPairs(collectionFormat, name, values);
|
||||||
|
|
||||||
|
assertEquals(1, pairs.size());
|
||||||
|
|
||||||
|
String delimiter = collectionFormatMap.get(collectionFormat);
|
||||||
|
String[] pairValueSplit = pairs.get(0).getValue().split(delimiter);
|
||||||
|
|
||||||
|
// must equal input values
|
||||||
|
assertEquals(values.size(), pairValueSplit.length);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
package org.openapitools.client;
|
||||||
|
|
||||||
|
import org.openapitools.client.model.Order;
|
||||||
|
import org.junit.Before;
|
||||||
|
import org.junit.Test;
|
||||||
|
import org.threeten.bp.OffsetDateTime;
|
||||||
|
import org.threeten.bp.ZoneId;
|
||||||
|
import org.threeten.bp.format.DateTimeFormatter;
|
||||||
|
|
||||||
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
|
|
||||||
|
public class JSONTest {
|
||||||
|
private JSON json = null;
|
||||||
|
private Order order = null;
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void setup() {
|
||||||
|
json = new ApiClient().getJSON();
|
||||||
|
order = new Order();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testDefaultDate() throws Exception {
|
||||||
|
final DateTimeFormatter dateFormat = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
|
||||||
|
final String dateStr = "2015-11-07T14:11:05.267Z";
|
||||||
|
order.setShipDate(dateFormat.parse(dateStr, OffsetDateTime.FROM));
|
||||||
|
|
||||||
|
String str = json.getContext(null).writeValueAsString(order);
|
||||||
|
Order o = json.getContext(null).readValue(str, Order.class);
|
||||||
|
assertEquals(dateStr, dateFormat.format(o.getShipDate()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testCustomDate() throws Exception {
|
||||||
|
final DateTimeFormatter dateFormat = DateTimeFormatter.ISO_OFFSET_DATE_TIME.withZone(ZoneId.of("Etc/GMT+2"));
|
||||||
|
final String dateStr = "2015-11-07T14:11:05-02:00";
|
||||||
|
order.setShipDate(dateFormat.parse(dateStr, OffsetDateTime.FROM));
|
||||||
|
|
||||||
|
String str = json.getContext(null).writeValueAsString(order);
|
||||||
|
Order o = json.getContext(null).readValue(str, Order.class);
|
||||||
|
assertEquals(dateStr, dateFormat.format(o.getShipDate()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testSqlDateSerialization() throws Exception {
|
||||||
|
String str = json.getContext(null).writeValueAsString(new java.sql.Date(10));
|
||||||
|
assertEquals("\"1970-01-01\"", str);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testSqlDateDeserialization() throws Exception {
|
||||||
|
final String str = "1970-01-01";
|
||||||
|
java.sql.Date date = json.getContext(null).readValue("\"" + str + "\"", java.sql.Date.class);
|
||||||
|
assertEquals(date.toString(), str);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
package org.openapitools.client.auth;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.openapitools.client.Pair;
|
||||||
|
import org.junit.*;
|
||||||
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
|
|
||||||
|
public class ApiKeyAuthTest {
|
||||||
|
@Test
|
||||||
|
public void testApplyToParamsInQuery() {
|
||||||
|
List<Pair> queryParams = new ArrayList<Pair>();
|
||||||
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
ApiKeyAuth auth = new ApiKeyAuth("query", "api_key");
|
||||||
|
auth.setApiKey("my-api-key");
|
||||||
|
auth.applyToParams(queryParams, headerParams);
|
||||||
|
|
||||||
|
assertEquals(1, queryParams.size());
|
||||||
|
for (Pair queryParam : queryParams) {
|
||||||
|
assertEquals("my-api-key", queryParam.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
// no changes to header parameters
|
||||||
|
assertEquals(0, headerParams.size());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testApplyToParamsInHeaderWithPrefix() {
|
||||||
|
List<Pair> queryParams = new ArrayList<Pair>();
|
||||||
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
ApiKeyAuth auth = new ApiKeyAuth("header", "X-API-TOKEN");
|
||||||
|
auth.setApiKey("my-api-token");
|
||||||
|
auth.setApiKeyPrefix("Token");
|
||||||
|
auth.applyToParams(queryParams, headerParams);
|
||||||
|
|
||||||
|
// no changes to query parameters
|
||||||
|
assertEquals(0, queryParams.size());
|
||||||
|
assertEquals(1, headerParams.size());
|
||||||
|
assertEquals("Token my-api-token", headerParams.get("X-API-TOKEN"));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
package org.openapitools.client.auth;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.openapitools.client.Pair;
|
||||||
|
import org.junit.*;
|
||||||
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
|
|
||||||
|
public class HttpBasicAuthTest {
|
||||||
|
HttpBasicAuth auth = null;
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void setup() {
|
||||||
|
auth = new HttpBasicAuth();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testApplyToParams() {
|
||||||
|
List<Pair> queryParams = new ArrayList<Pair>();
|
||||||
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
auth.setUsername("my-username");
|
||||||
|
auth.setPassword("my-password");
|
||||||
|
auth.applyToParams(queryParams, headerParams);
|
||||||
|
|
||||||
|
// no changes to query parameters
|
||||||
|
assertEquals(0, queryParams.size());
|
||||||
|
assertEquals(1, headerParams.size());
|
||||||
|
// the string below is base64-encoded result of "my-username:my-password" with the "Basic " prefix
|
||||||
|
String expected = "Basic bXktdXNlcm5hbWU6bXktcGFzc3dvcmQ=";
|
||||||
|
assertEquals(expected, headerParams.get("Authorization"));
|
||||||
|
|
||||||
|
// null username should be treated as empty string
|
||||||
|
auth.setUsername(null);
|
||||||
|
auth.applyToParams(queryParams, headerParams);
|
||||||
|
// the string below is base64-encoded result of ":my-password" with the "Basic " prefix
|
||||||
|
expected = "Basic Om15LXBhc3N3b3Jk";
|
||||||
|
assertEquals(expected, headerParams.get("Authorization"));
|
||||||
|
|
||||||
|
// null password should be treated as empty string
|
||||||
|
auth.setUsername("my-username");
|
||||||
|
auth.setPassword(null);
|
||||||
|
auth.applyToParams(queryParams, headerParams);
|
||||||
|
// the string below is base64-encoded result of "my-username:" with the "Basic " prefix
|
||||||
|
expected = "Basic bXktdXNlcm5hbWU6";
|
||||||
|
assertEquals(expected, headerParams.get("Authorization"));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
package org.openapitools.client.model;
|
||||||
|
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import com.fasterxml.jackson.databind.ObjectWriter;
|
||||||
|
import com.fasterxml.jackson.databind.SerializationFeature;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertEquals;
|
||||||
|
import static org.junit.Assert.assertTrue;
|
||||||
|
import static org.junit.Assert.fail;
|
||||||
|
|
||||||
|
public class EnumValueTest {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testEnumClass() {
|
||||||
|
assertEquals(EnumClass._ABC.toString(), "_abc");
|
||||||
|
assertEquals(EnumClass._EFG.toString(), "-efg");
|
||||||
|
assertEquals(EnumClass._XYZ_.toString(), "(xyz)");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testEnumTest() {
|
||||||
|
// test enum value
|
||||||
|
EnumTest enumTest = new EnumTest();
|
||||||
|
enumTest.setEnumString(EnumTest.EnumStringEnum.LOWER);
|
||||||
|
enumTest.setEnumInteger(EnumTest.EnumIntegerEnum.NUMBER_1);
|
||||||
|
enumTest.setEnumNumber(EnumTest.EnumNumberEnum.NUMBER_1_DOT_1);
|
||||||
|
|
||||||
|
assertEquals(EnumTest.EnumStringEnum.UPPER.toString(), "UPPER");
|
||||||
|
assertEquals(EnumTest.EnumStringEnum.UPPER.getValue(), "UPPER");
|
||||||
|
assertEquals(EnumTest.EnumStringEnum.LOWER.toString(), "lower");
|
||||||
|
assertEquals(EnumTest.EnumStringEnum.LOWER.getValue(), "lower");
|
||||||
|
|
||||||
|
assertEquals(EnumTest.EnumIntegerEnum.NUMBER_1.toString(), "1");
|
||||||
|
assertTrue(EnumTest.EnumIntegerEnum.NUMBER_1.getValue() == 1);
|
||||||
|
assertEquals(EnumTest.EnumIntegerEnum.NUMBER_MINUS_1.toString(), "-1");
|
||||||
|
assertTrue(EnumTest.EnumIntegerEnum.NUMBER_MINUS_1.getValue() == -1);
|
||||||
|
|
||||||
|
assertEquals(EnumTest.EnumNumberEnum.NUMBER_1_DOT_1.toString(), "1.1");
|
||||||
|
assertTrue(EnumTest.EnumNumberEnum.NUMBER_1_DOT_1.getValue() == 1.1);
|
||||||
|
assertEquals(EnumTest.EnumNumberEnum.NUMBER_MINUS_1_DOT_2.toString(), "-1.2");
|
||||||
|
assertTrue(EnumTest.EnumNumberEnum.NUMBER_MINUS_1_DOT_2.getValue() == -1.2);
|
||||||
|
|
||||||
|
try {
|
||||||
|
// test serialization (object => json)
|
||||||
|
ObjectMapper mapper = new ObjectMapper();
|
||||||
|
mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING);
|
||||||
|
ObjectWriter ow = mapper.writer();
|
||||||
|
String json = ow.writeValueAsString(enumTest);
|
||||||
|
assertEquals(json, "{\"enum_string\":\"lower\",\"enum_string_required\":null,\"enum_integer\":1,\"enum_number\":1.1,\"outerEnum\":null}");
|
||||||
|
|
||||||
|
// test deserialization (json => object)
|
||||||
|
EnumTest fromString = mapper.readValue(json, EnumTest.class);
|
||||||
|
assertEquals(fromString.getEnumString().toString(), "lower");
|
||||||
|
assertEquals(fromString.getEnumInteger().toString(), "1");
|
||||||
|
assertEquals(fromString.getEnumNumber().toString(), "1.1");
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
fail("Exception thrown during serialization/deserialzation of JSON: " + e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,352 @@
|
|||||||
|
package org.openapitools.client;
|
||||||
|
|
||||||
|
import okhttp3.OkHttpClient;
|
||||||
|
import org.openapitools.client.auth.*;
|
||||||
|
|
||||||
|
import java.text.DateFormat;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.TimeZone;
|
||||||
|
|
||||||
|
import org.junit.*;
|
||||||
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
|
|
||||||
|
public class ApiClientTest {
|
||||||
|
ApiClient apiClient;
|
||||||
|
JSON json;
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void setup() {
|
||||||
|
apiClient = new ApiClient();
|
||||||
|
json = apiClient.getJSON();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testIsJsonMime() {
|
||||||
|
assertFalse(apiClient.isJsonMime(null));
|
||||||
|
assertFalse(apiClient.isJsonMime(""));
|
||||||
|
assertFalse(apiClient.isJsonMime("text/plain"));
|
||||||
|
assertFalse(apiClient.isJsonMime("application/xml"));
|
||||||
|
assertFalse(apiClient.isJsonMime("application/jsonp"));
|
||||||
|
assertFalse(apiClient.isJsonMime("example/json"));
|
||||||
|
assertFalse(apiClient.isJsonMime("example/foo+bar+jsonx"));
|
||||||
|
assertFalse(apiClient.isJsonMime("example/foo+bar+xjson"));
|
||||||
|
|
||||||
|
assertTrue(apiClient.isJsonMime("application/json"));
|
||||||
|
assertTrue(apiClient.isJsonMime("application/json; charset=UTF8"));
|
||||||
|
assertTrue(apiClient.isJsonMime("APPLICATION/JSON"));
|
||||||
|
|
||||||
|
assertTrue(apiClient.isJsonMime("application/problem+json"));
|
||||||
|
assertTrue(apiClient.isJsonMime("APPLICATION/PROBLEM+JSON"));
|
||||||
|
assertTrue(apiClient.isJsonMime("application/json\t"));
|
||||||
|
assertTrue(apiClient.isJsonMime("example/foo+bar+json"));
|
||||||
|
assertTrue(apiClient.isJsonMime("example/foo+json;x;y"));
|
||||||
|
assertTrue(apiClient.isJsonMime("example/foo+json\t;"));
|
||||||
|
assertTrue(apiClient.isJsonMime("Example/fOO+JSON"));
|
||||||
|
|
||||||
|
assertTrue(apiClient.isJsonMime("application/json-patch+json"));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testSelectHeaderAccept() {
|
||||||
|
String[] accepts = {"application/json", "application/xml"};
|
||||||
|
assertEquals("application/json", apiClient.selectHeaderAccept(accepts));
|
||||||
|
|
||||||
|
accepts = new String[]{"APPLICATION/XML", "APPLICATION/JSON"};
|
||||||
|
assertEquals("APPLICATION/JSON", apiClient.selectHeaderAccept(accepts));
|
||||||
|
|
||||||
|
accepts = new String[]{"application/xml", "application/json; charset=UTF8"};
|
||||||
|
assertEquals("application/json; charset=UTF8", apiClient.selectHeaderAccept(accepts));
|
||||||
|
|
||||||
|
accepts = new String[]{"text/plain", "application/xml"};
|
||||||
|
assertEquals("text/plain,application/xml", apiClient.selectHeaderAccept(accepts));
|
||||||
|
|
||||||
|
accepts = new String[]{};
|
||||||
|
assertNull(apiClient.selectHeaderAccept(accepts));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testSelectHeaderContentType() {
|
||||||
|
String[] contentTypes = {"application/json", "application/xml"};
|
||||||
|
assertEquals("application/json", apiClient.selectHeaderContentType(contentTypes));
|
||||||
|
|
||||||
|
contentTypes = new String[]{"APPLICATION/JSON", "APPLICATION/XML"};
|
||||||
|
assertEquals("APPLICATION/JSON", apiClient.selectHeaderContentType(contentTypes));
|
||||||
|
|
||||||
|
contentTypes = new String[]{"application/xml", "application/json; charset=UTF8"};
|
||||||
|
assertEquals("application/json; charset=UTF8", apiClient.selectHeaderContentType(contentTypes));
|
||||||
|
|
||||||
|
contentTypes = new String[]{"text/plain", "application/xml"};
|
||||||
|
assertEquals("text/plain", apiClient.selectHeaderContentType(contentTypes));
|
||||||
|
|
||||||
|
contentTypes = new String[]{};
|
||||||
|
assertEquals("application/json", apiClient.selectHeaderContentType(contentTypes));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testGetAuthentications() {
|
||||||
|
Map<String, Authentication> auths = apiClient.getAuthentications();
|
||||||
|
|
||||||
|
Authentication auth = auths.get("api_key");
|
||||||
|
assertNotNull(auth);
|
||||||
|
assertTrue(auth instanceof ApiKeyAuth);
|
||||||
|
ApiKeyAuth apiKeyAuth = (ApiKeyAuth) auth;
|
||||||
|
assertEquals("header", apiKeyAuth.getLocation());
|
||||||
|
assertEquals("api_key", apiKeyAuth.getParamName());
|
||||||
|
|
||||||
|
auth = auths.get("petstore_auth");
|
||||||
|
assertTrue(auth instanceof OAuth);
|
||||||
|
assertSame(auth, apiClient.getAuthentication("petstore_auth"));
|
||||||
|
|
||||||
|
assertNull(auths.get("unknown"));
|
||||||
|
|
||||||
|
try {
|
||||||
|
auths.put("my_auth", new HttpBasicAuth());
|
||||||
|
fail("the authentications returned should not be modifiable");
|
||||||
|
} catch (UnsupportedOperationException e) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
@Test
|
||||||
|
public void testSetUsernameAndPassword() {
|
||||||
|
HttpBasicAuth auth = null;
|
||||||
|
for (Authentication _auth : apiClient.getAuthentications().values()) {
|
||||||
|
if (_auth instanceof HttpBasicAuth) {
|
||||||
|
auth = (HttpBasicAuth) _auth;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
auth.setUsername(null);
|
||||||
|
auth.setPassword(null);
|
||||||
|
|
||||||
|
apiClient.setUsername("my-username");
|
||||||
|
apiClient.setPassword("my-password");
|
||||||
|
assertEquals("my-username", auth.getUsername());
|
||||||
|
assertEquals("my-password", auth.getPassword());
|
||||||
|
|
||||||
|
// reset values
|
||||||
|
auth.setUsername(null);
|
||||||
|
auth.setPassword(null);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testSetApiKeyAndPrefix() {
|
||||||
|
ApiKeyAuth auth = null;
|
||||||
|
for (Authentication _auth : apiClient.getAuthentications().values()) {
|
||||||
|
if (_auth instanceof ApiKeyAuth) {
|
||||||
|
auth = (ApiKeyAuth) _auth;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
auth.setApiKey(null);
|
||||||
|
auth.setApiKeyPrefix(null);
|
||||||
|
|
||||||
|
apiClient.setApiKey("my-api-key");
|
||||||
|
apiClient.setApiKeyPrefix("Token");
|
||||||
|
assertEquals("my-api-key", auth.getApiKey());
|
||||||
|
assertEquals("Token", auth.getApiKeyPrefix());
|
||||||
|
|
||||||
|
// reset values
|
||||||
|
auth.setApiKey(null);
|
||||||
|
auth.setApiKeyPrefix(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testGetAndSetConnectTimeout() {
|
||||||
|
// connect timeout defaults to 10 seconds
|
||||||
|
assertEquals(10000, apiClient.getConnectTimeout());
|
||||||
|
assertEquals(10000, apiClient.getHttpClient().connectTimeoutMillis());
|
||||||
|
|
||||||
|
apiClient.setConnectTimeout(0);
|
||||||
|
assertEquals(0, apiClient.getConnectTimeout());
|
||||||
|
assertEquals(0, apiClient.getHttpClient().connectTimeoutMillis());
|
||||||
|
|
||||||
|
apiClient.setConnectTimeout(10000);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testGetAndSetReadTimeout() {
|
||||||
|
// read timeout defaults to 10 seconds
|
||||||
|
assertEquals(10000, apiClient.getReadTimeout());
|
||||||
|
assertEquals(10000, apiClient.getHttpClient().readTimeoutMillis());
|
||||||
|
|
||||||
|
apiClient.setReadTimeout(0);
|
||||||
|
assertEquals(0, apiClient.getReadTimeout());
|
||||||
|
assertEquals(0, apiClient.getHttpClient().readTimeoutMillis());
|
||||||
|
|
||||||
|
apiClient.setReadTimeout(10000);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testGetAndSetWriteTimeout() {
|
||||||
|
// write timeout defaults to 10 seconds
|
||||||
|
assertEquals(10000, apiClient.getWriteTimeout());
|
||||||
|
assertEquals(10000, apiClient.getHttpClient().writeTimeoutMillis());
|
||||||
|
|
||||||
|
apiClient.setWriteTimeout(0);
|
||||||
|
assertEquals(0, apiClient.getWriteTimeout());
|
||||||
|
assertEquals(0, apiClient.getHttpClient().writeTimeoutMillis());
|
||||||
|
|
||||||
|
apiClient.setWriteTimeout(10000);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testParameterToPairWhenNameIsInvalid() throws Exception {
|
||||||
|
List<Pair> pairs_a = apiClient.parameterToPair(null, new Integer(1));
|
||||||
|
List<Pair> pairs_b = apiClient.parameterToPair("", new Integer(1));
|
||||||
|
|
||||||
|
assertTrue(pairs_a.isEmpty());
|
||||||
|
assertTrue(pairs_b.isEmpty());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testParameterToPairWhenValueIsNull() throws Exception {
|
||||||
|
List<Pair> pairs = apiClient.parameterToPair("param-a", null);
|
||||||
|
|
||||||
|
assertTrue(pairs.isEmpty());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testParameterToPairWhenValueIsEmptyString() throws Exception {
|
||||||
|
// single empty string
|
||||||
|
List<Pair> pairs = apiClient.parameterToPair("param-a", " ");
|
||||||
|
assertEquals(1, pairs.size());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testParameterToPairWhenValueIsNotCollection() throws Exception {
|
||||||
|
String name = "param-a";
|
||||||
|
Integer value = 1;
|
||||||
|
|
||||||
|
List<Pair> pairs = apiClient.parameterToPair(name, value);
|
||||||
|
|
||||||
|
assertEquals(1, pairs.size());
|
||||||
|
assertEquals(value, Integer.valueOf(pairs.get(0).getValue()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testParameterToPairWhenValueIsCollection() throws Exception {
|
||||||
|
List<Object> values = new ArrayList<Object>();
|
||||||
|
values.add("value-a");
|
||||||
|
values.add(123);
|
||||||
|
values.add(new Date());
|
||||||
|
|
||||||
|
List<Pair> pairs = apiClient.parameterToPair("param-a", values);
|
||||||
|
assertEquals(0, pairs.size());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testParameterToPairsWhenNameIsInvalid() throws Exception {
|
||||||
|
List<Integer> objects = new ArrayList<Integer>();
|
||||||
|
objects.add(new Integer(1));
|
||||||
|
|
||||||
|
List<Pair> pairs_a = apiClient.parameterToPairs("csv", null, objects);
|
||||||
|
List<Pair> pairs_b = apiClient.parameterToPairs("csv", "", objects);
|
||||||
|
|
||||||
|
assertTrue(pairs_a.isEmpty());
|
||||||
|
assertTrue(pairs_b.isEmpty());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testParameterToPairsWhenValueIsNull() throws Exception {
|
||||||
|
List<Pair> pairs = apiClient.parameterToPairs("csv", "param-a", null);
|
||||||
|
|
||||||
|
assertTrue(pairs.isEmpty());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testParameterToPairsWhenValueIsEmptyStrings() throws Exception {
|
||||||
|
// list of empty strings
|
||||||
|
List<String> strs = new ArrayList<String>();
|
||||||
|
strs.add(" ");
|
||||||
|
strs.add(" ");
|
||||||
|
strs.add(" ");
|
||||||
|
|
||||||
|
List<Pair> concatStrings = apiClient.parameterToPairs("csv", "param-a", strs);
|
||||||
|
|
||||||
|
assertEquals(1, concatStrings.size());
|
||||||
|
assertFalse(concatStrings.get(0).getValue().isEmpty()); // should contain some delimiters
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testParameterToPairsWhenValueIsCollection() throws Exception {
|
||||||
|
Map<String, String> collectionFormatMap = new HashMap<String, String>();
|
||||||
|
collectionFormatMap.put("csv", ",");
|
||||||
|
collectionFormatMap.put("tsv", "\t");
|
||||||
|
collectionFormatMap.put("ssv", " ");
|
||||||
|
collectionFormatMap.put("pipes", "|");
|
||||||
|
collectionFormatMap.put("", ","); // no format, must default to csv
|
||||||
|
collectionFormatMap.put("unknown", ","); // all other formats, must default to csv
|
||||||
|
|
||||||
|
String name = "param-a";
|
||||||
|
|
||||||
|
List<Object> values = new ArrayList<Object>();
|
||||||
|
values.add("value-a");
|
||||||
|
values.add(123);
|
||||||
|
values.add(new Date());
|
||||||
|
|
||||||
|
// check for multi separately
|
||||||
|
List<Pair> multiPairs = apiClient.parameterToPairs("multi", name, values);
|
||||||
|
assertEquals(values.size(), multiPairs.size());
|
||||||
|
for (int i = 0; i < values.size(); i++) {
|
||||||
|
assertEquals(apiClient.escapeString(apiClient.parameterToString(values.get(i))), multiPairs.get(i).getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
// all other formats
|
||||||
|
for (String collectionFormat : collectionFormatMap.keySet()) {
|
||||||
|
List<Pair> pairs = apiClient.parameterToPairs(collectionFormat, name, values);
|
||||||
|
|
||||||
|
assertEquals(1, pairs.size());
|
||||||
|
|
||||||
|
String delimiter = collectionFormatMap.get(collectionFormat);
|
||||||
|
if (!delimiter.equals(",")) {
|
||||||
|
// commas are not escaped because they are reserved characters in URIs
|
||||||
|
delimiter = apiClient.escapeString(delimiter);
|
||||||
|
}
|
||||||
|
String[] pairValueSplit = pairs.get(0).getValue().split(delimiter);
|
||||||
|
|
||||||
|
// must equal input values
|
||||||
|
assertEquals(values.size(), pairValueSplit.length);
|
||||||
|
for (int i = 0; i < values.size(); i++) {
|
||||||
|
assertEquals(apiClient.escapeString(apiClient.parameterToString(values.get(i))), pairValueSplit[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testSanitizeFilename() {
|
||||||
|
assertEquals("sun", apiClient.sanitizeFilename("sun"));
|
||||||
|
assertEquals("sun.gif", apiClient.sanitizeFilename("sun.gif"));
|
||||||
|
assertEquals("sun.gif", apiClient.sanitizeFilename("../sun.gif"));
|
||||||
|
assertEquals("sun.gif", apiClient.sanitizeFilename("/var/tmp/sun.gif"));
|
||||||
|
assertEquals("sun.gif", apiClient.sanitizeFilename("./sun.gif"));
|
||||||
|
assertEquals("sun.gif", apiClient.sanitizeFilename("..\\sun.gif"));
|
||||||
|
assertEquals("sun.gif", apiClient.sanitizeFilename("\\var\\tmp\\sun.gif"));
|
||||||
|
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());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,202 @@
|
|||||||
|
package org.openapitools.client;
|
||||||
|
|
||||||
|
import com.google.gson.reflect.TypeToken;
|
||||||
|
|
||||||
|
import org.openapitools.client.model.Order;
|
||||||
|
|
||||||
|
import java.lang.Exception;
|
||||||
|
import java.lang.reflect.Type;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.text.DateFormat;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Calendar;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.GregorianCalendar;
|
||||||
|
import java.util.Locale;
|
||||||
|
import java.util.TimeZone;
|
||||||
|
|
||||||
|
import okio.ByteString;
|
||||||
|
import org.junit.*;
|
||||||
|
import org.threeten.bp.LocalDate;
|
||||||
|
import org.threeten.bp.OffsetDateTime;
|
||||||
|
import org.threeten.bp.ZoneId;
|
||||||
|
import org.threeten.bp.ZoneOffset;
|
||||||
|
import org.threeten.bp.format.DateTimeFormatter;
|
||||||
|
|
||||||
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
|
public class JSONTest {
|
||||||
|
private ApiClient apiClient = null;
|
||||||
|
private JSON json = null;
|
||||||
|
private Order order = null;
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void setup() {
|
||||||
|
apiClient = new ApiClient();
|
||||||
|
json = apiClient.getJSON();
|
||||||
|
order = new Order();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testSqlDateTypeAdapter() {
|
||||||
|
final String str = "\"2015-11-07\"";
|
||||||
|
final java.sql.Date date = java.sql.Date.valueOf("2015-11-07");
|
||||||
|
|
||||||
|
assertEquals(str, json.serialize(date));
|
||||||
|
assertEquals(json.deserialize(str, java.sql.Date.class), date);
|
||||||
|
assertEquals(json.deserialize("\"2015-11-07T03:49:09.356" + getCurrentTimezoneOffset() + "\"", java.sql.Date.class).toString(), date.toString());
|
||||||
|
|
||||||
|
// custom date format: without day
|
||||||
|
DateFormat format = new SimpleDateFormat("yyyy-MM", Locale.ROOT);
|
||||||
|
apiClient.setSqlDateFormat(format);
|
||||||
|
String dateStr = "\"2015-11\"";
|
||||||
|
assertEquals(dateStr, json.serialize(json.deserialize("\"2015-11-07T03:49:09Z\"", java.sql.Date.class)));
|
||||||
|
assertEquals(dateStr, json.serialize(json.deserialize("\"2015-11\"", java.sql.Date.class)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testDateTypeAdapter() {
|
||||||
|
Calendar cal = new GregorianCalendar(2015, 10, 7, 3, 49, 9);
|
||||||
|
cal.setTimeZone(TimeZone.getTimeZone("UTC"));
|
||||||
|
|
||||||
|
assertEquals(json.deserialize("\"2015-11-07T05:49:09+02\"", Date.class), cal.getTime());
|
||||||
|
|
||||||
|
cal.set(Calendar.MILLISECOND, 300);
|
||||||
|
assertEquals(json.deserialize("\"2015-11-07T03:49:09.3Z\"", Date.class), cal.getTime());
|
||||||
|
|
||||||
|
cal.set(Calendar.MILLISECOND, 356);
|
||||||
|
Date date = cal.getTime();
|
||||||
|
|
||||||
|
final String utcDate = "\"2015-11-07T03:49:09.356Z\"";
|
||||||
|
assertEquals(json.deserialize(utcDate, Date.class), date);
|
||||||
|
assertEquals(json.deserialize("\"2015-11-07T03:49:09.356+00:00\"", Date.class), date);
|
||||||
|
assertEquals(json.deserialize("\"2015-11-07T05:49:09.356+02:00\"", Date.class), date);
|
||||||
|
assertEquals(json.deserialize("\"2015-11-07T02:49:09.356-01:00\"", Date.class), date);
|
||||||
|
assertEquals(json.deserialize("\"2015-11-07T03:49:09.356Z\"", Date.class), date);
|
||||||
|
assertEquals(json.deserialize("\"2015-11-07T03:49:09.356+00\"", Date.class), date);
|
||||||
|
assertEquals(json.deserialize("\"2015-11-07T02:49:09.356-0100\"", Date.class), date);
|
||||||
|
assertEquals(json.deserialize("\"2015-11-07T03:49:09.356456789Z\"", Date.class), date);
|
||||||
|
|
||||||
|
assertEquals(utcDate, json.serialize(date));
|
||||||
|
|
||||||
|
// custom datetime format: without milli-seconds, custom time zone
|
||||||
|
DateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX", Locale.ROOT);
|
||||||
|
format.setTimeZone(TimeZone.getTimeZone("GMT+10"));
|
||||||
|
apiClient.setDateFormat(format);
|
||||||
|
|
||||||
|
String dateStr = "\"2015-11-07T13:49:09+10:00\"";
|
||||||
|
assertEquals(dateStr, json.serialize(json.deserialize("\"2015-11-07T03:49:09+00:00\"", Date.class)));
|
||||||
|
assertEquals(dateStr, json.serialize(json.deserialize("\"2015-11-07T03:49:09Z\"", Date.class)));
|
||||||
|
assertEquals(dateStr, json.serialize(json.deserialize("\"2015-11-07T00:49:09-03:00\"", Date.class)));
|
||||||
|
|
||||||
|
try {
|
||||||
|
// invalid time zone format
|
||||||
|
json.deserialize("\"2015-11-07T03:49:09+00\"", Date.class);
|
||||||
|
fail("json parsing should fail");
|
||||||
|
} catch (RuntimeException e) {
|
||||||
|
// OK
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
// unexpected miliseconds
|
||||||
|
json.deserialize("\"2015-11-07T03:49:09.000Z\"", Date.class);
|
||||||
|
fail("json parsing should fail");
|
||||||
|
} catch (RuntimeException e) {
|
||||||
|
// OK
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testOffsetDateTimeTypeAdapter() {
|
||||||
|
final String str = "\"2016-09-09T08:02:03.123-03:00\"";
|
||||||
|
OffsetDateTime date = OffsetDateTime.of(2016, 9, 9, 8, 2, 3, 123000000, ZoneOffset.of("-3"));
|
||||||
|
|
||||||
|
assertEquals(str, json.serialize(date));
|
||||||
|
//Use toString() instead of isEqual to verify that the offset is preserved
|
||||||
|
assertEquals(json.deserialize(str, OffsetDateTime.class).toString(), date.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testLocalDateTypeAdapter() {
|
||||||
|
final String str = "\"2016-09-09\"";
|
||||||
|
final LocalDate date = LocalDate.of(2016, 9, 9);
|
||||||
|
|
||||||
|
assertEquals(str, json.serialize(date));
|
||||||
|
assertEquals(json.deserialize(str, LocalDate.class), date);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testDefaultDate() throws Exception {
|
||||||
|
final DateTimeFormatter datetimeFormat = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
|
||||||
|
final String dateStr = "2015-11-07T14:11:05.267Z";
|
||||||
|
order.setShipDate(datetimeFormat.parse(dateStr, OffsetDateTime.FROM));
|
||||||
|
|
||||||
|
String str = json.serialize(order);
|
||||||
|
Type type = new TypeToken<Order>() { }.getType();
|
||||||
|
Order o = json.deserialize(str, type);
|
||||||
|
assertEquals(dateStr, datetimeFormat.format(o.getShipDate()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testCustomDate() throws Exception {
|
||||||
|
final DateTimeFormatter datetimeFormat = DateTimeFormatter.ISO_OFFSET_DATE_TIME.withZone(ZoneId.of("Etc/GMT+2"));
|
||||||
|
final String dateStr = "2015-11-07T14:11:05-02:00";
|
||||||
|
order.setShipDate(datetimeFormat.parse(dateStr, OffsetDateTime.FROM));
|
||||||
|
|
||||||
|
String str = json.serialize(order);
|
||||||
|
Type type = new TypeToken<Order>() { }.getType();
|
||||||
|
Order o = json.deserialize(str, type);
|
||||||
|
assertEquals(dateStr, datetimeFormat.format(o.getShipDate()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testByteArrayTypeAdapterSerialization() {
|
||||||
|
// Arrange
|
||||||
|
final String expectedBytesAsString = "Let's pretend this a jpg or something";
|
||||||
|
final byte[] expectedBytes = expectedBytesAsString.getBytes(StandardCharsets.UTF_8);
|
||||||
|
|
||||||
|
// Act
|
||||||
|
String serializedBytesWithQuotes = json.serialize(expectedBytes);
|
||||||
|
|
||||||
|
// Assert
|
||||||
|
String serializedBytes = serializedBytesWithQuotes.substring(1, serializedBytesWithQuotes.length() - 1);
|
||||||
|
if (json.getGson().htmlSafe()) {
|
||||||
|
serializedBytes = serializedBytes.replaceAll("\\\\u003d", "=");
|
||||||
|
}
|
||||||
|
ByteString actualAsByteString = ByteString.decodeBase64(serializedBytes);
|
||||||
|
byte[] actualBytes = actualAsByteString.toByteArray();
|
||||||
|
assertEquals(expectedBytesAsString, new String(actualBytes, StandardCharsets.UTF_8));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testByteArrayTypeAdapterDeserialization() {
|
||||||
|
// Arrange
|
||||||
|
final String expectedBytesAsString = "Let's pretend this a jpg or something";
|
||||||
|
final byte[] expectedBytes = expectedBytesAsString.getBytes(StandardCharsets.UTF_8);
|
||||||
|
final ByteString expectedByteString = ByteString.of(expectedBytes);
|
||||||
|
final String serializedBytes = expectedByteString.base64();
|
||||||
|
final String serializedBytesWithQuotes = "\"" + serializedBytes + "\"";
|
||||||
|
Type type = new TypeToken<byte[]>() { }.getType();
|
||||||
|
|
||||||
|
// Act
|
||||||
|
byte[] actualDeserializedBytes = json.deserialize(serializedBytesWithQuotes, type);
|
||||||
|
|
||||||
|
// Assert
|
||||||
|
assertEquals(expectedBytesAsString, new String(actualDeserializedBytes, StandardCharsets.UTF_8));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Obtained 22JAN2018 from stackoverflow answer by PuguaSoft https://stackoverflow.com/questions/11399491/java-timezone-offset
|
||||||
|
// Direct link https://stackoverflow.com/a/16680815/3166133
|
||||||
|
public static String getCurrentTimezoneOffset() {
|
||||||
|
|
||||||
|
TimeZone tz = TimeZone.getDefault();
|
||||||
|
Calendar cal = GregorianCalendar.getInstance(tz, Locale.ROOT);
|
||||||
|
int offsetInMillis = tz.getOffset(cal.getTimeInMillis());
|
||||||
|
|
||||||
|
String offset = String.format(Locale.ROOT,"%02d:%02d", Math.abs(offsetInMillis / 3600000), Math.abs((offsetInMillis / 60000) % 60));
|
||||||
|
offset = (offsetInMillis >= 0 ? "+" : "-") + offset;
|
||||||
|
|
||||||
|
return offset;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,533 @@
|
|||||||
|
/*
|
||||||
|
* 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
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* https://openapi-generator.tech
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.openapitools.client.api;
|
||||||
|
|
||||||
|
import org.openapitools.client.ApiException;
|
||||||
|
import org.openapitools.client.model.Pet;
|
||||||
|
import org.openapitools.client.auth.*;
|
||||||
|
import org.openapitools.client.model.*;
|
||||||
|
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;
|
||||||
|
import java.io.BufferedWriter;
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileWriter;
|
||||||
|
|
||||||
|
import org.junit.*;
|
||||||
|
|
||||||
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API tests for PetApi
|
||||||
|
*/
|
||||||
|
public class PetApiTest {
|
||||||
|
|
||||||
|
private PetApi api = new PetApi();
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void setup() {
|
||||||
|
// setup authentication
|
||||||
|
ApiKeyAuth apiKeyAuth = (ApiKeyAuth) api.getApiClient().getAuthentication("api_key");
|
||||||
|
apiKeyAuth.setApiKey("special-key");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testApiClient() {
|
||||||
|
// the default api client is used
|
||||||
|
assertEquals(Configuration.getDefaultApiClient(), api.getApiClient());
|
||||||
|
assertNotNull(api.getApiClient());
|
||||||
|
assertEquals("http://petstore.swagger.io:80/v2", api.getApiClient().getBasePath());
|
||||||
|
assertFalse(api.getApiClient().isDebugging());
|
||||||
|
|
||||||
|
ApiClient oldClient = api.getApiClient();
|
||||||
|
|
||||||
|
ApiClient newClient = new ApiClient();
|
||||||
|
newClient.setBasePath("http://example.com");
|
||||||
|
newClient.setDebugging(true);
|
||||||
|
|
||||||
|
// set api client via constructor
|
||||||
|
api = new PetApi(newClient);
|
||||||
|
assertNotNull(api.getApiClient());
|
||||||
|
assertEquals("http://example.com", api.getApiClient().getBasePath());
|
||||||
|
assertTrue(api.getApiClient().isDebugging());
|
||||||
|
|
||||||
|
// set api client via setter method
|
||||||
|
api.setApiClient(oldClient);
|
||||||
|
assertNotNull(api.getApiClient());
|
||||||
|
assertEquals("http://petstore.swagger.io:80/v2", api.getApiClient().getBasePath());
|
||||||
|
assertFalse(api.getApiClient().isDebugging());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testCreateAndGetPet() throws Exception {
|
||||||
|
Pet pet = createPet();
|
||||||
|
api.addPet(pet);
|
||||||
|
|
||||||
|
Pet fetched = api.getPetById(pet.getId());
|
||||||
|
assertPetMatches(pet, fetched);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testCreateAndGetPetWithHttpInfo() throws Exception {
|
||||||
|
Pet pet = createPet();
|
||||||
|
api.addPetWithHttpInfo(pet);
|
||||||
|
|
||||||
|
ApiResponse<Pet> resp = api.getPetByIdWithHttpInfo(pet.getId());
|
||||||
|
assertEquals(200, resp.getStatusCode());
|
||||||
|
assertEquals("application/json", resp.getHeaders().get("Content-Type").get(0));
|
||||||
|
Pet fetched = resp.getData();
|
||||||
|
|
||||||
|
assertPetMatches(pet, fetched);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testCreateAndGetPetAsync() throws Exception {
|
||||||
|
Pet pet = createPet();
|
||||||
|
api.addPet(pet);
|
||||||
|
// to store returned Pet or error message/exception
|
||||||
|
final Map<String, Object> result = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
api.getPetByIdAsync(pet.getId(), new ApiCallback<Pet>() {
|
||||||
|
@Override
|
||||||
|
public void onFailure(ApiException e, int statusCode, Map<String, List<String>> responseHeaders) {
|
||||||
|
result.put("error", e.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSuccess(Pet pet, int statusCode, Map<String, List<String>> responseHeaders) {
|
||||||
|
result.put("pet", pet);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onUploadProgress(long bytesWritten, long contentLength, boolean done) {
|
||||||
|
//empty
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDownloadProgress(long bytesRead, long contentLength, boolean done) {
|
||||||
|
//empty
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// the API call should be executed asynchronously, so result should be empty at the moment
|
||||||
|
assertTrue(result.isEmpty());
|
||||||
|
|
||||||
|
// wait for the asynchronous call to finish (at most 10 seconds)
|
||||||
|
final int maxTry = 10;
|
||||||
|
int tryCount = 1;
|
||||||
|
Pet fetched = null;
|
||||||
|
do {
|
||||||
|
if (tryCount > maxTry) fail("have not got result of getPetByIdAsync after 10 seconds");
|
||||||
|
Thread.sleep(1000);
|
||||||
|
tryCount += 1;
|
||||||
|
if (result.get("error") != null) fail((String) result.get("error"));
|
||||||
|
if (result.get("pet") != null) {
|
||||||
|
fetched = (Pet) result.get("pet");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} while (result.isEmpty());
|
||||||
|
assertPetMatches(pet, fetched);
|
||||||
|
|
||||||
|
// test getting a nonexistent pet
|
||||||
|
result.clear();
|
||||||
|
api.getPetByIdAsync(-10000L, new ApiCallback<Pet>() {
|
||||||
|
@Override
|
||||||
|
public void onFailure(ApiException e, int statusCode, Map<String, List<String>> responseHeaders) {
|
||||||
|
result.put("exception", e);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSuccess(Pet pet, int statusCode, Map<String, List<String>> responseHeaders) {
|
||||||
|
result.put("pet", pet);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onUploadProgress(long bytesWritten, long contentLength, boolean done) {
|
||||||
|
//empty
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDownloadProgress(long bytesRead, long contentLength, boolean done) {
|
||||||
|
//empty
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// wait for the asynchronous call to finish (at most 10 seconds)
|
||||||
|
tryCount = 1;
|
||||||
|
ApiException exception = null;
|
||||||
|
do {
|
||||||
|
if (tryCount > maxTry) fail("have not got result of getPetByIdAsync after 10 seconds");
|
||||||
|
Thread.sleep(1000);
|
||||||
|
tryCount += 1;
|
||||||
|
if (result.get("pet") != null) fail("expected an error");
|
||||||
|
if (result.get("exception") != null) {
|
||||||
|
exception = (ApiException) result.get("exception");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} while (result.isEmpty());
|
||||||
|
assertNotNull(exception);
|
||||||
|
assertEquals(404, exception.getCode());
|
||||||
|
assertEquals("Not Found", exception.getMessage());
|
||||||
|
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();
|
||||||
|
pet.setName("programmer");
|
||||||
|
|
||||||
|
api.updatePet(pet);
|
||||||
|
|
||||||
|
Pet fetched = api.getPetById(pet.getId());
|
||||||
|
assertPetMatches(pet, fetched);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testFindPetsByStatus() throws Exception {
|
||||||
|
Pet pet = createPet();
|
||||||
|
pet.setName("programmer");
|
||||||
|
pet.setStatus(Pet.StatusEnum.PENDING);
|
||||||
|
|
||||||
|
api.updatePet(pet);
|
||||||
|
|
||||||
|
List<Pet> pets = api.findPetsByStatus(Arrays.asList("pending"));
|
||||||
|
assertNotNull(pets);
|
||||||
|
|
||||||
|
boolean found = false;
|
||||||
|
for (Pet fetched : pets) {
|
||||||
|
if (fetched.getId().equals(pet.getId())) {
|
||||||
|
found = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
assertTrue(found);
|
||||||
|
|
||||||
|
api.deletePet(pet.getId(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Ignore
|
||||||
|
public void testFindPetsByTags() throws Exception {
|
||||||
|
Pet pet = createPet();
|
||||||
|
pet.setName("monster");
|
||||||
|
pet.setStatus(Pet.StatusEnum.AVAILABLE);
|
||||||
|
|
||||||
|
List<Tag> tags = new ArrayList<Tag>();
|
||||||
|
Tag tag1 = new Tag();
|
||||||
|
tag1.setName("friendly");
|
||||||
|
tags.add(tag1);
|
||||||
|
pet.setTags(tags);
|
||||||
|
|
||||||
|
api.updatePet(pet);
|
||||||
|
|
||||||
|
List<Pet> pets = api.findPetsByTags(Arrays.asList("friendly"));
|
||||||
|
assertNotNull(pets);
|
||||||
|
|
||||||
|
boolean found = false;
|
||||||
|
for (Pet fetched : pets) {
|
||||||
|
if (fetched.getId().equals(pet.getId())) {
|
||||||
|
found = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
assertTrue(found);
|
||||||
|
|
||||||
|
api.deletePet(pet.getId(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testUpdatePetWithForm() throws Exception {
|
||||||
|
Pet pet = createPet();
|
||||||
|
pet.setName("frank");
|
||||||
|
api.addPet(pet);
|
||||||
|
|
||||||
|
Pet fetched = api.getPetById(pet.getId());
|
||||||
|
|
||||||
|
api.updatePetWithForm(fetched.getId(), "furt", null);
|
||||||
|
Pet updated = api.getPetById(fetched.getId());
|
||||||
|
|
||||||
|
assertEquals(updated.getName(), "furt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testDeletePet() throws Exception {
|
||||||
|
Pet pet = createPet();
|
||||||
|
api.addPet(pet);
|
||||||
|
|
||||||
|
Pet fetched = api.getPetById(pet.getId());
|
||||||
|
api.deletePet(fetched.getId(), null);
|
||||||
|
|
||||||
|
try {
|
||||||
|
fetched = api.getPetById(fetched.getId());
|
||||||
|
fail("expected an error");
|
||||||
|
} catch (ApiException e) {
|
||||||
|
assertEquals(404, e.getCode());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testUploadFile() throws Exception {
|
||||||
|
Pet pet = createPet();
|
||||||
|
api.addPet(pet);
|
||||||
|
|
||||||
|
File file = new File("hello.txt");
|
||||||
|
BufferedWriter writer = new BufferedWriter(new FileWriter(file));
|
||||||
|
writer.write("Hello world!");
|
||||||
|
writer.close();
|
||||||
|
|
||||||
|
api.uploadFile(pet.getId(), "a test file", new File(file.getAbsolutePath()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testEqualsAndHashCode() {
|
||||||
|
Pet pet1 = new Pet();
|
||||||
|
Pet pet2 = new Pet();
|
||||||
|
assertTrue(pet1.equals(pet2));
|
||||||
|
assertTrue(pet2.equals(pet1));
|
||||||
|
assertTrue(pet1.hashCode() == pet2.hashCode());
|
||||||
|
assertTrue(pet1.equals(pet1));
|
||||||
|
assertTrue(pet1.hashCode() == pet1.hashCode());
|
||||||
|
|
||||||
|
pet2.setName("really-happy");
|
||||||
|
pet2.setPhotoUrls(Arrays.asList("http://foo.bar.com/1", "http://foo.bar.com/2"));
|
||||||
|
assertFalse(pet1.equals(pet2));
|
||||||
|
assertFalse(pet2.equals(pet1));
|
||||||
|
assertFalse(pet1.hashCode() == (pet2.hashCode()));
|
||||||
|
assertTrue(pet2.equals(pet2));
|
||||||
|
assertTrue(pet2.hashCode() == pet2.hashCode());
|
||||||
|
|
||||||
|
pet1.setName("really-happy");
|
||||||
|
pet1.setPhotoUrls(Arrays.asList("http://foo.bar.com/1", "http://foo.bar.com/2"));
|
||||||
|
assertTrue(pet1.equals(pet2));
|
||||||
|
assertTrue(pet2.equals(pet1));
|
||||||
|
assertTrue(pet1.hashCode() == pet2.hashCode());
|
||||||
|
assertTrue(pet1.equals(pet1));
|
||||||
|
assertTrue(pet1.hashCode() == pet1.hashCode());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private Pet createPet() {
|
||||||
|
Pet pet = new Pet();
|
||||||
|
pet.setId(1234567L);
|
||||||
|
pet.setName("gorilla");
|
||||||
|
|
||||||
|
Category category = new Category();
|
||||||
|
category.setName("really-happy");
|
||||||
|
|
||||||
|
pet.setCategory(category);
|
||||||
|
pet.setStatus(Pet.StatusEnum.AVAILABLE);
|
||||||
|
List<String> photos = Arrays.asList("http://foo.bar.com/1", "http://foo.bar.com/2");
|
||||||
|
pet.setPhotoUrls(photos);
|
||||||
|
|
||||||
|
return pet;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String serializeJson(Object o, ApiClient apiClient) {
|
||||||
|
return apiClient.getJSON().serialize(o);
|
||||||
|
}
|
||||||
|
|
||||||
|
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 + ">";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
package org.openapitools.client.auth;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.openapitools.client.Pair;
|
||||||
|
import org.junit.*;
|
||||||
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
|
|
||||||
|
public class ApiKeyAuthTest {
|
||||||
|
@Test
|
||||||
|
public void testApplyToParamsInQuery() {
|
||||||
|
List<Pair> queryParams = new ArrayList<Pair>();
|
||||||
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
ApiKeyAuth auth = new ApiKeyAuth("query", "api_key");
|
||||||
|
auth.setApiKey("my-api-key");
|
||||||
|
auth.applyToParams(queryParams, headerParams);
|
||||||
|
|
||||||
|
assertEquals(1, queryParams.size());
|
||||||
|
for (Pair queryParam : queryParams) {
|
||||||
|
assertEquals("my-api-key", queryParam.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
// no changes to header parameters
|
||||||
|
assertEquals(0, headerParams.size());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testApplyToParamsInQueryWithNullValue() {
|
||||||
|
List<Pair> queryParams = new ArrayList<Pair>();
|
||||||
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
ApiKeyAuth auth = new ApiKeyAuth("query", "api_key");
|
||||||
|
auth.setApiKey(null);
|
||||||
|
auth.applyToParams(queryParams, headerParams);
|
||||||
|
|
||||||
|
// no changes to parameters
|
||||||
|
assertEquals(0, queryParams.size());
|
||||||
|
assertEquals(0, headerParams.size());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testApplyToParamsInHeaderWithPrefix() {
|
||||||
|
List<Pair> queryParams = new ArrayList<Pair>();
|
||||||
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
ApiKeyAuth auth = new ApiKeyAuth("header", "X-API-TOKEN");
|
||||||
|
auth.setApiKey("my-api-token");
|
||||||
|
auth.setApiKeyPrefix("Token");
|
||||||
|
auth.applyToParams(queryParams, headerParams);
|
||||||
|
|
||||||
|
// no changes to query parameters
|
||||||
|
assertEquals(0, queryParams.size());
|
||||||
|
assertEquals(1, headerParams.size());
|
||||||
|
assertEquals("Token my-api-token", headerParams.get("X-API-TOKEN"));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testApplyToParamsInHeaderWithNullValue() {
|
||||||
|
List<Pair> queryParams = new ArrayList<Pair>();
|
||||||
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
ApiKeyAuth auth = new ApiKeyAuth("header", "X-API-TOKEN");
|
||||||
|
auth.setApiKey(null);
|
||||||
|
auth.setApiKeyPrefix("Token");
|
||||||
|
auth.applyToParams(queryParams, headerParams);
|
||||||
|
|
||||||
|
// no changes to parameters
|
||||||
|
assertEquals(0, queryParams.size());
|
||||||
|
assertEquals(0, headerParams.size());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
package org.openapitools.client.auth;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.openapitools.client.Pair;
|
||||||
|
import org.junit.*;
|
||||||
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
|
|
||||||
|
public class HttpBasicAuthTest {
|
||||||
|
HttpBasicAuth auth = null;
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void setup() {
|
||||||
|
auth = new HttpBasicAuth();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testApplyToParams() {
|
||||||
|
List<Pair> queryParams = new ArrayList<Pair>();
|
||||||
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
auth.setUsername("my-username");
|
||||||
|
auth.setPassword("my-password");
|
||||||
|
auth.applyToParams(queryParams, headerParams);
|
||||||
|
|
||||||
|
// no changes to query parameters
|
||||||
|
assertEquals(0, queryParams.size());
|
||||||
|
assertEquals(1, headerParams.size());
|
||||||
|
// the string below is base64-encoded result of "my-username:my-password" with the "Basic " prefix
|
||||||
|
String expected = "Basic bXktdXNlcm5hbWU6bXktcGFzc3dvcmQ=";
|
||||||
|
assertEquals(expected, headerParams.get("Authorization"));
|
||||||
|
|
||||||
|
// null username should be treated as empty string
|
||||||
|
auth.setUsername(null);
|
||||||
|
auth.applyToParams(queryParams, headerParams);
|
||||||
|
// the string below is base64-encoded result of ":my-password" with the "Basic " prefix
|
||||||
|
expected = "Basic Om15LXBhc3N3b3Jk";
|
||||||
|
assertEquals(expected, headerParams.get("Authorization"));
|
||||||
|
|
||||||
|
// null password should be treated as empty string
|
||||||
|
auth.setUsername("my-username");
|
||||||
|
auth.setPassword(null);
|
||||||
|
auth.applyToParams(queryParams, headerParams);
|
||||||
|
// the string below is base64-encoded result of "my-username:" with the "Basic " prefix
|
||||||
|
expected = "Basic bXktdXNlcm5hbWU6";
|
||||||
|
assertEquals(expected, headerParams.get("Authorization"));
|
||||||
|
|
||||||
|
// null username and password should be ignored
|
||||||
|
queryParams = new ArrayList<Pair>();
|
||||||
|
headerParams = new HashMap<String, String>();
|
||||||
|
auth.setUsername(null);
|
||||||
|
auth.setPassword(null);
|
||||||
|
auth.applyToParams(queryParams, headerParams);
|
||||||
|
// no changes to parameters
|
||||||
|
assertEquals(0, queryParams.size());
|
||||||
|
assertEquals(0, headerParams.size());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
/*
|
||||||
|
* 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
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* https://openapi-generator.tech
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.openapitools.client.model;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.builder.EqualsBuilder;
|
||||||
|
import com.google.gson.TypeAdapter;
|
||||||
|
import com.google.gson.annotations.JsonAdapter;
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
import com.google.gson.stream.JsonReader;
|
||||||
|
import com.google.gson.stream.JsonWriter;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import org.junit.Assert;
|
||||||
|
import org.junit.Ignore;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model tests for ArrayOfArrayOfNumberOnly
|
||||||
|
*/
|
||||||
|
public class ArrayOfArrayOfNumberOnlyTest {
|
||||||
|
private final ArrayOfArrayOfNumberOnly model = new ArrayOfArrayOfNumberOnly();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model tests for ArrayOfArrayOfNumberOnly
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void test() {
|
||||||
|
// TODO: test ArrayOfArrayOfNumberOnly
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'arrayArrayNumber'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void arrayArrayNumberTest() {
|
||||||
|
BigDecimal b1 = new BigDecimal("12.3");
|
||||||
|
BigDecimal b2 = new BigDecimal("5.6");
|
||||||
|
List<BigDecimal> arrayArrayNumber = new ArrayList<BigDecimal>();
|
||||||
|
arrayArrayNumber.add(b1);
|
||||||
|
arrayArrayNumber.add(b2);
|
||||||
|
model.getArrayArrayNumber().add(arrayArrayNumber);
|
||||||
|
|
||||||
|
// create another instance for comparison
|
||||||
|
BigDecimal b3 = new BigDecimal("12.3");
|
||||||
|
BigDecimal b4 = new BigDecimal("5.6");
|
||||||
|
ArrayOfArrayOfNumberOnly model2 = new ArrayOfArrayOfNumberOnly();
|
||||||
|
List<BigDecimal> arrayArrayNumber2 = new ArrayList<BigDecimal>();
|
||||||
|
arrayArrayNumber2.add(b1);
|
||||||
|
arrayArrayNumber2.add(b2);
|
||||||
|
model2.getArrayArrayNumber().add(arrayArrayNumber2);
|
||||||
|
|
||||||
|
Assert.assertTrue(model2.equals(model));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
package org.openapitools.client.model;
|
||||||
|
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertEquals;
|
||||||
|
import static org.junit.Assert.assertTrue;
|
||||||
|
|
||||||
|
public class EnumValueTest {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testEnumClass() {
|
||||||
|
assertEquals(EnumClass._ABC.toString(), "_abc");
|
||||||
|
assertEquals(EnumClass._EFG.toString(), "-efg");
|
||||||
|
assertEquals(EnumClass._XYZ_.toString(), "(xyz)");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testEnumTest() {
|
||||||
|
// test enum value
|
||||||
|
EnumTest enumTest = new EnumTest();
|
||||||
|
enumTest.setEnumString(EnumTest.EnumStringEnum.LOWER);
|
||||||
|
enumTest.setEnumInteger(EnumTest.EnumIntegerEnum.NUMBER_1);
|
||||||
|
enumTest.setEnumNumber(EnumTest.EnumNumberEnum.NUMBER_1_DOT_1);
|
||||||
|
|
||||||
|
assertEquals(EnumTest.EnumStringEnum.UPPER.toString(), "UPPER");
|
||||||
|
assertEquals(EnumTest.EnumStringEnum.UPPER.getValue(), "UPPER");
|
||||||
|
assertEquals(EnumTest.EnumStringEnum.LOWER.toString(), "lower");
|
||||||
|
assertEquals(EnumTest.EnumStringEnum.LOWER.getValue(), "lower");
|
||||||
|
|
||||||
|
assertEquals(EnumTest.EnumIntegerEnum.NUMBER_1.toString(), "1");
|
||||||
|
assertTrue(EnumTest.EnumIntegerEnum.NUMBER_1.getValue() == 1);
|
||||||
|
assertEquals(EnumTest.EnumIntegerEnum.NUMBER_MINUS_1.toString(), "-1");
|
||||||
|
assertTrue(EnumTest.EnumIntegerEnum.NUMBER_MINUS_1.getValue() == -1);
|
||||||
|
|
||||||
|
assertEquals(EnumTest.EnumNumberEnum.NUMBER_1_DOT_1.toString(), "1.1");
|
||||||
|
assertTrue(EnumTest.EnumNumberEnum.NUMBER_1_DOT_1.getValue() == 1.1);
|
||||||
|
assertEquals(EnumTest.EnumNumberEnum.NUMBER_MINUS_1_DOT_2.toString(), "-1.2");
|
||||||
|
assertTrue(EnumTest.EnumNumberEnum.NUMBER_MINUS_1_DOT_2.getValue() == -1.2);
|
||||||
|
|
||||||
|
// test serialization
|
||||||
|
Gson gson = new Gson();
|
||||||
|
String json = gson.toJson(enumTest);
|
||||||
|
assertEquals(json, "{\"enum_string\":\"lower\",\"enum_integer\":1,\"enum_number\":1.1}");
|
||||||
|
|
||||||
|
// test deserialization
|
||||||
|
EnumTest fromString = gson.fromJson(json, EnumTest.class);
|
||||||
|
assertEquals(fromString.getEnumString().toString(), "lower");
|
||||||
|
assertEquals(fromString.getEnumString().getValue(), "lower");
|
||||||
|
assertEquals(fromString.getEnumInteger().toString(), "1");
|
||||||
|
assertTrue(fromString.getEnumInteger().getValue() == 1);
|
||||||
|
assertEquals(fromString.getEnumNumber().toString(), "1.1");
|
||||||
|
assertTrue(fromString.getEnumNumber().getValue() == 1.1);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,103 @@
|
|||||||
|
/*
|
||||||
|
* 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
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* https://openapi-generator.tech
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.openapitools.client.model;
|
||||||
|
|
||||||
|
import com.google.gson.TypeAdapter;
|
||||||
|
import com.google.gson.annotations.JsonAdapter;
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
import com.google.gson.stream.JsonReader;
|
||||||
|
import com.google.gson.stream.JsonWriter;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import org.openapitools.client.model.Category;
|
||||||
|
import org.openapitools.client.model.Tag;
|
||||||
|
import org.junit.Assert;
|
||||||
|
import org.junit.Ignore;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model tests for Pet
|
||||||
|
*/
|
||||||
|
public class PetTest {
|
||||||
|
private final Pet model = new Pet();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model tests for Pet
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testPet() {
|
||||||
|
// test Pet
|
||||||
|
model.setId(1029L);
|
||||||
|
model.setName("Dog");
|
||||||
|
|
||||||
|
Pet model2 = new Pet();
|
||||||
|
model2.setId(1029L);
|
||||||
|
model2.setName("Dog");
|
||||||
|
|
||||||
|
Assert.assertTrue(model.equals(model2));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'id'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void idTest() {
|
||||||
|
// TODO: test id
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'category'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void categoryTest() {
|
||||||
|
// TODO: test category
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'name'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void nameTest() {
|
||||||
|
// TODO: test name
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'photoUrls'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void photoUrlsTest() {
|
||||||
|
// TODO: test photoUrls
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'tags'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void tagsTest() {
|
||||||
|
// TODO: test tags
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'status'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void statusTest() {
|
||||||
|
// TODO: test status
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,254 @@
|
|||||||
|
package org.openapitools.client;
|
||||||
|
|
||||||
|
import org.openapitools.client.auth.*;
|
||||||
|
|
||||||
|
import java.text.DateFormat;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
import org.junit.*;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
|
import org.springframework.util.MultiValueMap;
|
||||||
|
|
||||||
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
|
|
||||||
|
public class ApiClientTest {
|
||||||
|
ApiClient apiClient = null;
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void setup() {
|
||||||
|
apiClient = new ApiClient();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testParseAndFormatDate() {
|
||||||
|
// default date format
|
||||||
|
String dateStr = "2015-11-07T03:49:09.356Z";
|
||||||
|
assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T03:49:09.356+00:00")));
|
||||||
|
assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T03:49:09.356Z")));
|
||||||
|
assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T05:49:09.356+02:00")));
|
||||||
|
assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T02:49:09.356-01:00")));
|
||||||
|
|
||||||
|
// custom date format: without milli-seconds, custom time zone
|
||||||
|
DateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX", Locale.ROOT);
|
||||||
|
format.setTimeZone(TimeZone.getTimeZone("GMT+10"));
|
||||||
|
apiClient.setDateFormat(format);
|
||||||
|
dateStr = "2015-11-07T13:49:09+10:00";
|
||||||
|
assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T03:49:09+00:00")));
|
||||||
|
assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T03:49:09Z")));
|
||||||
|
assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T00:49:09-03:00")));
|
||||||
|
assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T13:49:09+10:00")));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testIsJsonMime() {
|
||||||
|
assertFalse(apiClient.isJsonMime((String) null));
|
||||||
|
assertFalse(apiClient.isJsonMime(""));
|
||||||
|
assertFalse(apiClient.isJsonMime("text/plain"));
|
||||||
|
assertFalse(apiClient.isJsonMime("application/xml"));
|
||||||
|
assertFalse(apiClient.isJsonMime("application/jsonp"));
|
||||||
|
assertFalse(apiClient.isJsonMime("example/json"));
|
||||||
|
assertFalse(apiClient.isJsonMime("example/foo+bar+jsonx"));
|
||||||
|
assertFalse(apiClient.isJsonMime("example/foo+bar+xjson"));
|
||||||
|
|
||||||
|
assertTrue(apiClient.isJsonMime("application/json"));
|
||||||
|
assertTrue(apiClient.isJsonMime("application/json; charset=UTF8"));
|
||||||
|
assertTrue(apiClient.isJsonMime("APPLICATION/JSON"));
|
||||||
|
|
||||||
|
assertTrue(apiClient.isJsonMime("application/problem+json"));
|
||||||
|
assertTrue(apiClient.isJsonMime("APPLICATION/PROBLEM+JSON"));
|
||||||
|
assertTrue(apiClient.isJsonMime("application/json\t"));
|
||||||
|
assertTrue(apiClient.isJsonMime("example/foo+bar+json"));
|
||||||
|
assertTrue(apiClient.isJsonMime("example/foo+json;x;y"));
|
||||||
|
assertTrue(apiClient.isJsonMime("example/foo+json\t;"));
|
||||||
|
assertTrue(apiClient.isJsonMime("Example/fOO+JSON"));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testSelectHeaderAccept() {
|
||||||
|
String[] accepts = {"application/json", "application/xml"};
|
||||||
|
assertEquals(Arrays.asList(MediaType.parseMediaType("application/json")), apiClient.selectHeaderAccept(accepts));
|
||||||
|
|
||||||
|
accepts = new String[]{"APPLICATION/XML", "APPLICATION/JSON"};
|
||||||
|
assertEquals(Arrays.asList(MediaType.parseMediaType("APPLICATION/JSON")), apiClient.selectHeaderAccept(accepts));
|
||||||
|
|
||||||
|
accepts = new String[]{"application/xml", "application/json; charset=UTF8"};
|
||||||
|
assertEquals(Arrays.asList(MediaType.parseMediaType("application/json; charset=UTF8")), apiClient.selectHeaderAccept(accepts));
|
||||||
|
|
||||||
|
accepts = new String[]{"text/plain", "application/xml"};
|
||||||
|
assertEquals(Arrays.asList(MediaType.parseMediaType("text/plain"),MediaType.parseMediaType("application/xml")), apiClient.selectHeaderAccept(accepts));
|
||||||
|
|
||||||
|
accepts = new String[]{};
|
||||||
|
assertNull(apiClient.selectHeaderAccept(accepts));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testSelectHeaderContentType() {
|
||||||
|
String[] contentTypes = {"application/json", "application/xml"};
|
||||||
|
assertEquals(MediaType.parseMediaType("application/json"), apiClient.selectHeaderContentType(contentTypes));
|
||||||
|
|
||||||
|
contentTypes = new String[]{"APPLICATION/JSON", "APPLICATION/XML"};
|
||||||
|
assertEquals(MediaType.parseMediaType("APPLICATION/JSON"), apiClient.selectHeaderContentType(contentTypes));
|
||||||
|
|
||||||
|
contentTypes = new String[]{"application/xml", "application/json; charset=UTF8"};
|
||||||
|
assertEquals(MediaType.parseMediaType("application/json; charset=UTF8"), apiClient.selectHeaderContentType(contentTypes));
|
||||||
|
|
||||||
|
contentTypes = new String[]{"text/plain", "application/xml"};
|
||||||
|
assertEquals(MediaType.parseMediaType("text/plain"), apiClient.selectHeaderContentType(contentTypes));
|
||||||
|
|
||||||
|
contentTypes = new String[]{};
|
||||||
|
assertEquals(MediaType.parseMediaType("application/json"), apiClient.selectHeaderContentType(contentTypes));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testGetAuthentications() {
|
||||||
|
Map<String, Authentication> auths = apiClient.getAuthentications();
|
||||||
|
|
||||||
|
Authentication auth = auths.get("api_key");
|
||||||
|
assertNotNull(auth);
|
||||||
|
assertTrue(auth instanceof ApiKeyAuth);
|
||||||
|
ApiKeyAuth apiKeyAuth = (ApiKeyAuth) auth;
|
||||||
|
assertEquals("header", apiKeyAuth.getLocation());
|
||||||
|
assertEquals("api_key", apiKeyAuth.getParamName());
|
||||||
|
|
||||||
|
auth = auths.get("petstore_auth");
|
||||||
|
assertTrue(auth instanceof OAuth);
|
||||||
|
assertSame(auth, apiClient.getAuthentication("petstore_auth"));
|
||||||
|
|
||||||
|
assertNull(auths.get("unknown"));
|
||||||
|
|
||||||
|
try {
|
||||||
|
auths.put("my_auth", new HttpBasicAuth());
|
||||||
|
fail("the authentications returned should not be modifiable");
|
||||||
|
} catch (UnsupportedOperationException e) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Ignore("There is no more basic auth in petstore security definitions")
|
||||||
|
@Test
|
||||||
|
public void testSetUsernameAndPassword() {
|
||||||
|
HttpBasicAuth auth = null;
|
||||||
|
for (Authentication _auth : apiClient.getAuthentications().values()) {
|
||||||
|
if (_auth instanceof HttpBasicAuth) {
|
||||||
|
auth = (HttpBasicAuth) _auth;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
auth.setUsername(null);
|
||||||
|
auth.setPassword(null);
|
||||||
|
|
||||||
|
apiClient.setUsername("my-username");
|
||||||
|
apiClient.setPassword("my-password");
|
||||||
|
assertEquals("my-username", auth.getUsername());
|
||||||
|
assertEquals("my-password", auth.getPassword());
|
||||||
|
|
||||||
|
// reset values
|
||||||
|
auth.setUsername(null);
|
||||||
|
auth.setPassword(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testSetApiKeyAndPrefix() {
|
||||||
|
ApiKeyAuth auth = null;
|
||||||
|
for (Authentication _auth : apiClient.getAuthentications().values()) {
|
||||||
|
if (_auth instanceof ApiKeyAuth) {
|
||||||
|
auth = (ApiKeyAuth) _auth;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
auth.setApiKey(null);
|
||||||
|
auth.setApiKeyPrefix(null);
|
||||||
|
|
||||||
|
apiClient.setApiKey("my-api-key");
|
||||||
|
apiClient.setApiKeyPrefix("Token");
|
||||||
|
assertEquals("my-api-key", auth.getApiKey());
|
||||||
|
assertEquals("Token", auth.getApiKeyPrefix());
|
||||||
|
|
||||||
|
// reset values
|
||||||
|
auth.setApiKey(null);
|
||||||
|
auth.setApiKeyPrefix(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testParameterToMultiValueMapWhenNameIsInvalid() throws Exception {
|
||||||
|
MultiValueMap<String, String> pairs_a = apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.CSV, null, new Integer(1));
|
||||||
|
MultiValueMap<String, String> pairs_b = apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.CSV, "", new Integer(1));
|
||||||
|
|
||||||
|
assertTrue(pairs_a.isEmpty());
|
||||||
|
assertTrue(pairs_b.isEmpty());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testParameterToMultiValueMapWhenValueIsNull() throws Exception {
|
||||||
|
MultiValueMap<String, String> pairs = apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.CSV, "param-a", null);
|
||||||
|
|
||||||
|
assertTrue(pairs.isEmpty());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testParameterToMultiValueMapWhenValueIsEmptyStrings() throws Exception {
|
||||||
|
|
||||||
|
// single empty string
|
||||||
|
MultiValueMap<String, String> pairs = apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.CSV, "param-a", " ");
|
||||||
|
assertEquals(1, pairs.size());
|
||||||
|
|
||||||
|
// list of empty strings
|
||||||
|
List<String> strs = new ArrayList<String>();
|
||||||
|
strs.add(" ");
|
||||||
|
strs.add(" ");
|
||||||
|
strs.add(" ");
|
||||||
|
|
||||||
|
MultiValueMap<String, String> concatStrings = apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.CSV, "param-a", strs);
|
||||||
|
|
||||||
|
assertEquals(1, concatStrings.get("param-a").size());
|
||||||
|
assertFalse(concatStrings.get("param-a").isEmpty()); // should contain some delimiters
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testParameterToMultiValueMapWhenValueIsNotCollection() throws Exception {
|
||||||
|
String name = "param-a";
|
||||||
|
Integer value = 1;
|
||||||
|
|
||||||
|
MultiValueMap<String, String> pairs = apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.CSV, name, value);
|
||||||
|
|
||||||
|
assertEquals(1, pairs.get(name).size());
|
||||||
|
assertEquals(value, Integer.valueOf(pairs.get(name).get(0)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testParameterToMultiValueMapWhenValueIsCollection() throws Exception {
|
||||||
|
Map<ApiClient.CollectionFormat, String> collectionFormatMap = new HashMap<ApiClient.CollectionFormat, String>();
|
||||||
|
collectionFormatMap.put(ApiClient.CollectionFormat.CSV, ",");
|
||||||
|
collectionFormatMap.put(ApiClient.CollectionFormat.TSV, "\t");
|
||||||
|
collectionFormatMap.put(ApiClient.CollectionFormat.SSV, " ");
|
||||||
|
collectionFormatMap.put(ApiClient.CollectionFormat.PIPES, "\\|");
|
||||||
|
collectionFormatMap.put(null, ","); // no format, must default to csv
|
||||||
|
|
||||||
|
String name = "param-a";
|
||||||
|
|
||||||
|
List<Object> values = new ArrayList<Object>();
|
||||||
|
values.add("value-a");
|
||||||
|
values.add(123);
|
||||||
|
values.add(new Date());
|
||||||
|
|
||||||
|
// check for multi separately
|
||||||
|
MultiValueMap<String, String> multiValueMap = apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.MULTI, name, values);
|
||||||
|
assertEquals(values.size(), multiValueMap.get(name).size());
|
||||||
|
|
||||||
|
// all other formats
|
||||||
|
for (ApiClient.CollectionFormat collectionFormat : collectionFormatMap.keySet()) {
|
||||||
|
MultiValueMap<String, String> pairs = apiClient.parameterToMultiValueMap(collectionFormat, name, values);
|
||||||
|
|
||||||
|
assertEquals(1, pairs.size());
|
||||||
|
|
||||||
|
String delimiter = collectionFormatMap.get(collectionFormat);
|
||||||
|
String[] pairValueSplit = pairs.get(name).get(0).split(delimiter);
|
||||||
|
|
||||||
|
assertEquals(values.size(), pairValueSplit.length);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
package org.openapitools.client.auth;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.junit.*;
|
||||||
|
import org.springframework.http.HttpHeaders;
|
||||||
|
import org.springframework.util.LinkedMultiValueMap;
|
||||||
|
import org.springframework.util.MultiValueMap;
|
||||||
|
|
||||||
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
|
public class ApiKeyAuthTest {
|
||||||
|
@Test
|
||||||
|
public void testApplyToParamsInQuery() {
|
||||||
|
MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<String, String>();
|
||||||
|
HttpHeaders headerParams = new HttpHeaders();
|
||||||
|
|
||||||
|
ApiKeyAuth auth = new ApiKeyAuth("query", "api_key");
|
||||||
|
auth.setApiKey("my-api-key");
|
||||||
|
auth.applyToParams(queryParams, headerParams);
|
||||||
|
|
||||||
|
assertEquals(1, queryParams.size());
|
||||||
|
assertEquals("my-api-key", queryParams.get("api_key").get(0));
|
||||||
|
|
||||||
|
// no changes to header parameters
|
||||||
|
assertEquals(0, headerParams.size());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testApplyToParamsInHeaderWithPrefix() {
|
||||||
|
MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<String, String>();
|
||||||
|
HttpHeaders headerParams = new HttpHeaders();
|
||||||
|
|
||||||
|
ApiKeyAuth auth = new ApiKeyAuth("header", "X-API-TOKEN");
|
||||||
|
auth.setApiKey("my-api-token");
|
||||||
|
auth.setApiKeyPrefix("Token");
|
||||||
|
auth.applyToParams(queryParams, headerParams);
|
||||||
|
|
||||||
|
// no changes to query parameters
|
||||||
|
assertEquals(0, queryParams.size());
|
||||||
|
assertEquals(1, headerParams.size());
|
||||||
|
assertEquals("Token my-api-token", headerParams.get("X-API-TOKEN").get(0));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
package org.openapitools.client.auth;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.junit.*;
|
||||||
|
import org.springframework.http.HttpHeaders;
|
||||||
|
import org.springframework.util.LinkedMultiValueMap;
|
||||||
|
import org.springframework.util.MultiValueMap;
|
||||||
|
|
||||||
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
|
public class HttpBasicAuthTest {
|
||||||
|
HttpBasicAuth auth = null;
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void setup() {
|
||||||
|
auth = new HttpBasicAuth();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testApplyToParams() {
|
||||||
|
MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<String, String>();
|
||||||
|
HttpHeaders headerParams = new HttpHeaders();
|
||||||
|
|
||||||
|
auth.setUsername("my-username");
|
||||||
|
auth.setPassword("my-password");
|
||||||
|
auth.applyToParams(queryParams, headerParams);
|
||||||
|
|
||||||
|
// no changes to query parameters
|
||||||
|
assertEquals(0, queryParams.size());
|
||||||
|
assertEquals(1, headerParams.size());
|
||||||
|
// the string below is base64-encoded result of "my-username:my-password" with the "Basic " prefix
|
||||||
|
String expected = "Basic bXktdXNlcm5hbWU6bXktcGFzc3dvcmQ=";
|
||||||
|
assertEquals(expected, headerParams.get("Authorization").get(0));
|
||||||
|
|
||||||
|
// null username should be treated as empty string
|
||||||
|
auth.setUsername(null);
|
||||||
|
auth.applyToParams(queryParams, headerParams);
|
||||||
|
// the string below is base64-encoded result of ":my-password" with the "Basic " prefix
|
||||||
|
expected = "Basic Om15LXBhc3N3b3Jk";
|
||||||
|
assertEquals(expected, headerParams.get("Authorization").get(1));
|
||||||
|
|
||||||
|
// null password should be treated as empty string
|
||||||
|
auth.setUsername("my-username");
|
||||||
|
auth.setPassword(null);
|
||||||
|
auth.applyToParams(queryParams, headerParams);
|
||||||
|
// the string below is base64-encoded result of "my-username:" with the "Basic " prefix
|
||||||
|
expected = "Basic bXktdXNlcm5hbWU6";
|
||||||
|
assertEquals(expected, headerParams.get("Authorization").get(2));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
package org.openapitools.client.model;
|
||||||
|
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import com.fasterxml.jackson.databind.ObjectWriter;
|
||||||
|
import com.fasterxml.jackson.databind.SerializationFeature;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertEquals;
|
||||||
|
import static org.junit.Assert.assertTrue;
|
||||||
|
import static org.junit.Assert.fail;
|
||||||
|
|
||||||
|
public class EnumValueTest {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testEnumClass() {
|
||||||
|
assertEquals(EnumClass._ABC.toString(), "_abc");
|
||||||
|
assertEquals(EnumClass._EFG.toString(), "-efg");
|
||||||
|
assertEquals(EnumClass._XYZ_.toString(), "(xyz)");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testEnumTest() {
|
||||||
|
// test enum value
|
||||||
|
EnumTest enumTest = new EnumTest();
|
||||||
|
enumTest.setEnumString(EnumTest.EnumStringEnum.LOWER);
|
||||||
|
enumTest.setEnumInteger(EnumTest.EnumIntegerEnum.NUMBER_1);
|
||||||
|
enumTest.setEnumNumber(EnumTest.EnumNumberEnum.NUMBER_1_DOT_1);
|
||||||
|
|
||||||
|
assertEquals(EnumTest.EnumStringEnum.UPPER.toString(), "UPPER");
|
||||||
|
assertEquals(EnumTest.EnumStringEnum.UPPER.getValue(), "UPPER");
|
||||||
|
assertEquals(EnumTest.EnumStringEnum.LOWER.toString(), "lower");
|
||||||
|
assertEquals(EnumTest.EnumStringEnum.LOWER.getValue(), "lower");
|
||||||
|
|
||||||
|
assertEquals(EnumTest.EnumIntegerEnum.NUMBER_1.toString(), "1");
|
||||||
|
assertTrue(EnumTest.EnumIntegerEnum.NUMBER_1.getValue() == 1);
|
||||||
|
assertEquals(EnumTest.EnumIntegerEnum.NUMBER_MINUS_1.toString(), "-1");
|
||||||
|
assertTrue(EnumTest.EnumIntegerEnum.NUMBER_MINUS_1.getValue() == -1);
|
||||||
|
|
||||||
|
assertEquals(EnumTest.EnumNumberEnum.NUMBER_1_DOT_1.toString(), "1.1");
|
||||||
|
assertTrue(EnumTest.EnumNumberEnum.NUMBER_1_DOT_1.getValue() == 1.1);
|
||||||
|
assertEquals(EnumTest.EnumNumberEnum.NUMBER_MINUS_1_DOT_2.toString(), "-1.2");
|
||||||
|
assertTrue(EnumTest.EnumNumberEnum.NUMBER_MINUS_1_DOT_2.getValue() == -1.2);
|
||||||
|
|
||||||
|
try {
|
||||||
|
// test serialization (object => json)
|
||||||
|
ObjectMapper mapper = new ObjectMapper();
|
||||||
|
mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING);
|
||||||
|
ObjectWriter ow = mapper.writer();
|
||||||
|
String json = ow.writeValueAsString(enumTest);
|
||||||
|
assertEquals(json, "{\"enum_string\":\"lower\",\"enum_string_required\":null,\"enum_integer\":1,\"enum_number\":1.1,\"outerEnum\":null}");
|
||||||
|
|
||||||
|
// test deserialization (json => object)
|
||||||
|
EnumTest fromString = mapper.readValue(json, EnumTest.class);
|
||||||
|
assertEquals(fromString.getEnumString().toString(), "lower");
|
||||||
|
assertEquals(fromString.getEnumInteger().toString(), "1");
|
||||||
|
assertEquals(fromString.getEnumNumber().toString(), "1.1");
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
fail("Exception thrown during serialization/deserialzation of JSON: " + e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
<project>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>org.openapitools</groupId>
|
||||||
|
<artifactId>TypeScriptAngularBuildPestoreClientTests</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<name>TS Fetch Default Petstore Client</name>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>copy-dependencies</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<outputDirectory>${project.build.directory}</outputDirectory>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
<project>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>org.openapitools</groupId>
|
||||||
|
<artifactId>TypeScriptAngularBuildES6PestoreClientTests</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<name>TS Fetch ES6 Petstore Client</name>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>copy-dependencies</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<outputDirectory>${project.build.directory}</outputDirectory>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>exec-maven-plugin</artifactId>
|
||||||
|
<version>1.2.1</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>npm-install</id>
|
||||||
|
<phase>integration-test</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>exec</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<executable>npm</executable>
|
||||||
|
<arguments>
|
||||||
|
<argument>install</argument>
|
||||||
|
</arguments>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>npm-test</id>
|
||||||
|
<phase>integration-test</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>exec</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<executable>npm</executable>
|
||||||
|
<arguments>
|
||||||
|
<argument>test</argument>
|
||||||
|
</arguments>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
<project>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>org.openapitools</groupId>
|
||||||
|
<artifactId>TypeScriptAngularBuildWithNPMVersionPestoreClientTests</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<name>TS Fetch Petstore Client (with npm)</name>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>copy-dependencies</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<outputDirectory>${project.build.directory}</outputDirectory>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>exec-maven-plugin</artifactId>
|
||||||
|
<version>1.2.1</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>npm-install</id>
|
||||||
|
<phase>integration-test</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>exec</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<executable>npm</executable>
|
||||||
|
<arguments>
|
||||||
|
<argument>install</argument>
|
||||||
|
</arguments>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>npm-build</id>
|
||||||
|
<phase>integration-test</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>exec</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<executable>npm</executable>
|
||||||
|
<arguments>
|
||||||
|
<argument>run</argument>
|
||||||
|
<argument>build</argument>
|
||||||
|
</arguments>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>npm-test</id>
|
||||||
|
<phase>integration-test</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>exec</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<executable>npm</executable>
|
||||||
|
<arguments>
|
||||||
|
<argument>test</argument>
|
||||||
|
</arguments>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
<project>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>org.openapitools</groupId>
|
||||||
|
<artifactId>TypeScriptFetchPestoreClientTests</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<name>TS Fetch Petstore Test Client</name>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>copy-dependencies</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<outputDirectory>${project.build.directory}</outputDirectory>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>exec-maven-plugin</artifactId>
|
||||||
|
<version>1.2.1</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>npm-install</id>
|
||||||
|
<phase>pre-integration-test</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>exec</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<executable>npm</executable>
|
||||||
|
<arguments>
|
||||||
|
<argument>install</argument>
|
||||||
|
</arguments>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>npm-test</id>
|
||||||
|
<phase>integration-test</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>exec</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<executable>npm</executable>
|
||||||
|
<arguments>
|
||||||
|
<argument>test</argument>
|
||||||
|
</arguments>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
c2fcc2ae9693a8e8d02b25e286844aad88188fcb
|
||||||
Binary file not shown.
@@ -10,9 +10,27 @@
|
|||||||
<username>${env.SONATYPE_USERNAME}</username>
|
<username>${env.SONATYPE_USERNAME}</username>
|
||||||
<password>${env.SONATYPE_PASSWORD}</password>
|
<password>${env.SONATYPE_PASSWORD}</password>
|
||||||
</server>
|
</server>
|
||||||
|
<server>
|
||||||
|
<id>ossrh</id>
|
||||||
|
<username>${env.SONATYPE_USERNAME}</username>
|
||||||
|
<password>${env.SONATYPE_PASSWORD}</password>
|
||||||
|
</server>
|
||||||
</servers>
|
</servers>
|
||||||
<mirrors/>
|
<mirrors/>
|
||||||
<proxies/>
|
<proxies/>
|
||||||
<profiles/>
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<id>release</id>
|
||||||
|
<activation>
|
||||||
|
<activeByDefault>true</activeByDefault>
|
||||||
|
</activation>
|
||||||
|
<properties>
|
||||||
|
<gpg.executable>gpg</gpg.executable>
|
||||||
|
<gpg.keyname>${env.SIGNING_KEY}</gpg.keyname>
|
||||||
|
<gpg.passphrase>${env.SIGNING_PASSPHRASE}</gpg.passphrase>
|
||||||
|
<gpg.secretKeyring>${env.TRAVIS_BUILD_DIR}/sec.gpg</gpg.secretKeyring>
|
||||||
|
</properties>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
<activeProfiles/>
|
<activeProfiles/>
|
||||||
</settings>
|
</settings>
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
|
|
||||||
- Search the [open issue](https://github.com/openapitools/openapi-generator/issues) to ensure no one else has reported something similar and no one is actively working on similar proposed change.
|
- Search the [open issue](https://github.com/openapitools/openapi-generator/issues) to ensure no one else has reported something similar and no one is actively working on similar proposed change.
|
||||||
- If no one has suggested something similar, open an ["issue"](https://github.com/openapitools/openapi-generator/issues) with your suggestion to gather feedback from the community.
|
- If no one has suggested something similar, open an ["issue"](https://github.com/openapitools/openapi-generator/issues) with your suggestion to gather feedback from the community.
|
||||||
|
- If you're adding a new option to a generator, please consider using the `-t` option with customized templates instead or start a discussion first by opening an issue as we want to avoid adding too many options to the generator.
|
||||||
- It's recommended to **create a new git branch** for the change so that the merge commit message looks nicer in the commit history.
|
- It's recommended to **create a new git branch** for the change so that the merge commit message looks nicer in the commit history.
|
||||||
|
|
||||||
## How to contribute
|
## How to contribute
|
||||||
@@ -22,6 +23,10 @@ If you're new to git, you may find the following FAQs useful:
|
|||||||
|
|
||||||
https://github.com/openapitools/openapi-generator/wiki/FAQ#git
|
https://github.com/openapitools/openapi-generator/wiki/FAQ#git
|
||||||
|
|
||||||
|
### Branches
|
||||||
|
|
||||||
|
Please file the pull request against the correct branch, e.g. `master` for non-breaking changes. See the [Git Branches](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches) page for more information.
|
||||||
|
|
||||||
### Code generators
|
### Code generators
|
||||||
|
|
||||||
All the code generators can be found in [modules/openapi-generator/src/main/java/org/openapitools/codegen/languages](https://github.com/openapitools/openapi-generator/tree/master/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages)
|
All the code generators can be found in [modules/openapi-generator/src/main/java/org/openapitools/codegen/languages](https://github.com/openapitools/openapi-generator/tree/master/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages)
|
||||||
@@ -78,10 +83,11 @@ 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 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:
|
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)
|
- 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`
|
- Finally, git commit the updated samples files: `git commit -a`
|
||||||
(`git add -A` if added files with new test cases)
|
(`git add -A` if added files with new test cases)
|
||||||
|
- For new test cases, please add to the [Fake Petstore spec](https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml)
|
||||||
|
|
||||||
To start the CI tests, you can run `mvn verify -Psamples` (assuming you've all the required tools installed to run tests for different languages) or you can leverage http://travis-ci.org to run the CI tests by adding your own openapi-generator repository.
|
To start the CI tests, you can run `mvn verify -Psamples` (assuming you've all the required tools installed to run tests for different languages) or you can leverage http://travis-ci.org to run the CI tests by adding your own openapi-generator repository.
|
||||||
|
|
||||||
|
|||||||
@@ -14,8 +14,9 @@ COPY ./LICENSE ${GEN_DIR}
|
|||||||
COPY ./google_checkstyle.xml ${GEN_DIR}
|
COPY ./google_checkstyle.xml ${GEN_DIR}
|
||||||
|
|
||||||
# Modules are copied individually here to allow for caching of docker layers between major.minor versions
|
# Modules are copied individually here to allow for caching of docker layers between major.minor versions
|
||||||
# NOTE: openapi-generator-online is not included here
|
COPY ./modules/openapi-generator-gradle-plugin ${GEN_DIR}/modules/openapi-generator-gradle-plugin
|
||||||
COPY ./modules/openapi-generator-maven-plugin ${GEN_DIR}/modules/openapi-generator-maven-plugin
|
COPY ./modules/openapi-generator-maven-plugin ${GEN_DIR}/modules/openapi-generator-maven-plugin
|
||||||
|
COPY ./modules/openapi-generator-online ${GEN_DIR}/modules/openapi-generator-online
|
||||||
COPY ./modules/openapi-generator-cli ${GEN_DIR}/modules/openapi-generator-cli
|
COPY ./modules/openapi-generator-cli ${GEN_DIR}/modules/openapi-generator-cli
|
||||||
COPY ./modules/openapi-generator ${GEN_DIR}/modules/openapi-generator
|
COPY ./modules/openapi-generator ${GEN_DIR}/modules/openapi-generator
|
||||||
COPY ./pom.xml ${GEN_DIR}
|
COPY ./pom.xml ${GEN_DIR}
|
||||||
|
|||||||
210
LICENSE
210
LICENSE
@@ -1,12 +1,202 @@
|
|||||||
Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech)
|
Apache License
|
||||||
Copyright 2018 SmartBear Software
|
Version 2.0, January 2004
|
||||||
|
http://www.apache.org/licenses/
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at [apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
1. Definitions.
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
"License" shall mean the terms and conditions for use, reproduction,
|
||||||
See the License for the specific language governing permissions and
|
and distribution as defined by Sections 1 through 9 of this document.
|
||||||
limitations under the License.
|
|
||||||
|
"Licensor" shall mean the copyright owner or entity authorized by
|
||||||
|
the copyright owner that is granting the License.
|
||||||
|
|
||||||
|
"Legal Entity" shall mean the union of the acting entity and all
|
||||||
|
other entities that control, are controlled by, or are under common
|
||||||
|
control with that entity. For the purposes of this definition,
|
||||||
|
"control" means (i) the power, direct or indirect, to cause the
|
||||||
|
direction or management of such entity, whether by contract or
|
||||||
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||||
|
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
|
||||||
|
"You" (or "Your") shall mean an individual or Legal Entity
|
||||||
|
exercising permissions granted by this License.
|
||||||
|
|
||||||
|
"Source" form shall mean the preferred form for making modifications,
|
||||||
|
including but not limited to software source code, documentation
|
||||||
|
source, and configuration files.
|
||||||
|
|
||||||
|
"Object" form shall mean any form resulting from mechanical
|
||||||
|
transformation or translation of a Source form, including but
|
||||||
|
not limited to compiled object code, generated documentation,
|
||||||
|
and conversions to other media types.
|
||||||
|
|
||||||
|
"Work" shall mean the work of authorship, whether in Source or
|
||||||
|
Object form, made available under the License, as indicated by a
|
||||||
|
copyright notice that is included in or attached to the work
|
||||||
|
(an example is provided in the Appendix below).
|
||||||
|
|
||||||
|
"Derivative Works" shall mean any work, whether in Source or Object
|
||||||
|
form, that is based on (or derived from) the Work and for which the
|
||||||
|
editorial revisions, annotations, elaborations, or other modifications
|
||||||
|
represent, as a whole, an original work of authorship. For the purposes
|
||||||
|
of this License, Derivative Works shall not include works that remain
|
||||||
|
separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
|
the Work and Derivative Works thereof.
|
||||||
|
|
||||||
|
"Contribution" shall mean any work of authorship, including
|
||||||
|
the original version of the Work and any modifications or additions
|
||||||
|
to that Work or Derivative Works thereof, that is intentionally
|
||||||
|
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||||
|
or by an individual or Legal Entity authorized to submit on behalf of
|
||||||
|
the copyright owner. For the purposes of this definition, "submitted"
|
||||||
|
means any form of electronic, verbal, or written communication sent
|
||||||
|
to the Licensor or its representatives, including but not limited to
|
||||||
|
communication on electronic mailing lists, source code control systems,
|
||||||
|
and issue tracking systems that are managed by, or on behalf of, the
|
||||||
|
Licensor for the purpose of discussing and improving the Work, but
|
||||||
|
excluding communication that is conspicuously marked or otherwise
|
||||||
|
designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
|
||||||
|
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||||
|
on behalf of whom a Contribution has been received by Licensor and
|
||||||
|
subsequently incorporated within the Work.
|
||||||
|
|
||||||
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
copyright license to reproduce, prepare Derivative Works of,
|
||||||
|
publicly display, publicly perform, sublicense, and distribute the
|
||||||
|
Work and such Derivative Works in Source or Object form.
|
||||||
|
|
||||||
|
3. Grant of Patent License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
(except as stated in this section) patent license to make, have made,
|
||||||
|
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||||
|
where such license applies only to those patent claims licensable
|
||||||
|
by such Contributor that are necessarily infringed by their
|
||||||
|
Contribution(s) alone or by combination of their Contribution(s)
|
||||||
|
with the Work to which such Contribution(s) was submitted. If You
|
||||||
|
institute patent litigation against any entity (including a
|
||||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||||
|
or a Contribution incorporated within the Work constitutes direct
|
||||||
|
or contributory patent infringement, then any patent licenses
|
||||||
|
granted to You under this License for that Work shall terminate
|
||||||
|
as of the date such litigation is filed.
|
||||||
|
|
||||||
|
4. Redistribution. You may reproduce and distribute copies of the
|
||||||
|
Work or Derivative Works thereof in any medium, with or without
|
||||||
|
modifications, and in Source or Object form, provided that You
|
||||||
|
meet the following conditions:
|
||||||
|
|
||||||
|
(a) You must give any other recipients of the Work or
|
||||||
|
Derivative Works a copy of this License; and
|
||||||
|
|
||||||
|
(b) You must cause any modified files to carry prominent notices
|
||||||
|
stating that You changed the files; and
|
||||||
|
|
||||||
|
(c) You must retain, in the Source form of any Derivative Works
|
||||||
|
that You distribute, all copyright, patent, trademark, and
|
||||||
|
attribution notices from the Source form of the Work,
|
||||||
|
excluding those notices that do not pertain to any part of
|
||||||
|
the Derivative Works; and
|
||||||
|
|
||||||
|
(d) If the Work includes a "NOTICE" text file as part of its
|
||||||
|
distribution, then any Derivative Works that You distribute must
|
||||||
|
include a readable copy of the attribution notices contained
|
||||||
|
within such NOTICE file, excluding those notices that do not
|
||||||
|
pertain to any part of the Derivative Works, in at least one
|
||||||
|
of the following places: within a NOTICE text file distributed
|
||||||
|
as part of the Derivative Works; within the Source form or
|
||||||
|
documentation, if provided along with the Derivative Works; or,
|
||||||
|
within a display generated by the Derivative Works, if and
|
||||||
|
wherever such third-party notices normally appear. The contents
|
||||||
|
of the NOTICE file are for informational purposes only and
|
||||||
|
do not modify the License. You may add Your own attribution
|
||||||
|
notices within Derivative Works that You distribute, alongside
|
||||||
|
or as an addendum to the NOTICE text from the Work, provided
|
||||||
|
that such additional attribution notices cannot be construed
|
||||||
|
as modifying the License.
|
||||||
|
|
||||||
|
You may add Your own copyright statement to Your modifications and
|
||||||
|
may provide additional or different license terms and conditions
|
||||||
|
for use, reproduction, or distribution of Your modifications, or
|
||||||
|
for any such Derivative Works as a whole, provided Your use,
|
||||||
|
reproduction, and distribution of the Work otherwise complies with
|
||||||
|
the conditions stated in this License.
|
||||||
|
|
||||||
|
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||||
|
any Contribution intentionally submitted for inclusion in the Work
|
||||||
|
by You to the Licensor shall be under the terms and conditions of
|
||||||
|
this License, without any additional terms or conditions.
|
||||||
|
Notwithstanding the above, nothing herein shall supersede or modify
|
||||||
|
the terms of any separate license agreement you may have executed
|
||||||
|
with Licensor regarding such Contributions.
|
||||||
|
|
||||||
|
6. Trademarks. This License does not grant permission to use the trade
|
||||||
|
names, trademarks, service marks, or product names of the Licensor,
|
||||||
|
except as required for reasonable and customary use in describing the
|
||||||
|
origin of the Work and reproducing the content of the NOTICE file.
|
||||||
|
|
||||||
|
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||||
|
agreed to in writing, Licensor provides the Work (and each
|
||||||
|
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
implied, including, without limitation, any warranties or conditions
|
||||||
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||||
|
appropriateness of using or redistributing the Work and assume any
|
||||||
|
risks associated with Your exercise of permissions under this License.
|
||||||
|
|
||||||
|
8. Limitation of Liability. In no event and under no legal theory,
|
||||||
|
whether in tort (including negligence), contract, or otherwise,
|
||||||
|
unless required by applicable law (such as deliberate and grossly
|
||||||
|
negligent acts) or agreed to in writing, shall any Contributor be
|
||||||
|
liable to You for damages, including any direct, indirect, special,
|
||||||
|
incidental, or consequential damages of any character arising as a
|
||||||
|
result of this License or out of the use or inability to use the
|
||||||
|
Work (including but not limited to damages for loss of goodwill,
|
||||||
|
work stoppage, computer failure or malfunction, or any and all
|
||||||
|
other commercial damages or losses), even if such Contributor
|
||||||
|
has been advised of the possibility of such damages.
|
||||||
|
|
||||||
|
9. Accepting Warranty or Additional Liability. While redistributing
|
||||||
|
the Work or Derivative Works thereof, You may choose to offer,
|
||||||
|
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||||
|
or other liability obligations and/or rights consistent with this
|
||||||
|
License. However, in accepting such obligations, You may act only
|
||||||
|
on Your own behalf and on Your sole responsibility, not on behalf
|
||||||
|
of any other Contributor, and only if You agree to indemnify,
|
||||||
|
defend, and hold each Contributor harmless for any liability
|
||||||
|
incurred by, or claims asserted against, such Contributor by reason
|
||||||
|
of your accepting any such warranty or additional liability.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
APPENDIX: How to apply the Apache License to your work.
|
||||||
|
|
||||||
|
To apply the Apache License to your work, attach the following
|
||||||
|
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||||
|
replaced with your own identifying information. (Don't include
|
||||||
|
the brackets!) The text should be enclosed in the appropriate
|
||||||
|
comment syntax for the file format. We also recommend that a
|
||||||
|
file or class name and description of purpose be included on the
|
||||||
|
same "printed page" as the copyright notice for easier
|
||||||
|
identification within third-party archives.
|
||||||
|
|
||||||
|
Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech)
|
||||||
|
Copyright 2018 SmartBear Software
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|||||||
392
README.md
392
README.md
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
|
|
||||||
Master (3.0.0): [](https://travis-ci.org/OpenAPITools/openapi-generator)
|
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`4.0.0`): [](https://travis-ci.org/OpenAPITools/openapi-generator)
|
||||||
[](https://circleci.com/gh/OpenAPITools/openapi-generator)
|
[](https://circleci.com/gh/OpenAPITools/openapi-generator)
|
||||||
[](https://app.shippable.com/github/OpenAPITools/openapi-generator/dashboard)
|
[](https://app.shippable.com/github/OpenAPITools/openapi-generator)
|
||||||
[](https://ci.appveyor.com/project/WilliamCheng/openapi-generator-wh2wu)
|
[](https://ci.appveyor.com/project/WilliamCheng/openapi-generator-wh2wu)
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -12,6 +12,8 @@ Master (3.0.0): [](https://gitter.im/OpenAPITools/openapi-generator?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
[](https://gitter.im/OpenAPITools/openapi-generator?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||||
|
[](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.openapitools%22%20AND%20a%3A%22openapi-generator%22)
|
||||||
|
[](https://twitter.com/oas_generator)
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -23,9 +25,11 @@ Master (3.0.0): [ and [FAQ](https://github.com/openapitools/openapi-generator/wiki/FAQ) :notebook_with_decorative_cover:
|
:notebook_with_decorative_cover: For more information, please refer to the [Wiki page](https://github.com/openapitools/openapi-generator/wiki) and [FAQ](https://github.com/openapitools/openapi-generator/wiki/FAQ) :notebook_with_decorative_cover:
|
||||||
|
|
||||||
:notebook_with_decorative_cover: The eBook [A Beginner's Guide to Code Generation for REST APIs](https://gumroad.com/l/swagger_codegen_beginner) is a good starting point for begineers :notebook_with_decorative_cover:
|
:notebook_with_decorative_cover: The eBook [A Beginner's Guide to Code Generation for REST APIs](https://gumroad.com/l/swagger_codegen_beginner) is a good starting point for beginners :notebook_with_decorative_cover:
|
||||||
|
|
||||||
:warning: If the OpenAPI spec is obtained from an untrusted source, please make sure you've reviewed the spec before using OpenAPI Generator to generate the API client, server stub or documentation as [code injection](https://en.wikipedia.org/wiki/Code_injection) may occur :warning:
|
:warning: If the OpenAPI spec, templates or any input (e.g. options, environment variables) is obtained from an untrusted source or environment, please make sure you've reviewed these inputs before using OpenAPI Generator to generate the API client, server stub or documentation to avoid potential security issues (e.g. [code injection](https://en.wikipedia.org/wiki/Code_injection)) :warning:
|
||||||
|
|
||||||
|
:bangbang: Both "OpenAPI Tools" (https://OpenAPITools.org - the parent organization of OpenAPI Generator) and "OpenAPI Generator" are not affiliated with OpenAPI Initiative (OAI) :bangbang:
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -34,11 +38,11 @@ OpenAPI Generator allows generation of API client libraries (SDK generation), se
|
|||||||
|
|
||||||
| | Languages/Frameworks |
|
| | Languages/Frameworks |
|
||||||
|-|-|
|
|-|-|
|
||||||
**API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C#** (.net 2.0, 3.5 or later), **C++** (cpprest, Qt5, Tizen), **Clojure**, **Dart**, **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), **Kotlin**, **Lua**, **Node.js** (ES5, ES6, AngularJS with Google Closure Compiler annotations) **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 - 6.x), Aurelia, Fetch, Inversify, jQuery, Node)
|
**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**, **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**, **PHP** (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**
|
**API documentation generators** | **HTML**, **Confluence Wiki**
|
||||||
**Configuration files** | [**Apache2**](https://httpd.apache.org/)
|
**Configuration files** | [**Apache2**](https://httpd.apache.org/)
|
||||||
**Others** | **JMeter**
|
**Others** | **GraphQL**, **JMeter**, **MySQL Schema**
|
||||||
|
|
||||||
## Table of contents
|
## Table of contents
|
||||||
|
|
||||||
@@ -47,10 +51,12 @@ OpenAPI Generator allows generation of API client libraries (SDK generation), se
|
|||||||
- [Table of Contents](#table-of-contents)
|
- [Table of Contents](#table-of-contents)
|
||||||
- [1 - Installation](#1---installation)
|
- [1 - Installation](#1---installation)
|
||||||
- [1.1 - Compatibility](#11---compatibility)
|
- [1.1 - Compatibility](#11---compatibility)
|
||||||
- [1.2 - Download JAR](#12---download-jar)
|
- [1.2 - Artifacts on Maven Central](#12---artifacts-on-maven-central)
|
||||||
- [1.3 - Build Projects](#13---build-projects)
|
- [1.3 - Download JAR](#13---download-jar)
|
||||||
- [1.4 - Homebrew](#14---homebrew)
|
- [1.4 - Build Projects](#14---build-projects)
|
||||||
- [1.5 - Docker](#15---docker)
|
- [1.5 - Homebrew](#15---homebrew)
|
||||||
|
- [1.6 - Docker](#16---docker)
|
||||||
|
- [1.7 - NPM](#17---npm)
|
||||||
- [2 - Getting Started](#2---getting-started)
|
- [2 - Getting Started](#2---getting-started)
|
||||||
- [3 - Usage](#3---usage)
|
- [3 - Usage](#3---usage)
|
||||||
- [3.1 - Customization](#31---customization)
|
- [3.1 - Customization](#31---customization)
|
||||||
@@ -71,27 +77,75 @@ OpenAPI Generator allows generation of API client libraries (SDK generation), se
|
|||||||
|
|
||||||
The OpenAPI Specification has undergone 3 revisions since initial creation in 2010. The openapi-generator project has the following compatibilities with the OpenAPI Specification:
|
The OpenAPI Specification has undergone 3 revisions since initial creation in 2010. The openapi-generator project has the following compatibilities with the OpenAPI Specification:
|
||||||
|
|
||||||
OpenAPI Generator Version | Release Date | OpenAPI Spec compatibility | Notes
|
OpenAPI Generator Version | Release Date | Notes
|
||||||
---------------------------- | ------------ | -------------------------- | -----
|
---------------------------- | ------------ | -----
|
||||||
4.0.0 (upcoming major release) | TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Major release with breaking changes (no fallback)
|
4.0.0 (upcoming release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/4.0.0-SNAPSHOT/)| 20.12.2018 | Major release with breaking changes (with or without fallback)
|
||||||
3.1.0 (upcoming minor release) | TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Minor release with breaking changes (with fallbacks)
|
[3.3.4](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.3.4) (latest stable release) | 30.11.2018 | Bugfix release
|
||||||
3.0.0 (current master, upcoming release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/3.0.0-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | First release with breaking changes
|
|
||||||
|
|
||||||
|
OpenAPI Spec compatibility: 1.0, 1.1, 1.2, 2.0, 3.0
|
||||||
|
|
||||||
### [1.2 - Download JAR](#table-of-contents)
|
For old releases, please refer to the [**Release**](https://github.com/OpenAPITools/openapi-generator/releases) page.
|
||||||
|
|
||||||
|
## [1.2 - Artifacts on Maven Central](#table-of-contents)
|
||||||
|
|
||||||
|
You can find our released artifacts on maven central:
|
||||||
|
|
||||||
|
**Core:**
|
||||||
|
```xml
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.openapitools</groupId>
|
||||||
|
<artifactId>openapi-generator</artifactId>
|
||||||
|
<version>${openapi-generator-version}</version>
|
||||||
|
</dependency>
|
||||||
|
```
|
||||||
|
See the different versions of the [openapi-generator](https://mvnrepository.com/artifact/org.openapitools/openapi-generator) artifact available on maven central.
|
||||||
|
|
||||||
|
**Cli:**
|
||||||
|
```xml
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.openapitools</groupId>
|
||||||
|
<artifactId>openapi-generator-cli</artifactId>
|
||||||
|
<version>${openapi-generator-version}</version>
|
||||||
|
</dependency>
|
||||||
|
```
|
||||||
|
See the different versions of the [openapi-generator-cli](https://mvnrepository.com/artifact/org.openapitools/openapi-generator-cli) artifact available on maven central.
|
||||||
|
|
||||||
|
**Maven plugin:**
|
||||||
|
```xml
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.openapitools</groupId>
|
||||||
|
<artifactId>openapi-generator-maven-plugin</artifactId>
|
||||||
|
<version>${openapi-generator-version}</version>
|
||||||
|
</dependency>
|
||||||
|
```
|
||||||
|
* See the different versions of the [openapi-generator-maven-plugin](https://mvnrepository.com/artifact/org.openapitools/openapi-generator-maven-plugin) artifact available on maven central.
|
||||||
|
* [Readme](https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator-maven-plugin/README.md)
|
||||||
|
|
||||||
|
**Gradle plugin:**
|
||||||
|
```xml
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.openapitools</groupId>
|
||||||
|
<artifactId>openapi-generator-gradle-plugin</artifactId>
|
||||||
|
<version>${openapi-generator-version}</version>
|
||||||
|
</dependency>
|
||||||
|
```
|
||||||
|
* See the different versions of the [openapi-generator-gradle-plugin](https://mvnrepository.com/artifact/org.openapitools/openapi-generator-gradle-plugin) artifact available on maven central.
|
||||||
|
* [Readme](https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator-gradle-plugin/README.adoc)
|
||||||
|
|
||||||
|
### [1.3 - Download JAR](#table-of-contents)
|
||||||
|
|
||||||
If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 8 runtime at a minimum):
|
If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 8 runtime at a minimum):
|
||||||
|
|
||||||
JAR location: `http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.0.0/openapi-generator-cli-3.0.0.jar`
|
JAR location: `http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.3.4/openapi-generator-cli-3.3.4.jar`
|
||||||
|
|
||||||
For **Mac/Linux** users:
|
For **Mac/Linux** users:
|
||||||
```sh
|
```sh
|
||||||
wget http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.0.0/openapi-generator-cli-3.0.0.jar -O openapi-generator-cli.jar
|
wget http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.3.4/openapi-generator-cli-3.3.4.jar -O openapi-generator-cli.jar
|
||||||
```
|
```
|
||||||
|
|
||||||
For **Windows** users, you will need to install [wget](http://gnuwin32.sourceforge.net/packages/wget.htm) or you can use Invoke-WebRequest in PowerShell (3.0+), e.g.
|
For **Windows** users, you will need to install [wget](http://gnuwin32.sourceforge.net/packages/wget.htm) or you can use Invoke-WebRequest in PowerShell (3.0+), e.g.
|
||||||
```
|
```
|
||||||
Invoke-WebRequest -OutFile openapi-generator-cli.jar http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.0.0/openapi-generator-cli-3.0.0.jar
|
Invoke-WebRequest -OutFile openapi-generator-cli.jar http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.3.4/openapi-generator-cli-3.3.4.jar
|
||||||
```
|
```
|
||||||
|
|
||||||
After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage.
|
After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage.
|
||||||
@@ -102,13 +156,56 @@ export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
|
|||||||
export PATH=${JAVA_HOME}/bin:$PATH
|
export PATH=${JAVA_HOME}/bin:$PATH
|
||||||
```
|
```
|
||||||
|
|
||||||
### [1.3 - Build Projects](#table-of-contents)
|
### Launcher Script
|
||||||
|
|
||||||
|
One downside to manual jar downloads is that you don't keep up-to-date with the latest released version. We have a Bash launcher script at [bin/utils/openapi-generator.cli.sh](./bin/utils/openapi-generator-cli.sh) which resolves this issue.
|
||||||
|
|
||||||
|
To install the launcher script, copy the contents of the script to a location on your path and make the script executable.
|
||||||
|
|
||||||
|
An example of setting this up (NOTE: Always evaluate scripts curled from external systems before executing them).
|
||||||
|
|
||||||
|
```
|
||||||
|
mkdir -p ~/bin/openapitools
|
||||||
|
curl https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/bin/utils/openapi-generator-cli.sh > ~/bin/openapitools/openapi-generator-cli
|
||||||
|
chmod u+x ~/bin/openapitools/openapi-generator-cli
|
||||||
|
export PATH=$PATH:~/bin/openapitools/
|
||||||
|
```
|
||||||
|
|
||||||
|
Now, `openapi-generator-cli` is "installed". On invocation, it will query the GitHub repository for the most recently released version. If this matches the last downloaded jar,
|
||||||
|
it will execute as normal. If a newer version is found, the script will download the latest release and execute it.
|
||||||
|
|
||||||
|
If you need to invoke an older version of the generator, you can define the variable `OPENAPI_GENERATOR_VERSION` either ad hoc or globally. You can export this variable if you'd like to persist a specific release version.
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
```
|
||||||
|
# Execute latest released openapi-generator-cli
|
||||||
|
openapi-generator-cli version
|
||||||
|
|
||||||
|
# Execute version 3.1.0 for the current invocation, regardless of the latest released version
|
||||||
|
OPENAPI_GENERATOR_VERSION=3.1.0 openapi-generator-cli version
|
||||||
|
|
||||||
|
# Execute version 3.1.0-SNAPSHOT for the current invocation
|
||||||
|
OPENAPI_GENERATOR_VERSION=3.1.0-SNAPSHOT openapi-generator-cli version
|
||||||
|
|
||||||
|
# Execute version 3.0.2 for every invocation in the current shell session
|
||||||
|
export OPENAPI_GENERATOR_VERSION=3.0.2
|
||||||
|
openapi-generator-cli version # is 3.0.2
|
||||||
|
openapi-generator-cli version # is also 3.0.2
|
||||||
|
|
||||||
|
# To "install" a specific version, set the variable in .bashrc/.bash_profile
|
||||||
|
echo "export OPENAPI_GENERATOR_VERSION=3.0.2" >> ~/.bashrc
|
||||||
|
source ~/.bashrc
|
||||||
|
openapi-generator-cli version # is always 3.0.2, unless any of the above overrides are done ad hoc
|
||||||
|
```
|
||||||
|
|
||||||
|
### [1.4 - Build Projects](#table-of-contents)
|
||||||
|
|
||||||
To build from source, you need the following installed and available in your `$PATH:`
|
To build from source, you need the following installed and available in your `$PATH:`
|
||||||
|
|
||||||
* [Java 8](http://java.oracle.com)
|
* [Java 8](http://java.oracle.com)
|
||||||
|
|
||||||
* [Apache maven 3.3.3 or greater](http://maven.apache.org/)
|
* [Apache maven 3.3.4 or greater](http://maven.apache.org/)
|
||||||
|
|
||||||
After cloning the project, you can build it from source with this command:
|
After cloning the project, you can build it from source with this command:
|
||||||
```sh
|
```sh
|
||||||
@@ -120,7 +217,7 @@ If you don't have maven installed, you may directly use the included [maven wrap
|
|||||||
./mvnw clean install
|
./mvnw clean install
|
||||||
```
|
```
|
||||||
|
|
||||||
### [1.4 - Homebrew](#table-of-contents)
|
### [1.5 - Homebrew](#table-of-contents)
|
||||||
|
|
||||||
To install, run `brew install openapi-generator`
|
To install, run `brew install openapi-generator`
|
||||||
|
|
||||||
@@ -129,7 +226,9 @@ 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/
|
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/
|
||||||
```
|
```
|
||||||
|
|
||||||
### [1.5 - Docker](#table-of-contents)
|
To reinstall with the latest master, run `brew uninstall openapi-generator && brew install --HEAD openapi-generator`
|
||||||
|
|
||||||
|
### [1.6 - Docker](#table-of-contents)
|
||||||
|
|
||||||
#### Public Pre-built Docker images
|
#### Public Pre-built Docker images
|
||||||
|
|
||||||
@@ -175,13 +274,13 @@ GEN_IP=$(docker inspect --format '{{.NetworkSettings.IPAddress}}' $CID)
|
|||||||
-d '{"openAPIUrl": "https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml"}' \
|
-d '{"openAPIUrl": "https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml"}' \
|
||||||
'http://localhost:8888/api/gen/clients/ruby'
|
'http://localhost:8888/api/gen/clients/ruby'
|
||||||
|
|
||||||
{"code":"c2d483d3-3672-40e9-91df-b9ffd18d22b8","link":"http://localhost:8888/api/gen/download/c2d483d3-3672-40e9-91df-b9ffd18d22b8"}
|
{"code":"c2d483.3.4672-40e9-91df-b9ffd18d22b8","link":"http://localhost:8888/api/gen/download/c2d483.3.4672-40e9-91df-b9ffd18d22b8"}
|
||||||
|
|
||||||
# Download the generated zip file
|
# Download the generated zip file
|
||||||
> wget http://localhost:8888/api/gen/download/c2d483d3-3672-40e9-91df-b9ffd18d22b8
|
> wget http://localhost:8888/api/gen/download/c2d483.3.4672-40e9-91df-b9ffd18d22b8
|
||||||
|
|
||||||
# Unzip the file
|
# Unzip the file
|
||||||
> unzip c2d483d3-3672-40e9-91df-b9ffd18d22b8
|
> unzip c2d483.3.4672-40e9-91df-b9ffd18d22b8
|
||||||
|
|
||||||
# Shutdown the openapi generator image
|
# Shutdown the openapi generator image
|
||||||
> docker stop $CID && docker rm $CID
|
> docker stop $CID && docker rm $CID
|
||||||
@@ -212,6 +311,20 @@ Once built, `run-in-docker.sh` will act as an executable for openapi-generator-c
|
|||||||
-g go -o /gen/out/go-petstore -DpackageName=petstore # generates go client, outputs locally to ./out/go-petstore
|
-g go -o /gen/out/go-petstore -DpackageName=petstore # generates go client, outputs locally to ./out/go-petstore
|
||||||
```
|
```
|
||||||
|
|
||||||
|
##### Troubleshooting
|
||||||
|
|
||||||
|
If an error like this occurs, just execute the **mvn clean install -U** command:
|
||||||
|
|
||||||
|
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project openapi-generator: A type incompatibility occurred while executing org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test: java.lang.ExceptionInInitializerError cannot be cast to java.io.IOException
|
||||||
|
|
||||||
|
```sh
|
||||||
|
./run-in-docker.sh mvn clean install -U
|
||||||
|
```
|
||||||
|
|
||||||
|
> Failed to execute goal org.fortasoft:gradle-maven-plugin:1.0.8:invoke (default) on project openapi-generator-gradle-plugin-mvn-wrapper: org.gradle.tooling.BuildException: Could not execute build using Gradle distribution 'https://services.gradle.org/distributions/gradle-4.7-bin.zip'
|
||||||
|
|
||||||
|
Right now: no solution for this one :|
|
||||||
|
|
||||||
#### Run Docker in Vagrant
|
#### Run Docker in Vagrant
|
||||||
Prerequisite: install [Vagrant](https://www.vagrantup.com/downloads.html) and [VirtualBox](https://www.virtualbox.org/wiki/Downloads).
|
Prerequisite: install [Vagrant](https://www.vagrantup.com/downloads.html) and [VirtualBox](https://www.virtualbox.org/wiki/Downloads).
|
||||||
```sh
|
```sh
|
||||||
@@ -223,6 +336,30 @@ cd /vagrant
|
|||||||
./run-in-docker.sh mvn package
|
./run-in-docker.sh mvn package
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### [1.7 - NPM](#table-of-contents)
|
||||||
|
|
||||||
|
There is also an [NPM package wrapper](https://www.npmjs.com/package/@openapitools/openapi-generator-cli) available for different platforms (e.g. Linux, Mac, Windows). (JVM is still required)
|
||||||
|
Please see the [project's README](https://github.com/openapitools/openapi-generator-cli) there for more information.
|
||||||
|
|
||||||
|
Install it globally to get the CLI available on the command line:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm install @openapitools/openapi-generator-cli -g
|
||||||
|
openapi-generator version
|
||||||
|
```
|
||||||
|
|
||||||
|
Or install a particualar OpenAPI Generator version (e.g. v3.3.4):
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm install @openapitools/openapi-generator-cli@cli-3.3.4 -g
|
||||||
|
```
|
||||||
|
|
||||||
|
Or install it as dev-dependency:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm install @openapitools/openapi-generator-cli -D
|
||||||
|
```
|
||||||
|
|
||||||
## [2 - Getting Started](#table-of-contents)
|
## [2 - Getting Started](#table-of-contents)
|
||||||
|
|
||||||
To generate a PHP client for [petstore.yaml](https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml), please run the following
|
To generate a PHP client for [petstore.yaml](https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml), please run the following
|
||||||
@@ -237,7 +374,7 @@ java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generat
|
|||||||
```
|
```
|
||||||
(if you're on Windows, replace the last command with `java -jar modules\openapi-generator-cli\target\openapi-generator-cli.jar generate -i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g php -o c:\temp\php_api_client`)
|
(if you're on Windows, replace the last command with `java -jar modules\openapi-generator-cli\target\openapi-generator-cli.jar generate -i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g php -o c:\temp\php_api_client`)
|
||||||
|
|
||||||
You can also download the JAR (latest release) directly from [maven.org](http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.0.0/openapi-generator-cli-3.0.0.jar)
|
You can also download the JAR (latest release) directly from [maven.org](http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.3.4/openapi-generator-cli-3.3.4.jar)
|
||||||
|
|
||||||
To get a list of **general** options available, please run `java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar help generate`
|
To get a list of **general** options available, please run `java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar help generate`
|
||||||
|
|
||||||
@@ -249,21 +386,23 @@ To get a list of PHP specified options (which can be passed to the generator wit
|
|||||||
You can build a client against the [Petstore API](https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml) as follows:
|
You can build a client against the [Petstore API](https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml) as follows:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
./bin/java-petstore.sh
|
./bin/java-petstore-okhttp-gson.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
(On Windows, run `.\bin\windows\java-petstore.bat` instead)
|
(On Windows, run `.\bin\windows\java-petstore-okhttp-gson.bat` instead)
|
||||||
|
|
||||||
This will run the generator with this command:
|
This script uses the default library, which is `okhttp-gson`. It will run the generator with this command:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate \
|
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate \
|
||||||
-i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml \
|
-i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml \
|
||||||
-g java \
|
-g java \
|
||||||
-o samples/client/petstore/java
|
-o samples/client/petstore/java/okhttp-gson
|
||||||
```
|
```
|
||||||
|
|
||||||
with a number of options. You can get the options with the `help generate` command (below only shows partial results):
|
with a number of options. [The java options are documented here.](docs/generators/java.md)
|
||||||
|
|
||||||
|
You can also get the options with the `help generate` command (below only shows partial results):
|
||||||
|
|
||||||
```
|
```
|
||||||
NAME
|
NAME
|
||||||
@@ -286,15 +425,15 @@ SYNOPSIS
|
|||||||
[--import-mappings <import mappings>...]
|
[--import-mappings <import mappings>...]
|
||||||
[--instantiation-types <instantiation types>...]
|
[--instantiation-types <instantiation types>...]
|
||||||
[--invoker-package <invoker package>]
|
[--invoker-package <invoker package>]
|
||||||
[(-l <language> | --lang <language>)]
|
|
||||||
[--language-specific-primitives <language specific primitives>...]
|
[--language-specific-primitives <language specific primitives>...]
|
||||||
[--library <library>] [--model-name-prefix <model name prefix>]
|
[--library <library>] [--log-to-stderr]
|
||||||
|
[--model-name-prefix <model name prefix>]
|
||||||
[--model-name-suffix <model name suffix>]
|
[--model-name-suffix <model name suffix>]
|
||||||
[--model-package <model package>]
|
[--model-package <model package>]
|
||||||
[(-o <output directory> | --output <output directory>)]
|
[(-o <output directory> | --output <output directory>)]
|
||||||
[--release-note <release note>] [--remove-operation-id-prefix]
|
[--release-note <release note>] [--remove-operation-id-prefix]
|
||||||
[--reserved-words-mappings <reserved word mappings>...]
|
[--reserved-words-mappings <reserved word mappings>...]
|
||||||
[(-s | --skip-overwrite)]
|
[(-s | --skip-overwrite)] [--skip-validate-spec]
|
||||||
[(-t <template directory> | --template-dir <template directory>)]
|
[(-t <template directory> | --template-dir <template directory>)]
|
||||||
[--type-mappings <type mappings>...] [(-v | --verbose)]
|
[--type-mappings <type mappings>...] [(-v | --verbose)]
|
||||||
|
|
||||||
@@ -314,16 +453,19 @@ OPTIONS
|
|||||||
You can then compile and run the client, as well as unit tests against it:
|
You can then compile and run the client, as well as unit tests against it:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cd samples/client/petstore/java
|
cd samples/client/petstore/java/okhttp-gson
|
||||||
mvn package
|
mvn package
|
||||||
```
|
```
|
||||||
|
|
||||||
Other languages have petstore samples, too:
|
Other languages have petstore samples, too:
|
||||||
```sh
|
```sh
|
||||||
./bin/android-petstore.sh
|
./bin/android-petstore-all.sh
|
||||||
./bin/java-petstore.sh
|
./bin/java-petstore-all.sh
|
||||||
./bin/objc-petstore.sh
|
./bin/objc-petstore.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
|
... and others. [Here is a list of all scripts.](https://github.com/OpenAPITools/openapi-generator/wiki/Samples-folder#scripts)
|
||||||
|
|
||||||
### [3.1 - Customization](#table-of-contents)
|
### [3.1 - Customization](#table-of-contents)
|
||||||
|
|
||||||
Please refer to [customization.md](docs/customization.md) on how to customize the output (e.g. package name, version)
|
Please refer to [customization.md](docs/customization.md) on how to customize the output (e.g. package name, version)
|
||||||
@@ -334,7 +476,16 @@ Please refer to [integration.md](docs/integration.md) on how to integrate OpenAP
|
|||||||
|
|
||||||
### [3.3 - Online OpenAPI generator](#table-of-contents)
|
### [3.3 - Online OpenAPI generator](#table-of-contents)
|
||||||
|
|
||||||
Please refer to [online-openapi-generator.md](docs/online-openapi-generator.md) on how to run and use the `openapi-generator-online` - a web service for `openapi-generator`.
|
Here are the public online services:
|
||||||
|
|
||||||
|
- latest stable version: http://api.openapi-generator.tech
|
||||||
|
- latest master: http://api-latest-master.openapi-generator.tech (updated with latest master every hour)
|
||||||
|
|
||||||
|
The server is sponsored by [Linode](https://www.linode.com/) [](https://www.linode.com/)
|
||||||
|
|
||||||
|
(These services are beta and do not have any guarantee on service level)
|
||||||
|
|
||||||
|
Please refer to [online.md](docs/online.md) on how to run and use the `openapi-generator-online` - a web service for `openapi-generator`.
|
||||||
|
|
||||||
### [3.4 - License information on Generated Code](#table-of-contents)
|
### [3.4 - License information on Generated Code](#table-of-contents)
|
||||||
|
|
||||||
@@ -346,15 +497,60 @@ The OpenAPI Generator project is intended as a benefit for users of the Open API
|
|||||||
When code is generated from this project, it shall be considered **AS IS** and owned by the user of the software. There are no warranties--expressed or implied--for generated code. You can do what you wish with it, and once generated, the code is your responsibility and subject to the licensing terms that you deem appropriate.
|
When code is generated from this project, it shall be considered **AS IS** and owned by the user of the software. There are no warranties--expressed or implied--for generated code. You can do what you wish with it, and once generated, the code is your responsibility and subject to the licensing terms that you deem appropriate.
|
||||||
|
|
||||||
## [4 - Companies/Projects using OpenAPI Generator](#table-of-contents)
|
## [4 - Companies/Projects using OpenAPI Generator](#table-of-contents)
|
||||||
Here are some companies/projects using OpenAPI Generator in production. To add your company/project to the list, please visit [README.md](README.md) and click on the icon to edit the page.
|
Here are some companies/projects (alphabetical order) using OpenAPI Generator in production. To add your company/project to the list, please visit [README.md](README.md) and click on the icon to edit the page.
|
||||||
|
|
||||||
|
- [Adaptant Solutions AG](https://www.adaptant.io/)
|
||||||
|
- [Angular.Schule](https://angular.schule/)
|
||||||
|
- [ASKUL](https://www.askul.co.jp)
|
||||||
|
- [b<>com](https://b-com.com/en)
|
||||||
|
- [BIMData.io](https://bimdata.io)
|
||||||
|
- [Bithost GmbH](https://www.bithost.ch)
|
||||||
|
- [Boxever](https://www.boxever.com/)
|
||||||
|
- [codecentric AG](https://www.codecentric.de/)
|
||||||
|
- [Cupix](https://www.cupix.com/)
|
||||||
|
- [FormAPI](https://formapi.io/)
|
||||||
|
- [GenFlow](https://github.com/RepreZen/GenFlow)
|
||||||
|
- [GMO Pepabo](https://pepabo.com/en/)
|
||||||
|
- [JustStar](https://www.juststarinfo.com)
|
||||||
|
- [Klarna](https://www.klarna.com/)
|
||||||
|
- [Metaswitch](https://www.metaswitch.com/)
|
||||||
|
- [Myworkout](https://myworkout.com)
|
||||||
|
- [Prometheus/Alertmanager](https://github.com/prometheus/alertmanager)
|
||||||
|
- [Raiffeisen Schweiz Genossenschaft](https://www.raiffeisen.ch)
|
||||||
|
- [RepreZen API Studio](https://www.reprezen.com/swagger-openapi-code-generation-api-first-microservices-enterprise-development)
|
||||||
- [REST United](https://restunited.com)
|
- [REST United](https://restunited.com)
|
||||||
|
- [Stingray](http://www.stingray.com)
|
||||||
|
- [Suva](https://www.suva.ch/)
|
||||||
|
- [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)
|
||||||
|
|
||||||
## [5 - Presentations/Videos/Tutorials/Books](#table-of-contents)
|
## [5 - Presentations/Videos/Tutorials/Books](#table-of-contents)
|
||||||
|
|
||||||
- 2018/05/12 - [OpenAPI Generator - community drivenで成長するコードジェネレータ](https://ackintosh.github.io/blog/2018/05/12/openapi-generator/) by [中野暁人](https://github.com/ackintosh)
|
- 2018/05/12 - [OpenAPI Generator - community drivenで成長するコードジェネレータ](https://ackintosh.github.io/blog/2018/05/12/openapi-generator/) by [中野暁人](https://github.com/ackintosh)
|
||||||
- 2018/05/15 - [Starting a new open-source project](http://jmini.github.io/blog/2018/2018-05-15_new-open-source-project.html) by [Jeremie Bresson](https://github.com/jmini)
|
- 2018/05/15 - [Starting a new open-source project](http://jmini.github.io/blog/2018/2018-05-15_new-open-source-project.html) by [Jeremie Bresson](https://github.com/jmini)
|
||||||
- 2018/05/15 - [REST API仕様からAPIクライアントやスタブサーバを自動生成する「OpenAPI Generator」オープンソースで公開。Swagger Codegenからのフォーク](https://www.publickey1.jp/blog/18/rest_apiapiopenapi_generatorswagger_generator.html) by [Publickey](https://www.publickey1.jp)
|
- 2018/05/15 - [REST API仕様からAPIクライアントやスタブサーバを自動生成する「OpenAPI Generator」オープンソースで公開。Swagger Codegenからのフォーク](https://www.publickey1.jp/blog/18/rest_apiapiopenapi_generatorswagger_generator.html) by [Publickey](https://www.publickey1.jp)
|
||||||
|
- 2018/06/08 - [Swagger Codegen is now OpenAPI Generator](https://angular.schule/blog/2018-06-swagger-codegen-is-now-openapi-generator) by [JohannesHoppe](https://github.com/JohannesHoppe)
|
||||||
|
- 2018/06/21 - [Connect your JHipster apps to the world of APIs with OpenAPI and gRPC](https://fr.slideshare.net/chbornet/jhipster-conf-2018-connect-your-jhipster-apps-to-the-world-of-apis-with-openapi-and-grpc) by [Christophe Bornet](https://github.com/cbornet) at [JHipster Conf 2018](https://jhipster-conf.github.io/)
|
||||||
|
- 2018/06/27 - [Lessons Learned from Leading an Open-Source Project Supporting 30+ Programming Languages](https://speakerdeck.com/wing328/lessons-learned-from-leading-an-open-source-project-supporting-30-plus-programming-languages) - [William Cheng](https://github.com/wing328) at [LinuxCon + ContainerCon + CloudOpen China 2018](http://bit.ly/2waDKKX)
|
||||||
|
- 2018/07/19 - [OpenAPI Generator Contribution Quickstart - RingCentral Go SDK](https://medium.com/ringcentral-developers/openapi-generator-for-go-contribution-quickstart-8cc72bf37b53) by [John Wang](https://github.com/grokify)
|
||||||
|
- 2018/08/22 - [OpenAPI Generatorのプロジェクト構成などのメモ](https://yinm.info/20180822/) by [Yusuke Iinuma](https://github.com/yinm)
|
||||||
|
- 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)
|
## [6 - About Us](#table-of-contents)
|
||||||
|
|
||||||
@@ -363,14 +559,14 @@ Here are some companies/projects using OpenAPI Generator in production. To add y
|
|||||||
OpenAPI Generator core team members are contributors who have been making significant contributions (review issues, fix bugs, make enhancements, etc) to the project on a regular basis.
|
OpenAPI Generator core team members are contributors who have been making significant contributions (review issues, fix bugs, make enhancements, etc) to the project on a regular basis.
|
||||||
|
|
||||||
#### Core Team Members
|
#### Core Team Members
|
||||||
* [@wing328](https://github.com/wing328) (2015/07)
|
* [@wing328](https://github.com/wing328) (2015/07) [:heart:](https://www.patreon.com/wing328)
|
||||||
* [@jimschubert](https://github.com/jimschubert) (2016/05)
|
* [@jimschubert](https://github.com/jimschubert) (2016/05) [:heart:](https://www.patreon.com/jimschubert)
|
||||||
* [@cbornet](https://github.com/cbornet) (2016/05)
|
* [@cbornet](https://github.com/cbornet) (2016/05)
|
||||||
* [@jaz-ah](https://github.com/jaz-ah) (2016/05)
|
* [@ackintosh](https://github.com/ackintosh) (2018/02) [:heart:](https://www.patreon.com/ackintosh/overview)
|
||||||
* [@ackintosh](https://github.com/ackintosh) (2018/02)
|
|
||||||
* [@JFCote](https://github.com/JFCote) (2018/03)
|
|
||||||
* [@jmini](https://github.com/jmini) (2018/04)
|
* [@jmini](https://github.com/jmini) (2018/04)
|
||||||
|
|
||||||
|
:heart: = Link to support the contributor directly
|
||||||
|
|
||||||
#### Template Creator
|
#### Template Creator
|
||||||
Here is a list of template creators:
|
Here is a list of template creators:
|
||||||
* API Clients:
|
* API Clients:
|
||||||
@@ -378,19 +574,23 @@ Here is a list of template creators:
|
|||||||
* Akka-Scala: @cchafer
|
* Akka-Scala: @cchafer
|
||||||
* Apex: @asnelling
|
* Apex: @asnelling
|
||||||
* Bash: @bkryza
|
* Bash: @bkryza
|
||||||
|
* C: @PowerOfCreation @zhemant [:heart:](https://www.patreon.com/zhemant)
|
||||||
* C++ REST: @Danielku15
|
* C++ REST: @Danielku15
|
||||||
* C# (.NET 2.0): @who
|
* C# (.NET 2.0): @who
|
||||||
* C# (.NET Standard 1.3 ): @Gronsak
|
* C# (.NET Standard 1.3 ): @Gronsak
|
||||||
* C# (.NET 4.5 refactored): @jimschubert
|
* C# (.NET 4.5 refactored): @jimschubert [:heart:](https://www.patreon.com/jimschubert)
|
||||||
* Clojure: @xhh
|
* Clojure: @xhh
|
||||||
* Dart: @yissachar
|
* Dart: @yissachar
|
||||||
* Dart (refactored in 2.4.0): @joernahrens
|
* Dart (refactor): @joernahrens
|
||||||
|
* Dart 2: @swipesight
|
||||||
|
* Dart (Jaguar): @jaumard
|
||||||
* Elixir: @niku
|
* Elixir: @niku
|
||||||
* Elm: @trenneman
|
* Elm: @eriktim
|
||||||
* Eiffel: @jvelilla
|
* Eiffel: @jvelilla
|
||||||
* Erlang: @tsloughter
|
* Erlang: @tsloughter
|
||||||
|
* Erlang (PropEr): @jfacorro @robertoaloi
|
||||||
* Groovy: @victorgit
|
* Groovy: @victorgit
|
||||||
* Go: @wing328
|
* Go: @wing328 [:heart:](https://www.patreon.com/wing328)
|
||||||
* Go (rewritten in 2.3.0): @antihax
|
* Go (rewritten in 2.3.0): @antihax
|
||||||
* Haskell (http-client): @jonschoning
|
* Haskell (http-client): @jonschoning
|
||||||
* Java (Feign): @davidkiss
|
* Java (Feign): @davidkiss
|
||||||
@@ -399,16 +599,18 @@ Here is a list of template creators:
|
|||||||
* Java (Jersey2): @xhh
|
* Java (Jersey2): @xhh
|
||||||
* Java (okhttp-gson): @xhh
|
* Java (okhttp-gson): @xhh
|
||||||
* Java (RestTemplate): @nbruno
|
* Java (RestTemplate): @nbruno
|
||||||
|
* Java (Spring 5 WebClient): @daonomic
|
||||||
* Java (RESTEasy): @gayathrigs
|
* Java (RESTEasy): @gayathrigs
|
||||||
* Java (Vertx): @lopesmcc
|
* Java (Vertx): @lopesmcc
|
||||||
* Java (Google APIs Client Library): @charlescapps
|
* Java (Google APIs Client Library): @charlescapps
|
||||||
* Java (Rest-assured): @viclovsky
|
* Java (Rest-assured): @viclovsky
|
||||||
* Javascript/NodeJS: @jfiala
|
* Javascript/NodeJS: @jfiala
|
||||||
* Javascript (Closure-annotated Angular) @achew22
|
* Javascript (Closure-annotated Angular) @achew22
|
||||||
|
* Javascript (Flow types) @jaypea
|
||||||
* JMeter: @davidkiss
|
* JMeter: @davidkiss
|
||||||
* Kotlin: @jimschubert
|
* Kotlin: @jimschubert [:heart:](https://www.patreon.com/jimschubert)
|
||||||
* Lua: @daurnimator
|
* Lua: @daurnimator
|
||||||
* Perl: @wing328
|
* Perl: @wing328 [:heart:](https://www.patreon.com/wing328)
|
||||||
* PHP (Guzzle): @baartosz
|
* PHP (Guzzle): @baartosz
|
||||||
* PowerShell: @beatcracker
|
* PowerShell: @beatcracker
|
||||||
* R: @ramnov
|
* R: @ramnov
|
||||||
@@ -418,19 +620,26 @@ Here is a list of template creators:
|
|||||||
* Swift: @tkqubo
|
* Swift: @tkqubo
|
||||||
* Swift 3: @hexelon
|
* Swift 3: @hexelon
|
||||||
* Swift 4: @ehyche
|
* Swift 4: @ehyche
|
||||||
* TypeScript (Node): @mhardorf
|
* TypeScript (Angular1): @mhardorf
|
||||||
* TypeScript (Angular1): @mhardorf
|
|
||||||
* TypeScript (Fetch): @leonyu
|
|
||||||
* TypeScript (Angular2): @roni-frantchi
|
* TypeScript (Angular2): @roni-frantchi
|
||||||
|
* TypeScript (Angular6): @akehir
|
||||||
|
* TypeScript (Angular7): @topce
|
||||||
|
* TypeScript (Axios): @nicokoenig
|
||||||
|
* TypeScript (Fetch): @leonyu
|
||||||
* TypeScript (jQuery): @bherila
|
* TypeScript (jQuery): @bherila
|
||||||
|
* TypeScript (Node): @mhardorf
|
||||||
|
* TypeScript (Rxjs): @denyo
|
||||||
* Server Stubs
|
* Server Stubs
|
||||||
* Ada: @stcarrez
|
* Ada: @stcarrez
|
||||||
* C# ASP.NET5: @jimschubert
|
* C# ASP.NET5: @jimschubert [:heart:](https://www.patreon.com/jimschubert)
|
||||||
* C# NancyFX: @mstefaniuk
|
* C# NancyFX: @mstefaniuk
|
||||||
|
* C++ (Qt5 QHttpEngine): @etherealjoy
|
||||||
* C++ Pistache: @sebymiano
|
* C++ Pistache: @sebymiano
|
||||||
* C++ Restbed: @stkrwork
|
* C++ Restbed: @stkrwork
|
||||||
* Erlang Server: @galaxie
|
* Erlang Server: @galaxie
|
||||||
* Go Server: @guohuang
|
* Go Server: @guohuang
|
||||||
|
* Go (Gin) Server: @kemokemo
|
||||||
|
* GraphQL Express Server: @renepardon
|
||||||
* Haskell Servant: @algas
|
* Haskell Servant: @algas
|
||||||
* Java MSF4J: @sanjeewa-malalgoda
|
* Java MSF4J: @sanjeewa-malalgoda
|
||||||
* Java Spring Boot: @diyfr
|
* Java Spring Boot: @diyfr
|
||||||
@@ -441,20 +650,28 @@ Here is a list of template creators:
|
|||||||
* JAX-RS CXF: @hiveship
|
* JAX-RS CXF: @hiveship
|
||||||
* JAX-RS CXF (CDI): @nickcmaynard
|
* JAX-RS CXF (CDI): @nickcmaynard
|
||||||
* JAX-RS RestEasy (JBoss EAP): @jfiala
|
* JAX-RS RestEasy (JBoss EAP): @jfiala
|
||||||
* Kotlin: @jimschubert
|
* Kotlin: @jimschubert [:heart:](https://www.patreon.com/jimschubert)
|
||||||
|
* Kotlin (Spring Boot): @dr4ke616
|
||||||
|
* PHP Laravel: @renepardon
|
||||||
* PHP Lumen: @abcsun
|
* PHP Lumen: @abcsun
|
||||||
* PHP Slim: @jfastnacht
|
* PHP Slim: @jfastnacht
|
||||||
* PHP Symfony: @ksm2
|
* PHP Symfony: @ksm2
|
||||||
* PHP Zend Expressive (with Path Handler): @Articus
|
* PHP Zend Expressive (with Path Handler): @Articus
|
||||||
|
* Python AIOHTTP: @Jyhess
|
||||||
* Ruby on Rails 5: @zlx
|
* Ruby on Rails 5: @zlx
|
||||||
* Rust (rust-server): @metaswitch
|
* Rust (rust-server): @metaswitch
|
||||||
* Scala Finch: @jimschubert
|
* Scala Finch: @jimschubert [:heart:](https://www.patreon.com/jimschubert)
|
||||||
* Scala Lagom: @gmkumar2005
|
* Scala Lagom: @gmkumar2005
|
||||||
* Documentation
|
* Documentation
|
||||||
* HTML Doc 2: @jhitchcock
|
* HTML Doc 2: @jhitchcock
|
||||||
* Confluence Wiki: @jhitchcock
|
* Confluence Wiki: @jhitchcock
|
||||||
* Configuration
|
* Configuration
|
||||||
* Apache2: @stkrwork
|
* Apache2: @stkrwork
|
||||||
|
* Schema
|
||||||
|
* GraphQL: @wing328 [:heart:](https://www.patreon.com/wing328)
|
||||||
|
* MySQL: @ybelenko
|
||||||
|
|
||||||
|
:heart: = Link to support the contributor directly
|
||||||
|
|
||||||
#### How to join the core team
|
#### How to join the core team
|
||||||
|
|
||||||
@@ -485,38 +702,43 @@ If you want to join the committee, please kindly apply by sending an email to te
|
|||||||
|
|
||||||
#### Members of Technical Committee
|
#### Members of Technical Committee
|
||||||
|
|
||||||
| Languages | Member (join date) |
|
| Languages | Member (join date) |
|
||||||
|:-------------|:-------------|
|
|:-------------|:-------------|
|
||||||
| ActionScript | |
|
| ActionScript | |
|
||||||
| Ada | @stcarrez (2018/02) @micheleISEP (2018/02) |
|
| Ada | @stcarrez (2018/02) @micheleISEP (2018/02) |
|
||||||
| Android | @jaz-ah (2017/09) |
|
| Android | @jaz-ah (2017/09) |
|
||||||
| Apex | |
|
| Apex | |
|
||||||
| Bash | @frol (2017/07) @bkryza (2017/08) @kenjones-cisco (2017/09) |
|
| Bash | @frol (2017/07) @bkryza (2017/08) @kenjones-cisco (2017/09) |
|
||||||
| C++ | @ravinikam (2017/07) @stkrwork (2017/07) @fvarose (2017/11) @etherealjoy (2018/02) @martindelille (2018/03) |
|
| C | @zhemant (2018/11) |
|
||||||
| C# | @mandrean (2017/08) @jimschubert (2017/09) |
|
| C++ | @ravinikam (2017/07) @stkrwork (2017/07) @fvarose (2017/11) @etherealjoy (2018/02) @martindelille (2018/03) |
|
||||||
|
| C# | @mandrean (2017/08), @jimschubert (2017/09) [:heart:](https://www.patreon.com/jimschubert) |
|
||||||
| Clojure | |
|
| Clojure | |
|
||||||
| Dart | @ircecho (2017/07) |
|
| Dart | @ircecho (2017/07) @swipesight (2018/09) @jaumard (2018/09) |
|
||||||
| Eiffel | @jvelilla (2017/09) |
|
| Eiffel | @jvelilla (2017/09) |
|
||||||
| Elixir | |
|
| Elixir | @mrmstn (2018/12) |
|
||||||
| Elm | |
|
| Elm | @eriktim (2018/09) |
|
||||||
| Erlang | @tsloughter (2017/11) |
|
| Erlang | @tsloughter (2017/11) @jfacorro (2018/10) @robertoaloi (2018/10) |
|
||||||
|
| Go | @antihax (2017/11) @bvwells (2017/12) @grokify (2018/07) @kemokemo (2018/09 |
|
||||||
|
| GraphQL | @renepardon (2018/12) |
|
||||||
| Groovy | |
|
| Groovy | |
|
||||||
| Go | @antihax (2017/11) @bvwells (2017/12) |
|
| Haskell | |
|
||||||
| Haskell | |
|
| Java | @bbdouglas (2017/07) @sreeshas (2017/08) @jfiala (2017/08) @lukoyanov (2017/09) @cbornet (2017/09) @jeff9finger (2018/01) |
|
||||||
| Java | @bbdouglas (2017/07) @JFCote (2017/08) @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) |
|
||||||
| Kotlin | @jimschubert (2017/09) |
|
| Lua | @daurnimator (2017/08) |
|
||||||
| Lua | @daurnimator (2017/08) |
|
|
||||||
| NodeJS/Javascript | @CodeNinjai (2017/07) @frol (2017/07) @cliffano (2017/07) |
|
| NodeJS/Javascript | @CodeNinjai (2017/07) @frol (2017/07) @cliffano (2017/07) |
|
||||||
| ObjC | |
|
| ObjC | |
|
||||||
| Perl | @wing328 (2017/07) |
|
| Perl | @wing328 (2017/07) [:heart:](https://www.patreon.com/wing328) |
|
||||||
| PHP | @jebentier (2017/07) @dkarlovi (2017/07) @mandrean (2017/08) @jfastnacht (2017/09) @ackintosh (2017/09) |
|
| PHP | @jebentier (2017/07), @dkarlovi (2017/07), @mandrean (2017/08), @jfastnacht (2017/09), @ackintosh (2017/09) [:heart:](https://www.patreon.com/ackintosh/overview), @ybelenko (2018/07), @renepardon (2018/12) |
|
||||||
| Python | @taxpon (2017/07) @frol (2017/07) @mbohlool (2017/07) @cbornet (2017/09) @kenjones-cisco (2017/11)|
|
| PowerShell | |
|
||||||
| R | |
|
| Python | @taxpon (2017/07) @frol (2017/07) @mbohlool (2017/07) @cbornet (2017/09) @kenjones-cisco (2017/11) @tomplus (2018/10) @Jyhess (2019/01) |
|
||||||
| Ruby | @cliffano (2017/07) @zlx (2017/09) |
|
| R | |
|
||||||
|
| Ruby | @cliffano (2017/07) @zlx (2017/09) @autopp (2019/02) |
|
||||||
| Rust | @frol (2017/07) @farcaller (2017/08) @bjgill (2017/12) |
|
| Rust | @frol (2017/07) @farcaller (2017/08) @bjgill (2017/12) |
|
||||||
| Scala | @clasnake (2017/07) @jimschubert (2017/09) @shijinkui (2018/01) @ramzimaalej (2018/03) |
|
| 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) |
|
| Swift | @jgavris (2017/07) @ehyche (2017/08) @Edubits (2017/09) @jaz-ah (2017/09) @d-date (2018/03) |
|
||||||
| TypeScript | @TiFu (2017/07) @taxpon (2017/07) @sebastianhaas (2017/07) @kenisteward (2017/07) @Vrolijkx (2017/09) @macjohnny (2018/01) |
|
| TypeScript | @TiFu (2017/07) @taxpon (2017/07) @sebastianhaas (2017/07) @kenisteward (2017/07) @Vrolijkx (2017/09) @macjohnny (2018/01) @nicokoenig (2018/09) @topce (2018/10) |
|
||||||
|
|
||||||
|
:heart: = Link to support the contributor directly
|
||||||
|
|
||||||
### [6.3 - History of OpenAPI Generator](#table-of-contents)
|
### [6.3 - History of OpenAPI Generator](#table-of-contents)
|
||||||
|
|
||||||
@@ -535,7 +757,7 @@ OpenAPI Generator is a fork of [Swagger Codegen](https://github.com/swagger-api/
|
|||||||
- [Daiki Matsudate](https://github.com/d-date)
|
- [Daiki Matsudate](https://github.com/d-date)
|
||||||
- [Daniel](https://github.com/Danielku15)
|
- [Daniel](https://github.com/Danielku15)
|
||||||
- [Emiliano Bonassi](https://github.com/emilianobonassi)
|
- [Emiliano Bonassi](https://github.com/emilianobonassi)
|
||||||
- [Erik Timmers](https://github.com/trenneman)
|
- [Erik Timmers](https://github.com/eriktim)
|
||||||
- [Esteban Marin](https://github.com/macjohnny)
|
- [Esteban Marin](https://github.com/macjohnny)
|
||||||
- [Gustavo Paz](https://github.com/gustavoapaz)
|
- [Gustavo Paz](https://github.com/gustavoapaz)
|
||||||
- [Javier Velilla](https://github.com/jvelilla)
|
- [Javier Velilla](https://github.com/jvelilla)
|
||||||
@@ -565,7 +787,7 @@ OpenAPI Generator is a fork of [Swagger Codegen](https://github.com/swagger-api/
|
|||||||
- [Vlad Frolov](https://github.com/frol)
|
- [Vlad Frolov](https://github.com/frol)
|
||||||
- [Vladimir Pouzanov](https://github.com/farcaller)
|
- [Vladimir Pouzanov](https://github.com/farcaller)
|
||||||
- [William Cheng](https://github.com/wing328)
|
- [William Cheng](https://github.com/wing328)
|
||||||
- [Xin Meng](https://github.com/xmeng1)
|
- [Xin Meng](https://github.com/xmeng1) [:heart:](https://www.patreon.com/user/overview?u=16435385)
|
||||||
- [Xu Hui Hui](https://github.com/xhh)
|
- [Xu Hui Hui](https://github.com/xhh)
|
||||||
- [antihax](https://github.com/antihax)
|
- [antihax](https://github.com/antihax)
|
||||||
- [beatcracker](https://github.com/beatcracker)
|
- [beatcracker](https://github.com/beatcracker)
|
||||||
@@ -574,6 +796,7 @@ OpenAPI Generator is a fork of [Swagger Codegen](https://github.com/swagger-api/
|
|||||||
- [jfiala](https://github.com/jfiala)
|
- [jfiala](https://github.com/jfiala)
|
||||||
- [lukoyanov](https://github.com/lukoyanov)
|
- [lukoyanov](https://github.com/lukoyanov)
|
||||||
|
|
||||||
|
:heart: = Link to support the contributor directly
|
||||||
|
|
||||||
## [7 - License](#table-of-contents)
|
## [7 - License](#table-of-contents)
|
||||||
-------
|
-------
|
||||||
@@ -592,6 +815,3 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
14
Vagrantfile
vendored
14
Vagrantfile
vendored
@@ -6,7 +6,7 @@ VAGRANTFILE_API_VERSION = "2"
|
|||||||
|
|
||||||
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||||
|
|
||||||
config.vm.box = "ubuntu/trusty64"
|
config.vm.box = "ubuntu/bionic64"
|
||||||
|
|
||||||
config.vm.provider "virtualbox" do |v|
|
config.vm.provider "virtualbox" do |v|
|
||||||
v.name = "openapi-generator"
|
v.name = "openapi-generator"
|
||||||
@@ -23,13 +23,15 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|||||||
|
|
||||||
#Provision
|
#Provision
|
||||||
config.vm.provision "shell", inline: <<-SHELL
|
config.vm.provision "shell", inline: <<-SHELL
|
||||||
sudo touch /var/lib/cloud/instance/locale-check.skip
|
sudo apt-get update
|
||||||
sudo apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
|
sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common
|
||||||
sudo sh -c 'echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" > /etc/apt/sources.list.d/docker.list'
|
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
|
||||||
sudo apt-cache policy docker-engine
|
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
|
||||||
|
$(lsb_release -cs) stable"
|
||||||
|
sudo sh -c 'echo "deb https://apt.dockerproject.org/repo ubuntu-cosmic main" > /etc/apt/sources.list.d/docker.list'
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get upgrade -y
|
sudo apt-get upgrade -y
|
||||||
sudo apt-get install -y docker-engine
|
sudo apt-get install -y docker-ce
|
||||||
sudo usermod -aG docker vagrant
|
sudo usermod -aG docker vagrant
|
||||||
SHELL
|
SHELL
|
||||||
|
|
||||||
|
|||||||
16
appveyor.yml
16
appveyor.yml
@@ -1,7 +1,7 @@
|
|||||||
# for CI with appveyor.yml
|
# for CI with appveyor.yml
|
||||||
# Ref: http://www.yegor256.com/2015/01/10/windows-appveyor-maven.html
|
# Ref: http://www.yegor256.com/2015/01/10/windows-appveyor-maven.html
|
||||||
version: '{branch}-{build}'
|
version: '{branch}-{build}'
|
||||||
os: Windows Server 2012
|
image: Visual Studio 2017
|
||||||
hosts:
|
hosts:
|
||||||
petstore.swagger.io: 127.0.0.1
|
petstore.swagger.io: 127.0.0.1
|
||||||
install:
|
install:
|
||||||
@@ -18,10 +18,15 @@ install:
|
|||||||
- cmd: SET MAVEN_OPTS=-XX:MaxPermSize=2g -Xmx4g
|
- cmd: SET MAVEN_OPTS=-XX:MaxPermSize=2g -Xmx4g
|
||||||
- cmd: SET JAVA_OPTS=-XX:MaxPermSize=2g -Xmx4g
|
- cmd: SET JAVA_OPTS=-XX:MaxPermSize=2g -Xmx4g
|
||||||
- cmd: SET M2_HOME=C:\maven\apache-maven-3.2.5
|
- cmd: SET M2_HOME=C:\maven\apache-maven-3.2.5
|
||||||
|
- cmd: java -version
|
||||||
- cmd: dir/w
|
- cmd: dir/w
|
||||||
- git clone https://github.com/wing328/swagger-samples
|
- 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"
|
- 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_script:
|
||||||
|
- 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
|
# build C# API client
|
||||||
- nuget restore samples\client\petstore\csharp\OpenAPIClient\Org.OpenAPITools.sln
|
- 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"
|
- msbuild samples\client\petstore\csharp\OpenAPIClient\Org.OpenAPITools.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
|
||||||
@@ -34,6 +39,11 @@ build_script:
|
|||||||
# install openapi-generator locally
|
# install openapi-generator locally
|
||||||
- mvn clean install --quiet
|
- mvn clean install --quiet
|
||||||
test_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 (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
|
# 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
|
- 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)
|
# test c# API client (with PropertyChanged)
|
||||||
@@ -41,6 +51,10 @@ test_script:
|
|||||||
|
|
||||||
# generate all petstore clients
|
# generate all petstore clients
|
||||||
- .\bin\windows\run-all-petstore.cmd
|
- .\bin\windows\run-all-petstore.cmd
|
||||||
|
|
||||||
|
# generate all petstore clients (openapi3)
|
||||||
|
- .\bin\openapi3\windows\run-all-petstore.cmd
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
- C:\maven\
|
- C:\maven\
|
||||||
- C:\Users\appveyor\.m2
|
- C:\Users\appveyor\.m2
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
#!/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 "scala-akka-petstore-client" -t modules/openapi-generator/src/main/resources/akka-scala -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g scala-akka -o samples/client/petstore/akka-scala $@"
|
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
|
||||||
32
bin/c-petstore.sh
Executable file
32
bin/c-petstore.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} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
|
ags="generate -t modules/openapi-generator/src/main/resources/C-libcurl -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g c -o samples/client/petstore/c $@"
|
||||||
|
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
32
bin/cpp-pistache-server-petstore.sh
Executable file
32
bin/cpp-pistache-server-petstore.sh
Executable file
@@ -0,0 +1,32 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
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 -g cpp-pistache-server -t modules/openapi-generator/src/main/resources/cpp-pistache-server -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml --additional-properties addExternalLibs=true -o samples/server/petstore/cpp-pistache $@"
|
||||||
|
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
32
bin/cpp-qt5-petstore.sh
Executable file
32
bin/cpp-qt5-petstore.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 -t modules/openapi-generator/src/main/resources/cpp-qt5-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g cpp-qt5-client -o samples/client/petstore/cpp-qt5 $@"
|
||||||
|
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
32
bin/cpp-qt5-qhttpengine-server-petstore.sh
Executable file
32
bin/cpp-qt5-qhttpengine-server-petstore.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 -t modules/openapi-generator/src/main/resources/cpp-qt5-qhttpengine-server -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g cpp-qt5-qhttpengine-server -o samples/server/petstore/cpp-qt5-qhttpengine-server $@"
|
||||||
|
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
32
bin/cpp-restbed-petstore-server.sh
Executable file
32
bin/cpp-restbed-petstore-server.sh
Executable file
@@ -0,0 +1,32 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
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 -g cpp-restbed-server -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -o samples/server/petstore/cpp-restbed $@"
|
||||||
|
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
32
bin/cpp-restsdk-petstore.sh
Executable file
32
bin/cpp-restsdk-petstore.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 -t modules/openapi-generator/src/main/resources/cpp-rest-sdk-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g cpp-restsdk -o samples/client/petstore/cpp-restsdk $@"
|
||||||
|
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
32
bin/cpp-tizen-petstore.sh
Executable file
32
bin/cpp-tizen-petstore.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 -t modules/openapi-generator/src/main/resources/cpp-tizen-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g cpp-tizen -o samples/client/petstore/cpp-tizen $@"
|
||||||
|
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
#!/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 -t modules/openapi-generator/src/main/resources/cpprest -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g cpp-restsdk -o samples/client/petstore/cpprest $@"
|
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
|
||||||
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/
|
||||||
|
|
||||||
37
bin/csharp-netcore-petstore.sh
Executable file
37
bin/csharp-netcore-petstore.sh
Executable file
@@ -0,0 +1,37 @@
|
|||||||
|
#!/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 -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-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/
|
||||||
|
|
||||||
@@ -29,8 +29,9 @@ fi
|
|||||||
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
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-with-fake-endpoints-models-for-testing.yaml -g csharp -o samples/client/petstore/csharp/OpenAPIClient --additional-properties packageGuid={321C8C3F-0156-40C1-AE42-D59761FB9B6C} $@"
|
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g csharp -o samples/client/petstore/csharp/OpenAPIClient --additional-properties packageGuid={321C8C3F-0156-40C1-AE42-D59761FB9B6C} $@"
|
||||||
|
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|
||||||
# restore csproj file
|
# restore csproj file
|
||||||
echo "restore csproject file: CI/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj"
|
echo "restore csproject file: CI/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj"
|
||||||
cp ./CI/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj ./samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/
|
cp ./CI/samples.ci/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj ./samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
|
||||||
|
|||||||
@@ -27,6 +27,6 @@ fi
|
|||||||
|
|
||||||
# if you've executed sbt assembly previously it will use that instead.
|
# 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"
|
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 cwiki -o samples/documentation/cwiki $@"
|
ags="generate -t modules/openapi-generator/src/main/resources/confluenceWikiDocs -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g cwiki -o samples/documentation/cwiki $@"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|||||||
42
bin/dart-jaguar-petstore.sh
Executable file
42
bin/dart-jaguar-petstore.sh
Executable file
@@ -0,0 +1,42 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
SCRIPT="$0"
|
||||||
|
|
||||||
|
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 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"
|
||||||
|
|
||||||
|
# Generate client
|
||||||
|
ags="$@ generate -t modules/openapi-generator/src/main/resources/dart-jaguar -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart-jaguar -o samples/client/petstore/dart-jaguar/openapi -DhideGenerationTimestamp=true -DpubName=openapi"
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|
||||||
|
# Generate non-browserClient and put it to the flutter sample app
|
||||||
|
ags="$@ generate -t modules/openapi-generator/src/main/resources/dart-jaguar -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart-jaguar -o samples/client/petstore/dart-jaguar/flutter_petstore/openapi -DhideGenerationTimestamp=true -DpubName=openapi"
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|
||||||
|
# There is a proposal to allow importing different libraries depending on the environment:
|
||||||
|
# https://github.com/munificent/dep-interface-libraries
|
||||||
|
# When this is implemented there will only be one library.
|
||||||
|
|
||||||
|
# The current petstore test will then work for both: the browser library and the vm library.
|
||||||
@@ -29,18 +29,18 @@ fi
|
|||||||
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
|
|
||||||
# Generate non-browserClient
|
# Generate non-browserClient
|
||||||
ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/openapi -DhideGenerationTimestamp=true -DbrowserClient=false $@"
|
ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/openapi -DhideGenerationTimestamp=true -DbrowserClient=false --additional-properties supportDart2=false $@"
|
||||||
|
|
||||||
# then options to generate the library for vm would be:
|
# then options to generate the library for vm would be:
|
||||||
#ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/openapi_vm -DbrowserClient=false -DpubName=openapi_vm $@"
|
#ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/openapi_vm -DbrowserClient=false -DpubName=openapi_vm --additional-properties supportDart2=false $@"
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|
||||||
# Generate browserClient
|
# Generate browserClient
|
||||||
ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/openapi-browser-client -DhideGenerationTimestamp=true -DbrowserClient=true $@"
|
ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/openapi-browser-client -DhideGenerationTimestamp=true -DbrowserClient=true --additional-properties supportDart2=false $@"
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|
||||||
# Generate non-browserClient and put it to the flutter sample app
|
# Generate non-browserClient and put it to the flutter sample app
|
||||||
ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/flutter_petstore/openapi -DhideGenerationTimestamp=true -DbrowserClient=false $@"
|
ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/flutter_petstore/openapi -DhideGenerationTimestamp=true -DbrowserClient=false --additional-properties supportDart2=false $@"
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|
||||||
# There is a proposal to allow importing different libraries depending on the environment:
|
# There is a proposal to allow importing different libraries depending on the environment:
|
||||||
|
|||||||
50
bin/dart2-petstore.sh
Executable file
50
bin/dart2-petstore.sh
Executable file
@@ -0,0 +1,50 @@
|
|||||||
|
#!/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"
|
||||||
|
|
||||||
|
# Generate non-browserClient
|
||||||
|
ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart2/openapi -DhideGenerationTimestamp=true -DbrowserClient=false $@"
|
||||||
|
|
||||||
|
# then options to generate the library for vm would be:
|
||||||
|
#ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart2/openapi_vm -DbrowserClient=false -DpubName=openapi_vm $@"
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|
||||||
|
# Generate browserClient
|
||||||
|
ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart2/openapi-browser-client -DhideGenerationTimestamp=true -DbrowserClient=true $@"
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|
||||||
|
# Generate non-browserClient and put it to the flutter sample app
|
||||||
|
ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart2/flutter_petstore/openapi -DhideGenerationTimestamp=true -DbrowserClient=false $@"
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|
||||||
|
# There is a proposal to allow importing different libraries depending on the environment:
|
||||||
|
# https://github.com/munificent/dep-interface-libraries
|
||||||
|
# When this is implemented there will only be one library.
|
||||||
|
|
||||||
|
# The current petstore test will then work for both: the browser library and the vm library.
|
||||||
@@ -27,6 +27,6 @@ fi
|
|||||||
|
|
||||||
# if you've executed sbt assembly previously it will use that instead.
|
# 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"
|
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 dynamic-html -o samples/dynamic-html $@"
|
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dynamic-html -o samples/documentation/dynamic-html $@"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|||||||
32
bin/elm-0.18-petstore.sh
Executable file
32
bin/elm-0.18-petstore.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 -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g elm -t modules/openapi-generator/src/main/resources/elm -o samples/client/petstore/elm-0.18 --additional-properties elmVersion=0.18 $@"
|
||||||
|
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
5
bin/elm-petstore-all.sh
Executable file
5
bin/elm-petstore-all.sh
Executable file
@@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
./bin/elm-0.18-petstore.sh
|
||||||
|
./bin/elm-petstore.sh
|
||||||
|
|
||||||
@@ -27,6 +27,6 @@ fi
|
|||||||
|
|
||||||
# if you've executed sbt assembly previously it will use that instead.
|
# 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"
|
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 elm -o samples/client/petstore/elm $@"
|
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g elm -t modules/openapi-generator/src/main/resources/elm -o samples/client/petstore/elm $@"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|||||||
@@ -1,37 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# this bash script run the scripts for the 'mature' generators
|
|
||||||
# it ensures that all changes are commited into the 'samples/' folder
|
|
||||||
|
|
||||||
echo "# START SCRIPT: $0"
|
|
||||||
|
|
||||||
echo "IMPORTANT: this script should be run by the CI (e.g. Shippable) to ensure that the 'samples/' folder is up to date."
|
|
||||||
echo "Please press CTRL+C to stop or the script will continue in 5 seconds."
|
|
||||||
|
|
||||||
sleep 5
|
|
||||||
|
|
||||||
# LIST OF SCRIPTS:
|
|
||||||
./bin/ruby-petstore.sh
|
|
||||||
./bin/java-petstore-all.sh
|
|
||||||
./bin/spring-all-pestore.sh
|
|
||||||
./bin/kotlin-client-petstore.sh
|
|
||||||
./bin/kotlin-client-string.sh
|
|
||||||
./bin/kotlin-client-threetenbp.sh
|
|
||||||
./bin/kotlin-server-petstore.sh
|
|
||||||
./bin/php-petstore.sh
|
|
||||||
./bin/php-silex-petstore-server.sh
|
|
||||||
./bin/php-symfony-petstore.sh
|
|
||||||
./bin/php-lumen-petstore-server.sh
|
|
||||||
./bin/php-slim-petstore-server.sh
|
|
||||||
./bin/php-ze-ph-petstore-server.sh
|
|
||||||
./bin/openapi3/php-petstore.sh
|
|
||||||
|
|
||||||
# Check:
|
|
||||||
if [ -n "$(git status --porcelain)" ]; then
|
|
||||||
echo "UNCOMMITTED CHANGES ERROR"
|
|
||||||
echo "There are uncommitted changes in working tree after execution of 'bin/ensure-up-to-date'"
|
|
||||||
git status
|
|
||||||
echo "Please run 'bin/ensure-up-to-date' locally and commit changes"
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
echo "Git working tree is clean"
|
|
||||||
fi
|
|
||||||
32
bin/erlang-petstore-proper.sh
Executable file
32
bin/erlang-petstore-proper.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 -t modules/openapi-generator/src/main/resources/erlang-proper -DpackageName=petstore -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g erlang-proper -o samples/client/petstore/erlang-proper $@"
|
||||||
|
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
41
bin/go-gin-petstore-server.sh
Executable file
41
bin/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/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 $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
|
mvn -B clean package
|
||||||
fi
|
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.
|
# 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"
|
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
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|||||||
@@ -25,8 +25,15 @@ then
|
|||||||
mvn -B clean package
|
mvn -B clean package
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
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.
|
# 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"
|
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 $@"
|
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
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|||||||
@@ -25,8 +25,15 @@ then
|
|||||||
mvn -B clean package
|
mvn -B clean package
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
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.
|
# 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"
|
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
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|||||||
32
bin/graphql-nodejs-express-server.sh
Executable file
32
bin/graphql-nodejs-express-server.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} -Xmx1024M -DloggerPath=conf/log4j.properties $@"
|
||||||
|
ags="generate -t modules/openapi-generator/src/main/resources/graphql-nodejs-express-server -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g graphql-nodejs-express-server -o samples/server/petstore/graphql-nodejs-express-server -DpackageName=petstore $@"
|
||||||
|
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
32
bin/graphql-schema-petstore.sh
Executable file
32
bin/graphql-schema-petstore.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} -Xmx1024M -DloggerPath=conf/log4j.properties $@"
|
||||||
|
ags="generate -t modules/openapi-generator/src/main/resources/graphql-schema -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g graphql-schema -o samples/config/petstore/graphql-schema -DpackageName=petstore $@"
|
||||||
|
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
@@ -27,6 +27,6 @@ fi
|
|||||||
|
|
||||||
# if you've executed sbt assembly previously it will use that instead.
|
# 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"
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
ags="generate -i modules/openapi-generator/src/test/resources/2_0/markdown.yaml -g html -o samples/html.md $@"
|
ags="generate -i modules/openapi-generator/src/test/resources/2_0/markdown.yaml -g html -o samples/documentation/html.md $@"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|||||||
@@ -27,6 +27,6 @@ fi
|
|||||||
|
|
||||||
# if you've executed sbt assembly previously it will use that instead.
|
# 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"
|
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 html -o samples/html $@"
|
ags="generate -t modules/openapi-generator/src/main/resources/htmlDocs -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g html -o samples/documentation/html $@"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|||||||
@@ -27,6 +27,6 @@ fi
|
|||||||
|
|
||||||
# if you've executed sbt assembly previously it will use that instead.
|
# 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"
|
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 html2 -o samples/html2 --additional-properties hideGenerationTimestamp=true $@"
|
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g html2 -o samples/documentation/html2 --additional-properties hideGenerationTimestamp=true $@"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|||||||
21
bin/java-jaxrs-petstore-server-all.sh
Executable file
21
bin/java-jaxrs-petstore-server-all.sh
Executable file
@@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# script to run all generators extending AbstractJavaJAXRSServerCodegen
|
||||||
|
|
||||||
|
./bin/jaxrs-petstore-server-datelib-j8.sh
|
||||||
|
./bin/jaxrs-cxf-cdi-petstore-server.sh
|
||||||
|
./bin/jaxrs-cxf-petstore-server-annotated-base-path.sh
|
||||||
|
./bin/jaxrs-cxf-petstore-server-non-spring-application.sh
|
||||||
|
./bin/jaxrs-cxf-petstore-server.sh
|
||||||
|
./bin/jaxrs-jersey1-petstore-server.sh
|
||||||
|
./bin/jaxrs-jersey1-usetags-petstore-server.sh
|
||||||
|
./bin/jaxrs-petstore-server.sh
|
||||||
|
./bin/jaxrs-resteasy-eap-java8-petstore-server.sh
|
||||||
|
./bin/jaxrs-resteasy-eap-joda-petstore-server.sh
|
||||||
|
./bin/jaxrs-resteasy-eap-petstore-server.sh
|
||||||
|
./bin/jaxrs-resteasy-joda-petstore-server.sh
|
||||||
|
./bin/jaxrs-resteasy-petstore-server.sh
|
||||||
|
./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.
|
# 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"
|
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"
|
echo "Removing files and folders under samples/server/petstore/java-msf4j/src/main"
|
||||||
rm -rf samples/server/petstore/java-msf4j/src/main
|
rm -rf samples/server/petstore/java-msf4j/src/main
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
./bin/java-petstore-jersey1.sh
|
./bin/java-petstore-jersey1.sh
|
||||||
./bin/java-petstore-jersey2.sh
|
./bin/java-petstore-jersey2.sh
|
||||||
./bin/java-petstore-feign.sh
|
./bin/java-petstore-feign.sh
|
||||||
|
./bin/java-petstore-feign-10x.sh
|
||||||
./bin/java-petstore-okhttp-gson.sh
|
./bin/java-petstore-okhttp-gson.sh
|
||||||
./bin/java-petstore-okhttp-gson-parcelable.sh
|
./bin/java-petstore-okhttp-gson-parcelable.sh
|
||||||
./bin/java-petstore-retrofit.sh
|
./bin/java-petstore-retrofit.sh
|
||||||
@@ -13,9 +14,11 @@
|
|||||||
./bin/java8-petstore-jersey2.sh
|
./bin/java8-petstore-jersey2.sh
|
||||||
./bin/java-petstore-retrofit2-play24.sh
|
./bin/java-petstore-retrofit2-play24.sh
|
||||||
./bin/java-petstore-retrofit2-play25.sh
|
./bin/java-petstore-retrofit2-play25.sh
|
||||||
|
./bin/java-petstore-retrofit2-play26.sh
|
||||||
./bin/java-petstore-jersey2-java6.sh
|
./bin/java-petstore-jersey2-java6.sh
|
||||||
./bin/java-petstore-resttemplate.sh
|
./bin/java-petstore-resttemplate.sh
|
||||||
./bin/java-petstore-resttemplate-withxml.sh
|
./bin/java-petstore-resttemplate-withxml.sh
|
||||||
|
./bin/java-petstore-webclient.sh
|
||||||
./bin/java-petstore-resteasy.sh
|
./bin/java-petstore-resteasy.sh
|
||||||
./bin/java-petstore-google-api-client.sh
|
./bin/java-petstore-google-api-client.sh
|
||||||
./bin/java-petstore-rest-assured.sh
|
./bin/java-petstore-rest-assured.sh
|
||||||
|
|||||||
5
bin/java-petstore-feign-10x.json
Normal file
5
bin/java-petstore-feign-10x.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"library": "feign",
|
||||||
|
"artifactId": "petstore-feign-10x",
|
||||||
|
"feignVersion": "10.x"
|
||||||
|
}
|
||||||
40
bin/java-petstore-feign-10x.sh
Executable file
40
bin/java-petstore-feign-10x.sh
Executable file
@@ -0,0 +1,40 @@
|
|||||||
|
#!/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 -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 $@"
|
||||||
|
|
||||||
|
echo "Removing files and folders under samples/client/petstore/java/feign10x/src/main"
|
||||||
|
rm -rf samples/client/petstore/java/feign10x/src/main
|
||||||
|
find samples/client/petstore/java/feign10x -maxdepth 1 -type f ! -name "README.md" -exec rm {} +
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|
||||||
|
# copy additional manually written unit-tests
|
||||||
|
mkdir samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client
|
||||||
|
|
||||||
|
cp CI/samples.ci/client/petstore/java/test-manual/common/StringUtilTest.java samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/StringUtilTest.java
|
||||||
5
bin/java-petstore-feign-9x.json
Normal file
5
bin/java-petstore-feign-9x.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"library": "feign",
|
||||||
|
"artifactId": "petstore-feign",
|
||||||
|
"feignVersion": "9.x"
|
||||||
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
"library": "feign",
|
"library": "feign",
|
||||||
"artifactId": "petstore-feign"
|
"artifactId": "petstore-feign",
|
||||||
|
"feignVersion": "10.x"
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user