forked from loafle/openapi-generator-original
Compare commits
458 Commits
swagger-co
...
v2.0.13
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5e95362542 | ||
|
|
e92d4e6258 | ||
|
|
641aada8a8 | ||
|
|
c8c59fe93a | ||
|
|
450746f94d | ||
|
|
827f03f272 | ||
|
|
de6f949c64 | ||
|
|
82cdec7197 | ||
|
|
ab7e152877 | ||
|
|
0ec694940e | ||
|
|
5a4af29f0e | ||
|
|
d72578e492 | ||
|
|
405e8b1786 | ||
|
|
8909bd4ba1 | ||
|
|
e9af56eb87 | ||
|
|
ee361e9ae2 | ||
|
|
a580c38fed | ||
|
|
668059a2c4 | ||
|
|
31a53d5842 | ||
|
|
e4e768062a | ||
|
|
3192240dc0 | ||
|
|
2d9a011f82 | ||
|
|
476aed7f5b | ||
|
|
09580c2d87 | ||
|
|
48a07d031e | ||
|
|
7414a9d56a | ||
|
|
91e08b5524 | ||
|
|
8abb6521b4 | ||
|
|
6394e5448c | ||
|
|
2f5651d988 | ||
|
|
a7afbd106f | ||
|
|
d67774d90f | ||
|
|
07f36d3500 | ||
|
|
cc1bcf7989 | ||
|
|
096653daf7 | ||
|
|
773a6b50eb | ||
|
|
bb3bd0d357 | ||
|
|
16eb944d2f | ||
|
|
74df3ab4f7 | ||
|
|
d18e75bbf1 | ||
|
|
b7cffe4121 | ||
|
|
5180b09acb | ||
|
|
6fad954147 | ||
|
|
3b1eac0e50 | ||
|
|
7715dbf0f2 | ||
|
|
bbb682c13d | ||
|
|
42a8514c22 | ||
|
|
ffca1e2969 | ||
|
|
1aa65bc14b | ||
|
|
1f46819b61 | ||
|
|
5892fdb2bb | ||
|
|
32d792de01 | ||
|
|
82646f34ca | ||
|
|
4f25ea7e6b | ||
|
|
146f5c4c2a | ||
|
|
6b9cba1411 | ||
|
|
a413efc3ca | ||
|
|
6c8aed5dcc | ||
|
|
52905fd6de | ||
|
|
f8807c7440 | ||
|
|
755591f9e5 | ||
|
|
896d0d4b54 | ||
|
|
cf95d4e59e | ||
|
|
b503994577 | ||
|
|
569f77b512 | ||
|
|
773fb89acb | ||
|
|
890b1ee3c2 | ||
|
|
bfb5b721c5 | ||
|
|
9b6995f28c | ||
|
|
1b8bb4a0a6 | ||
|
|
7f35b875a4 | ||
|
|
b5d2ed0322 | ||
|
|
a7b78a6210 | ||
|
|
90c14fd116 | ||
|
|
830ad87fcb | ||
|
|
3a8928f869 | ||
|
|
f883c5e77c | ||
|
|
8cc83d180d | ||
|
|
65cc529ec6 | ||
|
|
9686ceed2d | ||
|
|
2c73efa536 | ||
|
|
800312361f | ||
|
|
59897c19a9 | ||
|
|
08a3e9e881 | ||
|
|
1e2f7cb1f8 | ||
|
|
17c38115e6 | ||
|
|
0ee6531fcd | ||
|
|
87c12c155d | ||
|
|
b373e4312e | ||
|
|
0d40a53e06 | ||
|
|
c779905163 | ||
|
|
59da358eb5 | ||
|
|
b815ffa403 | ||
|
|
27a8be2381 | ||
|
|
d5b53a1778 | ||
|
|
01b745c366 | ||
|
|
af96f33e6f | ||
|
|
2dda926cb6 | ||
|
|
8fb6fc847c | ||
|
|
11d1b8fcd4 | ||
|
|
5076d76a74 | ||
|
|
044621b325 | ||
|
|
5a3426dee6 | ||
|
|
b6b28bb1a2 | ||
|
|
189569518d | ||
|
|
731fddbc30 | ||
|
|
c4990b773d | ||
|
|
d56c5e3b44 | ||
|
|
6f1a4a2f82 | ||
|
|
a96d49f045 | ||
|
|
ee19dfadf1 | ||
|
|
2c5524476e | ||
|
|
7bde2ffd6e | ||
|
|
f17654cd96 | ||
|
|
0a47fc23a3 | ||
|
|
13eb435138 | ||
|
|
329f2817c2 | ||
|
|
609cef0b65 | ||
|
|
cfa1f1a3c1 | ||
|
|
e851262875 | ||
|
|
7956ccc979 | ||
|
|
13bc111bd6 | ||
|
|
cc0a30edf8 | ||
|
|
0ffc6cb7a0 | ||
|
|
6a2f53f07d | ||
|
|
930b1ea0ea | ||
|
|
8e8e5308b6 | ||
|
|
8f71d3fc50 | ||
|
|
a123d8f066 | ||
|
|
ea15cad8d5 | ||
|
|
e4a4f25f22 | ||
|
|
93677742d3 | ||
|
|
389765c113 | ||
|
|
5ef5fa7296 | ||
|
|
4e408e6d80 | ||
|
|
a140ea2b9d | ||
|
|
b920881490 | ||
|
|
56d5167a27 | ||
|
|
ddf81948a8 | ||
|
|
6652028d71 | ||
|
|
c9fccc5c75 | ||
|
|
f766937ac7 | ||
|
|
54f0823ec4 | ||
|
|
5f61d20610 | ||
|
|
7ed2df2722 | ||
|
|
a8a2a41315 | ||
|
|
676283875b | ||
|
|
4f95550977 | ||
|
|
7056081605 | ||
|
|
c90083855f | ||
|
|
2f997e6b29 | ||
|
|
8ad07d069c | ||
|
|
51e29cdfaf | ||
|
|
811425a15f | ||
|
|
9ee361df5b | ||
|
|
c1df192f09 | ||
|
|
7d6660d56c | ||
|
|
450b3c7ed5 | ||
|
|
e1e95fc1d2 | ||
|
|
8365270134 | ||
|
|
33163cd253 | ||
|
|
2b04a5a127 | ||
|
|
baa0a45537 | ||
|
|
6747e3eb0b | ||
|
|
bad8d7c4b3 | ||
|
|
2610ac7fc3 | ||
|
|
e2730ae34e | ||
|
|
beeeb133e6 | ||
|
|
01dc29d789 | ||
|
|
21085b472a | ||
|
|
5483ba5ae7 | ||
|
|
4a50bb3183 | ||
|
|
daeb964bfc | ||
|
|
ad4bf57535 | ||
|
|
83ff341e5e | ||
|
|
701d4c15a9 | ||
|
|
01ff7be020 | ||
|
|
a7bf8b6314 | ||
|
|
c386edb2e4 | ||
|
|
9e12191a64 | ||
|
|
feb6c188d3 | ||
|
|
1e245583c9 | ||
|
|
0e03509cbc | ||
|
|
3bf486e49d | ||
|
|
2497e3a8cf | ||
|
|
d798725d9e | ||
|
|
f0517880e7 | ||
|
|
dd68c31fb4 | ||
|
|
f6622fbb59 | ||
|
|
aa1fbb680b | ||
|
|
93067a0ce0 | ||
|
|
5a064d6bad | ||
|
|
feb5a2ff3b | ||
|
|
73a70a65ff | ||
|
|
3b81d81143 | ||
|
|
74543f75f9 | ||
|
|
d9d6cc1e76 | ||
|
|
a3f5c0c688 | ||
|
|
17b63b2be8 | ||
|
|
558a9cbf64 | ||
|
|
021f269d9d | ||
|
|
7f73007ec4 | ||
|
|
1a1bfd2c7c | ||
|
|
90b34333f5 | ||
|
|
fa59f168a7 | ||
|
|
9102a333e3 | ||
|
|
43bc3f5be2 | ||
|
|
fbc09aa77b | ||
|
|
03619b19a1 | ||
|
|
422e79dd01 | ||
|
|
b9a60649a8 | ||
|
|
a06dd72989 | ||
|
|
932dc843f9 | ||
|
|
c45c8d251a | ||
|
|
ea6a9305be | ||
|
|
c82a5c8aaa | ||
|
|
8135cd65dc | ||
|
|
db68a3acbd | ||
|
|
0628c63b15 | ||
|
|
4d05b5d81f | ||
|
|
24af6a00c6 | ||
|
|
fd72c1b9f1 | ||
|
|
885cd36165 | ||
|
|
a31780e08f | ||
|
|
dc3a4b4eb5 | ||
|
|
c1e018947d | ||
|
|
4a3321f253 | ||
|
|
c9614ab795 | ||
|
|
500262bd03 | ||
|
|
4467fe66c6 | ||
|
|
981ce3d990 | ||
|
|
936387d1df | ||
|
|
d14f74b82c | ||
|
|
85b1fb71c2 | ||
|
|
9e8f817a6b | ||
|
|
697f6dc7c7 | ||
|
|
d038ef4799 | ||
|
|
3a2d7adc35 | ||
|
|
0e8274ff3b | ||
|
|
a335fe008d | ||
|
|
251384bb47 | ||
|
|
54ec7f2bb2 | ||
|
|
2199d08e72 | ||
|
|
e9fa4434f2 | ||
|
|
154b2fdeca | ||
|
|
cf05602924 | ||
|
|
9a73eb8994 | ||
|
|
181e7a8b55 | ||
|
|
6635616826 | ||
|
|
71426e58a3 | ||
|
|
00d279ccd5 | ||
|
|
a4cd839c1e | ||
|
|
4354002bce | ||
|
|
106e2b7cb9 | ||
|
|
8443e7a749 | ||
|
|
3f3471997e | ||
|
|
90fbbec405 | ||
|
|
384ac98295 | ||
|
|
53f1394c25 | ||
|
|
5eff3fd976 | ||
|
|
f4c859aede | ||
|
|
65f2ec1f79 | ||
|
|
c3cb548fb3 | ||
|
|
996e605008 | ||
|
|
92ac02e6c6 | ||
|
|
ffc6a2fc9e | ||
|
|
36bf178947 | ||
|
|
a757416a0e | ||
|
|
f167959a38 | ||
|
|
e8e8c18c8f | ||
|
|
e91df944cc | ||
|
|
cc4fecb217 | ||
|
|
2443d3d91b | ||
|
|
f2f33b98f7 | ||
|
|
184a9d0d5c | ||
|
|
90aa2ab4eb | ||
|
|
2fab0b46c8 | ||
|
|
bff8736889 | ||
|
|
37e5571965 | ||
|
|
6c3935f7ea | ||
|
|
dbf42de407 | ||
|
|
900fbe6e75 | ||
|
|
fe4af50fb0 | ||
|
|
81c103b12d | ||
|
|
023013b6fe | ||
|
|
dfdd8cac94 | ||
|
|
d30441dd27 | ||
|
|
bd565be660 | ||
|
|
ad81434310 | ||
|
|
965df0bc2a | ||
|
|
cb1c36721c | ||
|
|
fede9e97e4 | ||
|
|
617baa29cd | ||
|
|
645109111e | ||
|
|
24aa603230 | ||
|
|
8b8a956155 | ||
|
|
5e801dd1d7 | ||
|
|
98200e6b39 | ||
|
|
f3405bcf29 | ||
|
|
1724c9328e | ||
|
|
025502efad | ||
|
|
397ebd4bdb | ||
|
|
6adf368c08 | ||
|
|
871e0e30f1 | ||
|
|
07ab7d98a6 | ||
|
|
69d4c2a27b | ||
|
|
0b4fa11486 | ||
|
|
7929dbfee1 | ||
|
|
73b234fd23 | ||
|
|
df333fdfb5 | ||
|
|
99c292a7ad | ||
|
|
8cd540e2e1 | ||
|
|
9bef2a8ac6 | ||
|
|
e3ac63da93 | ||
|
|
958206c469 | ||
|
|
98f1941b30 | ||
|
|
812dc0f528 | ||
|
|
9fa5737f54 | ||
|
|
0188c719d0 | ||
|
|
45ac101779 | ||
|
|
a75a406e05 | ||
|
|
80b031710e | ||
|
|
87b1d71f72 | ||
|
|
9a86b1df8b | ||
|
|
b86eb53256 | ||
|
|
9f5be1cf5a | ||
|
|
a1da95c9a5 | ||
|
|
cb422950f8 | ||
|
|
af5f8909a6 | ||
|
|
0a7e606650 | ||
|
|
c47e553425 | ||
|
|
7659ab5a47 | ||
|
|
a31ae97ea0 | ||
|
|
3cbf2abc5c | ||
|
|
d92294695d | ||
|
|
d7e93cbda9 | ||
|
|
a9e0635d31 | ||
|
|
f22dbc510d | ||
|
|
16aa731867 | ||
|
|
e1f295398e | ||
|
|
d00c5d0ad8 | ||
|
|
29a132496e | ||
|
|
c032b3c2d4 | ||
|
|
68ce5d78f9 | ||
|
|
70fef15f81 | ||
|
|
7b651dedcd | ||
|
|
a6af380833 | ||
|
|
b0993379ee | ||
|
|
7e7005abe2 | ||
|
|
55cf01d9f7 | ||
|
|
7354d6722f | ||
|
|
8e7c3b7164 | ||
|
|
c33358d48f | ||
|
|
ea541a6cf7 | ||
|
|
9a067c7821 | ||
|
|
67d48e4e35 | ||
|
|
1b89879a47 | ||
|
|
79c4a09181 | ||
|
|
ea35f2cf0e | ||
|
|
828607c67b | ||
|
|
64ffd7be36 | ||
|
|
4003a0d61c | ||
|
|
631b44fee2 | ||
|
|
c2c1bbc417 | ||
|
|
10c5a8346f | ||
|
|
c0c2f0bebc | ||
|
|
85e8ead0cf | ||
|
|
2e0ac79f0c | ||
|
|
b7dae2a846 | ||
|
|
cf470009ba | ||
|
|
434102550f | ||
|
|
00ac23c462 | ||
|
|
402266e65b | ||
|
|
852eb0bf49 | ||
|
|
84e17c7707 | ||
|
|
fb4a6c968c | ||
|
|
b3076d95b2 | ||
|
|
a2bff39427 | ||
|
|
0d82786715 | ||
|
|
17a433fb59 | ||
|
|
55ce19a233 | ||
|
|
59d74a83af | ||
|
|
dea4b746b7 | ||
|
|
61f5031f8a | ||
|
|
5d60632aa6 | ||
|
|
fe30ed3580 | ||
|
|
7370354535 | ||
|
|
b2890a00a3 | ||
|
|
f329b94625 | ||
|
|
62352a126e | ||
|
|
16be3a7f54 | ||
|
|
1de97d204d | ||
|
|
2bc8cc01a5 | ||
|
|
6266a94857 | ||
|
|
bd19ef489c | ||
|
|
a7b9a930e5 | ||
|
|
39659d8c36 | ||
|
|
22ebb85c35 | ||
|
|
30109204d9 | ||
|
|
3cd48e17d2 | ||
|
|
da5c7a77c3 | ||
|
|
43708f6395 | ||
|
|
29cec989b2 | ||
|
|
93c0134da9 | ||
|
|
5840120124 | ||
|
|
9d014e89bc | ||
|
|
15a3e15f2f | ||
|
|
95d77807c2 | ||
|
|
28221b5f5a | ||
|
|
c9397ce1e7 | ||
|
|
a1f8bcd0ae | ||
|
|
f1f466b69f | ||
|
|
df48f4d8a9 | ||
|
|
4c6cea87f1 | ||
|
|
828cc5d1bf | ||
|
|
59328ae65a | ||
|
|
6d76738427 | ||
|
|
0f3087cbd6 | ||
|
|
4c19ff30ed | ||
|
|
a38fbe8d21 | ||
|
|
8c1539ab24 | ||
|
|
af3b3eb323 | ||
|
|
c8f6d8a7f2 | ||
|
|
cf52e7d788 | ||
|
|
8eb34c5141 | ||
|
|
2a9cf7c06d | ||
|
|
f4cd02283b | ||
|
|
99cca5d249 | ||
|
|
5d8877a679 | ||
|
|
d18cc2d3e4 | ||
|
|
0ae00dc79c | ||
|
|
e1bfdfbc5e | ||
|
|
c2d332ce20 | ||
|
|
35a4039955 | ||
|
|
b7368654f1 | ||
|
|
87bad7b36d | ||
|
|
25837e3367 | ||
|
|
61a9cc6e6a | ||
|
|
8b5e638409 | ||
|
|
69fe17380c | ||
|
|
98ca711e44 | ||
|
|
b9ec912698 | ||
|
|
bc0fd47522 | ||
|
|
3e527e3141 | ||
|
|
ed423a4a8e | ||
|
|
f88b500ee8 | ||
|
|
32d645572c | ||
|
|
4a6ab18b73 | ||
|
|
8ec999089a | ||
|
|
1a07c0796f | ||
|
|
d4baff8d90 | ||
|
|
8aa414360e | ||
|
|
3b7de86b99 | ||
|
|
feb6c5928f | ||
|
|
d9c3277f9e | ||
|
|
1d33b33f28 | ||
|
|
e51179ed0f | ||
|
|
3a8db77200 |
5
.gitignore
vendored
5
.gitignore
vendored
@@ -23,3 +23,8 @@ samples/server-generator/node/output/node_modules
|
||||
samples/server-generator/scalatra/target
|
||||
samples/server-generator/scalatra/output/.history
|
||||
|
||||
target
|
||||
.idea
|
||||
.lib
|
||||
atlassian-ide-plugin.xml
|
||||
.DS_Store
|
||||
|
||||
3
.travis.yml
Normal file
3
.travis.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
language: scala
|
||||
scala:
|
||||
- 2.10.2
|
||||
92
README.md
92
README.md
@@ -1,4 +1,6 @@
|
||||
# Swagger Client Code-Generator
|
||||
# Swagger Code Generator
|
||||
|
||||
[](https://travis-ci.org/wordnik/swagger-codegen)
|
||||
|
||||
## Overview
|
||||
This is the swagger codegen project, which allows generation of client libraries automatically from a
|
||||
@@ -8,14 +10,31 @@ http://swagger.wordnik.com. For more information about Wordnik's APIs, please v
|
||||
### Prerequisites
|
||||
You need the following installed and available in your $PATH:
|
||||
|
||||
* [Java 1.6](http://java.oracle.com)
|
||||
* [Java 1.7](http://java.oracle.com)
|
||||
|
||||
Note! Some folks have had issues with OOM errors with java version "1.6.0_51". It's strongly suggested that you upgrade to 1.7!
|
||||
|
||||
* [Apache maven 3.0.3 or greater](http://maven.apache.org/)
|
||||
|
||||
* [Scala](http://www.scala-lang.org)
|
||||
* [Scala 2.9.1](http://www.scala-lang.org)
|
||||
|
||||
* [sbt (only download if you're building on Windows)](http://www.scala-sbt.org/)
|
||||
|
||||
You also need to add the scala binary to your PATH.
|
||||
|
||||
After cloning the project, you need to build it from source with this command:
|
||||
|
||||
```
|
||||
./sbt assembly
|
||||
```
|
||||
|
||||
or for Windows...
|
||||
|
||||
```
|
||||
sbt assembly
|
||||
```
|
||||
|
||||
|
||||
### To generate a sample client library
|
||||
You can build a client against Wordnik's [petstore](http://petstore.swagger.wordnik.com) API as follows:
|
||||
|
||||
@@ -46,7 +65,7 @@ Other languages have petstore samples, too:
|
||||
It's just as easy--you can either run the default generators:
|
||||
|
||||
```
|
||||
./bin/runscala.sh com.wordnik.swagger.codegen.BasicScalaGenerator http://petstore.swagger.wordnik.com/api/resources.json special-key
|
||||
./bin/runscala.sh com.wordnik.swagger.codegen.BasicScalaGenerator http://petstore.swagger.wordnik.com/api/api-docs special-key
|
||||
```
|
||||
|
||||
Replace `Scala` with `Flash`, `Java`, `Objc`, `PHP`, `Python`, `Python3`, `Ruby`.
|
||||
@@ -130,20 +149,31 @@ client codegen and ui may not work correctly.
|
||||
To validate an api and write output to ./swagger-errors.html:
|
||||
|
||||
```
|
||||
./bin/validate.sh http://petstore.swagger.wordnik.com/api/resources.json "" ./swagger-errors.html
|
||||
./bin/validate.sh http://petstore.swagger.wordnik.com/api/api-docs "specia-key" ./swagger-errors.html
|
||||
```
|
||||
|
||||
### To build the codegen library
|
||||
|
||||
This will create the swagger-codegen library from source.
|
||||
### Generating static api documentation
|
||||
If you need to make static pages or don't want the sandbox of the swagger-ui, you can use the codegen to build them. Remember, the engine is just using mustache templates--the output format is your call.
|
||||
|
||||
```
|
||||
mvn package
|
||||
./bin/static-docs.sh
|
||||
```
|
||||
|
||||
Note! The templates are included in the library generated. If you want to modify the templates, you'll need to
|
||||
either repackage the library OR modify your codegen script to use a file path!
|
||||
Will produce the output here:
|
||||
|
||||
```
|
||||
https://github.com/wordnik/swagger-codegen/tree/master/samples/docs/swagger-static-docs
|
||||
```
|
||||
|
||||
which is based on these templates:
|
||||
|
||||
```
|
||||
https://github.com/wordnik/swagger-codegen/tree/master/src/main/resources/swagger-static
|
||||
```
|
||||
|
||||
and looks like this
|
||||
|
||||

|
||||
|
||||
### To build a server stub
|
||||
|
||||
@@ -153,12 +183,48 @@ You can also use the codegen to generate a server for a couple different framewo
|
||||
|
||||
* [ruby sinatra generator](https://github.com/wordnik/swagger-codegen/tree/master/samples/server-generator/sinatra)
|
||||
|
||||
* [scala sinatra generator](https://github.com/wordnik/swagger-codegen/tree/master/samples/server-generator/scalatra)
|
||||
* [scala scalatra generator](https://github.com/wordnik/swagger-codegen/tree/master/samples/server-generator/scalatra)
|
||||
|
||||
* [java jax-rs generator](https://github.com/wordnik/swagger-codegen/tree/master/samples/server-generator/java-jaxrs)
|
||||
|
||||
|
||||
### Migrating from Swagger 1.1 to 1.2 format
|
||||
|
||||
If you've spent time hand-crafting your swagger spec files, you can use the [SpecConverter](https://github.com/wordnik/swagger-codegen/blob/master/src/main/scala/com/wordnik/swagger/codegen/SpecConverter.scala) to do the dirty work. For example:
|
||||
|
||||
```bash
|
||||
$ ./bin/update-spec.sh http://developer.wordnik.com/v4/resources.json wordnik-developer
|
||||
writing file wordnik-developer/api-docs
|
||||
calling: http://developer.wordnik.com/v4/account.json
|
||||
calling: http://developer.wordnik.com/v4/word.json
|
||||
calling: http://developer.wordnik.com/v4/words.json
|
||||
calling: http://developer.wordnik.com/v4/wordList.json
|
||||
calling: http://developer.wordnik.com/v4/wordLists.json
|
||||
writing file wordnik-developer/account
|
||||
writing file wordnik-developer/word
|
||||
writing file wordnik-developer/words
|
||||
writing file wordnik-developer/wordList
|
||||
writing file wordnik-developer/wordLists
|
||||
```
|
||||
|
||||
Will read the 1.1 spec from wordnik developer and write it into the folder called `wordnik-developer`.
|
||||
|
||||
|
||||
### To build the codegen library
|
||||
|
||||
This will create the swagger-codegen library from source.
|
||||
|
||||
```
|
||||
./sbt assembly
|
||||
```
|
||||
|
||||
Note! The templates are included in the library generated. If you want to modify the templates, you'll need to
|
||||
either repackage the library OR modify your codegen script to use a file path!
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
Copyright 2012 Wordnik, Inc.
|
||||
Copyright 2013 Wordnik, Inc.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
7
bin/Version.scala
Normal file
7
bin/Version.scala
Normal file
@@ -0,0 +1,7 @@
|
||||
val version = scala.util.Properties.scalaPropOrElse("version.number", "unknown").toString match {
|
||||
case "2.10.0" => "2.10"
|
||||
case "2.10.2" => "2.10"
|
||||
case "2.10.3" => "2.10"
|
||||
case e: String => e
|
||||
}
|
||||
println(version)
|
||||
37
bin/all-petstore.sh
Executable file
37
bin/all-petstore.sh
Executable file
@@ -0,0 +1,37 @@
|
||||
#!/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
|
||||
|
||||
cd $APP_DIR
|
||||
./bin/java-wordnik-api.sh
|
||||
./bin/php-wordnik-api.sh
|
||||
./bin/python3-wordnik-api.sh
|
||||
./bin/objc-wordnik-api.sh
|
||||
./bin/python-wordnik-api.sh
|
||||
./bin/scala-wordnik-api.sh
|
||||
|
||||
./bin/android-java-petstore.sh
|
||||
./bin/csharp-petstore.sh
|
||||
./bin/flash-petstore.sh
|
||||
./bin/java-petstore.sh
|
||||
./bin/objc-petstore.sh
|
||||
./bin/php-petstore.sh
|
||||
./bin/python-petstore.sh
|
||||
./bin/python3-petstore.sh
|
||||
./bin/ruby-petstore.sh
|
||||
./bin/scala-petstore.sh
|
||||
32
bin/android-java-petstore.sh
Executable file
32
bin/android-java-petstore.sh
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPT="$0"
|
||||
SCALA_RUNNER_VERSION=$(scala ./bin/Version.scala)
|
||||
|
||||
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
|
||||
|
||||
cd $APP_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="$@ samples/client/petstore/android-java/AndroidJavaPetstoreCodegen.scala http://petstore.swagger.wordnik.com/api/api-docs special-key"
|
||||
|
||||
if [ -f $APP_DIR/target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar ]; then
|
||||
scala -cp target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar $ags
|
||||
else
|
||||
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
|
||||
fi
|
||||
32
bin/android-java-wordnik-api.sh
Executable file
32
bin/android-java-wordnik-api.sh
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPT="$0"
|
||||
SCALA_RUNNER_VERSION=$(scala ./bin/Version.scala)
|
||||
|
||||
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
|
||||
|
||||
cd $APP_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="$@ samples/client/petstore/android-java/AndroidJavaPetstoreCodegen.scala http://petstore.swagger.wordnik.com/api/api-docs special-key"
|
||||
|
||||
if [ -f $APP_DIR/target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar ]; then
|
||||
scala -cp target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar $ags
|
||||
else
|
||||
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
|
||||
fi
|
||||
32
bin/csharp-petstore.sh
Executable file
32
bin/csharp-petstore.sh
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPT="$0"
|
||||
SCALA_RUNNER_VERSION=$(scala ./bin/Version.scala)
|
||||
|
||||
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
|
||||
|
||||
cd $APP_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="$@ samples/client/petstore/csharp/CsharpPetstoreCodegen.scala http://petstore.swagger.wordnik.com/api/api-docs special-key"
|
||||
|
||||
if [ -f $APP_DIR/target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar ]; then
|
||||
scala -cp target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar $ags
|
||||
else
|
||||
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
|
||||
fi
|
||||
@@ -1,6 +1,32 @@
|
||||
#!/bin/bash
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
#!/bin/sh
|
||||
|
||||
export CLASSPATH="$DIR/../target/lib/*:$DIR/../target/*"
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
scala $WORDNIK_OPTS $JAVA_CONFIG_OPTIONS -cp $CLASSPATH "$@" samples/client/petstore/flash/FlashPetstoreCodegen.scala http://petstore.swagger.wordnik.com/api/resources.json special-key
|
||||
SCRIPT="$0"
|
||||
SCALA_RUNNER_VERSION=$(scala ./bin/Version.scala)
|
||||
|
||||
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
|
||||
|
||||
cd $APP_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="$@ samples/client/petstore/flash/FlashPetstoreCodegen.scala http://petstore.swagger.wordnik.com/api/api-docs special-key"
|
||||
|
||||
if [ -f $APP_DIR/target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar ]; then
|
||||
scala -cp target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar $ags
|
||||
else
|
||||
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
|
||||
fi
|
||||
|
||||
@@ -1,6 +1,32 @@
|
||||
#!/bin/bash
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
#!/bin/sh
|
||||
|
||||
export CLASSPATH="$DIR/../target/lib/*:$DIR/../target/*"
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties -DfileMap=src/test/resources/petstore "
|
||||
scala $WORDNIK_OPTS $JAVA_CONFIG_OPTIONS -cp $CLASSPATH "$@" samples/client/petstore/java/JavaPetstoreCodegen.scala http://petstore.swagger.wordnik.com/api/resources.json special-key
|
||||
SCRIPT="$0"
|
||||
SCALA_RUNNER_VERSION=$(scala ./bin/Version.scala)
|
||||
|
||||
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
|
||||
|
||||
cd $APP_DIR
|
||||
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DfileMap=src/test/resources/petstore-1.1/resources.json -DloggerPath=conf/log4j.properties"
|
||||
ags="$@ samples/client/petstore/java/JavaPetstoreCodegen.scala http://petstore.swagger.wordnik.com/api/api-docs special-key"
|
||||
|
||||
if [ -f $APP_DIR/target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar ]; then
|
||||
scala -cp target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar $ags
|
||||
else
|
||||
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
|
||||
fi
|
||||
|
||||
@@ -1,6 +1,32 @@
|
||||
#!/bin/bash
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
#!/bin/sh
|
||||
|
||||
export CLASSPATH="$DIR/../target/lib/*:$DIR/../target/*"
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
scala $WORDNIK_OPTS $JAVA_CONFIG_OPTIONS -cp $CLASSPATH "$@" samples/client/petstore/java/JavaPetstoreCodegen.scala http://petstore.swagger.wordnik.com/api/resources.json special-key
|
||||
SCRIPT="$0"
|
||||
SCALA_RUNNER_VERSION=$(scala ./bin/Version.scala)
|
||||
|
||||
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
|
||||
|
||||
cd $APP_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="$@ samples/client/petstore/java/JavaPetstoreCodegen.scala http://petstore.swagger.wordnik.com/api/api-docs special-key"
|
||||
|
||||
if [ -f $APP_DIR/target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar ]; then
|
||||
scala -cp target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar $ags
|
||||
else
|
||||
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
|
||||
fi
|
||||
|
||||
@@ -1,6 +1,32 @@
|
||||
#!/bin/bash
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
#!/bin/sh
|
||||
|
||||
export CLASSPATH="$DIR/../target/lib/*:$DIR/../target/*"
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties -DfileMap=samples/client/wordnik-api/spec-files"
|
||||
scala $WORDNIK_OPTS $JAVA_CONFIG_OPTIONS -cp $CLASSPATH "$@" samples/client/wordnik-api/java/JavaWordnikApiCodegen.scala http://api.wordnik.com/v4/resources.json
|
||||
SCRIPT="$0"
|
||||
SCALA_RUNNER_VERSION=$(scala ./bin/Version.scala)
|
||||
|
||||
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
|
||||
|
||||
cd $APP_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 -DfileMap=samples/client/wordnik-api/spec-files/resources.json"
|
||||
ags="$@ samples/client/wordnik-api/java/JavaWordnikApiCodegen.scala http://api.wordnik.com/v4/resources.json"
|
||||
|
||||
if [ -f $APP_DIR/target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar ]; then
|
||||
scala -cp target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar $ags
|
||||
else
|
||||
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
|
||||
fi
|
||||
|
||||
@@ -1,5 +1,34 @@
|
||||
#!/bin/bash
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
export CLASSPATH="$DIR/../target/*:$DIR/../target/lib/*"
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
scala $WORDNIK_OPTS $JAVA_CONFIG_OPTIONS -cp $CLASSPATH "$@" samples/client/petstore/objc/ObjcPetstoreCodegen.scala http://petstore.swagger.wordnik.com/api/resources.json special-key
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPT="$0"
|
||||
SCALA_RUNNER_VERSION=$(scala ./bin/Version.scala)
|
||||
|
||||
version="$(scala ./bin/Version.scala)"
|
||||
|
||||
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
|
||||
|
||||
cd $APP_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="$@ samples/client/petstore/objc/ObjcPetstoreCodegen.scala http://petstore.swagger.wordnik.com/api/api-docs special-key"
|
||||
|
||||
if [ -f $APP_DIR/target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar ]; then
|
||||
scala -cp target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar $ags
|
||||
else
|
||||
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
|
||||
fi
|
||||
|
||||
@@ -1,6 +1,32 @@
|
||||
#!/bin/bash
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
#!/bin/sh
|
||||
|
||||
export CLASSPATH="$DIR/../target/lib/*:$DIR/../target/*"
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties -DfileMap=samples/client/wordnik-api/spec-files"
|
||||
scala $WORDNIK_OPTS $JAVA_CONFIG_OPTIONS -cp $CLASSPATH "$@" samples/client/wordnik-api/objc/ObjcWordnikApiCodegen.scala http://api.wordnik.com/v4/resources.json
|
||||
SCRIPT="$0"
|
||||
SCALA_RUNNER_VERSION=$(scala ./bin/Version.scala)
|
||||
|
||||
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
|
||||
|
||||
cd $APP_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 -DfileMap=samples/client/wordnik-api/spec-files"
|
||||
ags="$@ samples/client/wordnik-api/objc/ObjcWordnikApiCodegen.scala http://api.wordnik.com/v4/resources.json"
|
||||
|
||||
if [ -f $APP_DIR/target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar ]; then
|
||||
scala -cp target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar $ags
|
||||
else
|
||||
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
|
||||
fi
|
||||
|
||||
@@ -1,6 +1,32 @@
|
||||
#!/bin/bash
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
#!/bin/sh
|
||||
|
||||
export CLASSPATH="$DIR/../target/lib/*:$DIR/../target/*"
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
scala $WORDNIK_OPTS $JAVA_CONFIG_OPTIONS -cp $CLASSPATH "$@" samples/client/petstore/php/PHPPetstoreCodegen.scala http://petstore.swagger.wordnik.com/api/resources.json special-key
|
||||
SCRIPT="$0"
|
||||
SCALA_RUNNER_VERSION=$(scala ./bin/Version.scala)
|
||||
|
||||
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
|
||||
|
||||
cd $APP_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="$@ samples/client/petstore/php/PHPPetstoreCodegen.scala http://petstore.swagger.wordnik.com/api/api-docs special-key"
|
||||
|
||||
if [ -f $APP_DIR/target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar ]; then
|
||||
scala -cp target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar $ags
|
||||
else
|
||||
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
|
||||
fi
|
||||
|
||||
32
bin/php-wordnik-api.sh
Executable file
32
bin/php-wordnik-api.sh
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPT="$0"
|
||||
SCALA_RUNNER_VERSION=$(scala ./bin/Version.scala)
|
||||
|
||||
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
|
||||
|
||||
cd $APP_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 -DfileMap=samples/client/wordnik-api/spec-files/resources.json"
|
||||
ags="$@ samples/client/wordnik-api/php/PHPWordnikApiCodegen.scala http://api.wordnik.com/v4/resources.json"
|
||||
|
||||
if [ -f $APP_DIR/target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar ]; then
|
||||
scala -cp target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar $ags
|
||||
else
|
||||
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
|
||||
fi
|
||||
@@ -1,6 +1,32 @@
|
||||
#!/bin/bash
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
#!/bin/sh
|
||||
|
||||
export CLASSPATH="$DIR/../target/lib/*:$DIR/../target/*"
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
scala $WORDNIK_OPTS $JAVA_CONFIG_OPTIONS -cp $CLASSPATH "$@" samples/client/petstore/python/PythonPetstoreCodegen.scala http://petstore.swagger.wordnik.com/api/resources.json special-key
|
||||
SCRIPT="$0"
|
||||
SCALA_RUNNER_VERSION=$(scala ./bin/Version.scala)
|
||||
|
||||
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
|
||||
|
||||
cd $APP_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="$@ samples/client/petstore/python/PythonPetstoreCodegen.scala http://petstore.swagger.wordnik.com/api/api-docs special-key"
|
||||
|
||||
if [ -f $APP_DIR/target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar ]; then
|
||||
scala -cp target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar $ags
|
||||
else
|
||||
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
|
||||
fi
|
||||
|
||||
32
bin/python-wordnik-api.sh
Executable file
32
bin/python-wordnik-api.sh
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPT="$0"
|
||||
SCALA_RUNNER_VERSION=$(scala ./bin/Version.scala)
|
||||
|
||||
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
|
||||
|
||||
cd $APP_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 -DfileMap=samples/client/wordnik-api/spec-files/resources.json"
|
||||
ags="$@ samples/client/wordnik-api/python/PythonWordnikApiCodegen.scala http://api.wordnik.com/v4/resources.json"
|
||||
|
||||
if [ -f $APP_DIR/target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar ]; then
|
||||
scala -cp target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar $ags
|
||||
else
|
||||
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
|
||||
fi
|
||||
@@ -1,6 +1,32 @@
|
||||
#!/bin/bash
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
#!/bin/sh
|
||||
|
||||
export CLASSPATH="$DIR/../target/lib/*:$DIR/../target/*"
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
scala $WORDNIK_OPTS $JAVA_CONFIG_OPTIONS -cp $CLASSPATH "$@" samples/client/petstore/python3/Python3PetstoreCodegen.scala http://petstore.swagger.wordnik.com/api/resources.json special-key
|
||||
SCRIPT="$0"
|
||||
SCALA_RUNNER_VERSION=$(scala ./bin/Version.scala)
|
||||
|
||||
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
|
||||
|
||||
cd $APP_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="$@ samples/client/petstore/python3/Python3PetstoreCodegen.scala http://petstore.swagger.wordnik.com/api/api-docs special-key"
|
||||
|
||||
if [ -f $APP_DIR/target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar ]; then
|
||||
scala -cp target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar $ags
|
||||
else
|
||||
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
|
||||
fi
|
||||
|
||||
32
bin/python3-wordnik-api.sh
Executable file
32
bin/python3-wordnik-api.sh
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPT="$0"
|
||||
SCALA_RUNNER_VERSION=$(scala ./bin/Version.scala)
|
||||
|
||||
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
|
||||
|
||||
cd $APP_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 -DfileMap=samples/client/wordnik-api/spec-files/resources.json"
|
||||
ags="$@ samples/client/wordnik-api/python3/Python3WordnikApiCodegen.scala http://api.wordnik.com/v4/resources.json"
|
||||
|
||||
if [ -f $APP_DIR/target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar ]; then
|
||||
scala -cp target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar $ags
|
||||
else
|
||||
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
|
||||
fi
|
||||
@@ -1,19 +1,32 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
echo "" > classpath.txt
|
||||
for file in `ls target/lib`;
|
||||
do echo -n 'target/lib/' >> classpath.txt;
|
||||
echo -n $file >> classpath.txt;
|
||||
echo -n ':' >> classpath.txt;
|
||||
SCRIPT="$0"
|
||||
SCALA_RUNNER_VERSION=$(scala ./bin/Version.scala)
|
||||
|
||||
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
|
||||
|
||||
for file in `ls target/*.jar`;
|
||||
do echo -n '' >> classpath.txt;
|
||||
echo -n $file >> classpath.txt;
|
||||
echo -n ':' >> classpath.txt;
|
||||
done
|
||||
export CLASSPATH=$(cat classpath.txt)
|
||||
if [ ! -d "${APP_DIR}" ]; then
|
||||
APP_DIR=`dirname "$SCRIPT"`/..
|
||||
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||
fi
|
||||
|
||||
cd $APP_DIR
|
||||
|
||||
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
scala $WORDNIK_OPTS $JAVA_CONFIG_OPTIONS -cp $CLASSPATH "$@" samples/client/petstore/ruby/RubyPetstoreCodegen.scala http://petstore.swagger.wordnik.com/api/resources.json special-key
|
||||
# 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="$@ samples/client/petstore/ruby/RubyPetstoreCodegen.scala http://petstore.swagger.wordnik.com/api/api-docs special-key"
|
||||
|
||||
if [ -f $APP_DIR/target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar ]; then
|
||||
scala -cp target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar $ags
|
||||
else
|
||||
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
|
||||
fi
|
||||
|
||||
@@ -1,5 +1,32 @@
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
export CLASSPATH="$DIR/../target/lib/*:$DIR/../target/*"
|
||||
export JAVA_OPTS="${JAVA_OPTS} -DXmx4096M"
|
||||
scala $WORDNIK_OPTS -cp $CLASSPATH "$@"
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPT="$0"
|
||||
SCALA_RUNNER_VERSION=$(scala ./bin/Version.scala)
|
||||
|
||||
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
|
||||
|
||||
cd $APP_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="$@"
|
||||
|
||||
if [ -f $APP_DIR/target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar ]; then
|
||||
scala -cp target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar $ags
|
||||
else
|
||||
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
|
||||
fi
|
||||
|
||||
31
bin/scala-async.sh
Executable file
31
bin/scala-async.sh
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPT="$0"
|
||||
SCALA_RUNNER_VERSION=$(scala ./bin/Version.scala)
|
||||
|
||||
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
|
||||
|
||||
cd $APP_DIR
|
||||
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
ags="com.wordnik.swagger.codegen.ScalaAsyncClientGenerator $@"
|
||||
|
||||
if [ -f $APP_DIR/target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar ]; then
|
||||
scala -cp target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar $ags
|
||||
else
|
||||
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
|
||||
fi
|
||||
@@ -1,6 +1,32 @@
|
||||
#!/bin/bash
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
#!/bin/sh
|
||||
|
||||
export CLASSPATH="$DIR/../target/lib/*:$DIR/../target/*"
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
scala $WORDNIK_OPTS $JAVA_CONFIG_OPTIONS -cp $CLASSPATH "$@" samples/client/petstore/scala/ScalaPetstoreCodegen.scala http://petstore.swagger.wordnik.com/api/resources.json special-key
|
||||
SCRIPT="$0"
|
||||
SCALA_RUNNER_VERSION=$(scala ./bin/Version.scala)
|
||||
|
||||
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
|
||||
|
||||
cd $APP_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="$@ samples/client/petstore/scala/ScalaPetstoreCodegen.scala http://petstore.swagger.wordnik.com/api/api-docs special-key"
|
||||
|
||||
if [ -f $APP_DIR/target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar ]; then
|
||||
scala -cp target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar $ags
|
||||
else
|
||||
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
|
||||
fi
|
||||
|
||||
@@ -1,6 +1,32 @@
|
||||
#!/bin/bash
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
#!/bin/sh
|
||||
|
||||
export CLASSPATH="$DIR/../target/lib/*:$DIR/../target/*"
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties -DfileMap=samples/client/wordnik-api/spec-files"
|
||||
scala $WORDNIK_OPTS $JAVA_CONFIG_OPTIONS -cp $CLASSPATH "$@" samples/client/wordnik-api/scala/ScalaWordnikApiCodegen.scala http://api.wordnik.com/v4/resources.json
|
||||
SCRIPT="$0"
|
||||
SCALA_RUNNER_VERSION=$(scala ./bin/Version.scala)
|
||||
|
||||
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
|
||||
|
||||
cd $APP_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 -DfileMap=samples/client/wordnik-api/spec-files/resources.json"
|
||||
ags="$@ samples/client/wordnik-api/scala/ScalaWordnikApiCodegen.scala http://api.wordnik.com/v4/resources.json"
|
||||
|
||||
if [ -f $APP_DIR/target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar ]; then
|
||||
scala -cp target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar $ags
|
||||
else
|
||||
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
|
||||
fi
|
||||
|
||||
32
bin/static-docs.sh
Executable file
32
bin/static-docs.sh
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPT="$0"
|
||||
SCALA_RUNNER_VERSION=$(scala ./bin/Version.scala)
|
||||
|
||||
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
|
||||
|
||||
cd $APP_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 -DfileMap=samples/client/wordnik-api/spec-files"
|
||||
ags="$@ SwaggerDocGenerator http://developer.wordnik.com/v4/resources.json"
|
||||
|
||||
if [ -f $APP_DIR/target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar ]; then
|
||||
scala -cp target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar $ags
|
||||
else
|
||||
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
|
||||
fi
|
||||
31
bin/update-spec.sh
Executable file
31
bin/update-spec.sh
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPT="$0"
|
||||
SCALA_RUNNER_VERSION=$(scala ./bin/Version.scala)
|
||||
|
||||
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
|
||||
|
||||
cd $APP_DIR
|
||||
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
ags="com.wordnik.swagger.codegen.SpecConverter $@"
|
||||
|
||||
if [ -f $APP_DIR/target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar ]; then
|
||||
scala -cp target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar $ags
|
||||
else
|
||||
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
|
||||
fi
|
||||
@@ -1,6 +1,31 @@
|
||||
#!/bin/bash
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
#!/bin/sh
|
||||
|
||||
export CLASSPATH="$DIR/../target/lib/*:$DIR/../target/*"
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
scala $WORDNIK_OPTS $JAVA_CONFIG_OPTIONS -cp $CLASSPATH com.wordnik.swagger.codegen.spec.Validator "$@"
|
||||
SCRIPT="$0"
|
||||
SCALA_RUNNER_VERSION=$(scala ./bin/Version.scala)
|
||||
|
||||
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
|
||||
|
||||
cd $APP_DIR
|
||||
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
ags="com.wordnik.swagger.codegen.spec.Validator $@"
|
||||
|
||||
if [ -f $APP_DIR/target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar ]; then
|
||||
scala -cp target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar $ags
|
||||
else
|
||||
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
|
||||
fi
|
||||
|
||||
56
bin/yml2swagger.js
Normal file
56
bin/yml2swagger.js
Normal file
@@ -0,0 +1,56 @@
|
||||
fs = require('fs')
|
||||
yaml = require('js-yaml')
|
||||
|
||||
var args = process.argv.splice(2);
|
||||
|
||||
if(args.length == 0) {
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
var arg0 = args[0];
|
||||
var outputdir = ".";
|
||||
|
||||
if(args.length > 1) {
|
||||
outputdir = args[1];
|
||||
}
|
||||
|
||||
var file = fs.lstatSync(arg0);
|
||||
|
||||
if(file.isFile()) {
|
||||
convert(arg0, outputdir);
|
||||
}
|
||||
else if (file.isDirectory()) {
|
||||
var files = fs.readdirSync(arg0);
|
||||
files.map(function(item) {
|
||||
var filename = arg0 + "/" + item;
|
||||
var file = fs.lstatSync(filename);
|
||||
if(file.isFile()) {
|
||||
convert(filename, outputdir);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function convert(filename, outputdir) {
|
||||
console.log("converting " + filename);
|
||||
fs.readFile(filename, "utf8", function (err, data) {
|
||||
if(err) {
|
||||
console.log(err);
|
||||
}
|
||||
else {
|
||||
try {
|
||||
var js = yaml.load(data);
|
||||
var prettyJs = JSON.stringify(js, undefined, 2);
|
||||
var outputFilename = outputdir + "/" + filename.split("/").pop().replace(".yml", "") + ".json";
|
||||
console.log("writing to " + outputFilename);
|
||||
fs.writeFile(outputFilename, prettyJs, function(err) {
|
||||
if(err) {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
133
build.sbt
Normal file
133
build.sbt
Normal file
@@ -0,0 +1,133 @@
|
||||
import xml.Group
|
||||
import AssemblyKeys._
|
||||
|
||||
organization := "com.wordnik"
|
||||
|
||||
name := "swagger-codegen"
|
||||
|
||||
version := "2.0.13"
|
||||
|
||||
scalaVersion := "2.10.1"
|
||||
|
||||
crossVersion := CrossVersion.full
|
||||
|
||||
javacOptions ++= Seq("-target", "1.6", "-source", "1.6", "-Xlint:unchecked", "-Xlint:deprecation")
|
||||
|
||||
scalacOptions ++= Seq("-optimize", "-unchecked", "-deprecation", "-Xcheckinit", "-encoding", "utf8")
|
||||
|
||||
crossScalaVersions := Seq("2.9.0", "2.9.0-1", "2.9.1", "2.9.1-1", "2.9.2", "2.9.3", "2.10.0", "2.10.1", "2.10.2")
|
||||
|
||||
libraryDependencies ++= Seq(
|
||||
"org.json4s" %% "json4s-jackson" % "3.2.5",
|
||||
"io.backchat.inflector" %% "scala-inflector" % "1.3.5",
|
||||
"commons-io" % "commons-io" % "2.3",
|
||||
"ch.qos.logback" % "logback-classic" % "1.0.13" % "provided",
|
||||
"org.rogach" %% "scallop" % "0.8.1",
|
||||
"junit" % "junit" % "4.11" % "test",
|
||||
"org.scalatest" %% "scalatest" % "1.9.1" % "test"
|
||||
)
|
||||
|
||||
libraryDependencies <+= scalaVersion {
|
||||
case v if v.startsWith("2.9") =>
|
||||
"org.fusesource.scalate" % "scalate-core_2.9" % "1.6.1"
|
||||
case v if v.startsWith("2.10") => {
|
||||
"org.fusesource.scalate" %% "scalate-core" % "1.6.1"
|
||||
}
|
||||
}
|
||||
|
||||
libraryDependencies ++= {
|
||||
scalaVersion.toString match {
|
||||
case v if v.startsWith("2.10") => Seq("org.scala-lang" % "scala-reflect" % v)
|
||||
case _ => Seq()
|
||||
}
|
||||
}
|
||||
|
||||
packageOptions <+= (name, version, organization) map {
|
||||
(title, version, vendor) =>
|
||||
Package.ManifestAttributes(
|
||||
"Created-By" -> "Simple Build Tool",
|
||||
"Built-By" -> System.getProperty("user.name"),
|
||||
"Build-Jdk" -> System.getProperty("java.version"),
|
||||
"Specification-Title" -> title,
|
||||
"Specification-Version" -> version,
|
||||
"Specification-Vendor" -> vendor,
|
||||
"Implementation-Title" -> title,
|
||||
"Implementation-Version" -> version,
|
||||
"Implementation-Vendor-Id" -> vendor,
|
||||
"Implementation-Vendor" -> vendor
|
||||
)
|
||||
}
|
||||
|
||||
publishTo <<= (version) { version: String =>
|
||||
if (version.trim.endsWith("SNAPSHOT"))
|
||||
Some("Sonatype Nexus Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots")
|
||||
else
|
||||
Some("Sonatype Nexus Releases" at "https://oss.sonatype.org/service/local/staging/deploy/maven2")
|
||||
}
|
||||
|
||||
//publishTo := Some(Resolver.file("file", new File(Path.userHome.absolutePath+"/.m2/repository")))
|
||||
|
||||
artifact in (Compile, assembly) ~= { art =>
|
||||
art.copy(`classifier` = Some("assembly"))
|
||||
}
|
||||
|
||||
addArtifact(artifact in (Compile, assembly), assembly)
|
||||
|
||||
publishMavenStyle := true
|
||||
|
||||
publishArtifact in Test := false
|
||||
|
||||
pomIncludeRepository := { x => false }
|
||||
|
||||
credentials += Credentials(Path.userHome / ".ivy2" / ".credentials")
|
||||
|
||||
homepage := Some(new URL("https://github.com/wordnik/swagger-codegen"))
|
||||
|
||||
parallelExecution in Test := false
|
||||
|
||||
startYear := Some(2009)
|
||||
|
||||
licenses := Seq(("Apache License 2.0", new URL("http://www.apache.org/licenses/LICENSE-2.0.html")))
|
||||
|
||||
pomExtra <<= (pomExtra, name, description) {(pom, name, desc) => pom ++ Group(
|
||||
<scm>
|
||||
<connection>scm:git:git@github.com:wordnik/swagger-codegen.git</connection>
|
||||
<developerConnection>scm:git:git@github.com:wordnik/swagger-codegen.git</developerConnection>
|
||||
<url>https://github.com/wordnik/swagger-codegen</url>
|
||||
</scm>
|
||||
<issueManagement>
|
||||
<system>github</system>
|
||||
<url>https://github.com/wordnik/swagger-codegen/issues</url>
|
||||
</issueManagement>
|
||||
<developers>
|
||||
<developer>
|
||||
<id>rpidikiti</id>
|
||||
<name>Ramesh Pidikiti</name>
|
||||
<email>ramesh@wordnik.com</email>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>ayush</id>
|
||||
<name>Ayush Gupta</name>
|
||||
<email>ayush@glugbot.com</email>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>fehguy</id>
|
||||
<name>Tony Tam</name>
|
||||
<email>fehguy@gmail.com</email>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>casualjim</id>
|
||||
<name>Ivan Porto Carrero</name>
|
||||
<url>http://flanders.co.nz/</url>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>radius314</id>
|
||||
<name>Danny Gershman</name>
|
||||
<email>danny.gershman@gmail.com</email>
|
||||
</developer>
|
||||
</developers>
|
||||
)}
|
||||
|
||||
assemblySettings
|
||||
|
||||
jarName in assembly := "swagger-codegen.jar"
|
||||
124
distro/pom.xml.disabled
Normal file
124
distro/pom.xml.disabled
Normal file
@@ -0,0 +1,124 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.sonatype.oss</groupId>
|
||||
<artifactId>oss-parent</artifactId>
|
||||
<version>5</version>
|
||||
</parent>
|
||||
<groupId>com.wordnik</groupId>
|
||||
<artifactId>swagger-codegen-distribution</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>2.0.2-SNAPSHOT</version>
|
||||
<name>swagger-codegen-distribution</name>
|
||||
<url>https://github.com/wordnik/swagger-codegen</url>
|
||||
<scm>
|
||||
<connection>scm:git:git@github.com:wordnik/swagger-codegen.git</connection>
|
||||
<developerConnection>scm:git:git@github.com:wordnik/swagger-codegen.git</developerConnection>
|
||||
<url>https://github.com/wordnik/swagger-codegen</url>
|
||||
</scm>
|
||||
<prerequisites>
|
||||
<maven>2.2.0</maven>
|
||||
</prerequisites>
|
||||
<developers>
|
||||
<developer>
|
||||
<id>fehguy</id>
|
||||
<name>Tony Tam</name>
|
||||
<email>fehguy@gmail.com</email>
|
||||
</developer>
|
||||
</developers>
|
||||
<issueManagement>
|
||||
<system>github</system>
|
||||
<url>https://github.com/wordnik/swagger-codegen/issues</url>
|
||||
</issueManagement>
|
||||
<mailingLists>
|
||||
<mailingList>
|
||||
<name>wordnik-api</name>
|
||||
<archive>https://groups.google.com/forum/#!forum/wordnik-api</archive>
|
||||
</mailingList>
|
||||
</mailingLists>
|
||||
<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>
|
||||
<plugins>
|
||||
<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-failsafe-plugin</artifactId>
|
||||
<version>2.6</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>integration-test</goal>
|
||||
<goal>verify</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>distro-assembly</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<version>2.3</version>
|
||||
<configuration>
|
||||
<descriptors>
|
||||
<descriptor>src/main/assembly/distribution.xml</descriptor>
|
||||
</descriptors>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>2.4</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>src-dependencies</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>unpack-dependencies</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<includeGroupIds>com.wordnik</includeGroupIds>
|
||||
<includeArtifactIds>text-data</includeArtifactIds>
|
||||
<outputDirectory>${project.build.directory}</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.wordnik</groupId>
|
||||
<artifactId>swagger-codegen_2.9.1</artifactId>
|
||||
<version>${swagger.codegen.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<properties>
|
||||
<swagger.codegen.version>2.0.2-SNAPSHOT</swagger.codegen.version>
|
||||
</properties>
|
||||
</project>
|
||||
29
distro/src/main/assembly/distribution.xml
Normal file
29
distro/src/main/assembly/distribution.xml
Normal file
@@ -0,0 +1,29 @@
|
||||
<assembly
|
||||
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
|
||||
<id>distribution</id>
|
||||
<baseDirectory>swagger-codegen</baseDirectory>
|
||||
<includeBaseDirectory>false</includeBaseDirectory>
|
||||
<formats>
|
||||
<format>zip</format>
|
||||
</formats>
|
||||
<dependencySets>
|
||||
<dependencySet>
|
||||
<scope>compile</scope>
|
||||
<outputDirectory>target/lib</outputDirectory>
|
||||
<includes>
|
||||
<include>*:jar:*</include>
|
||||
</includes>
|
||||
</dependencySet>
|
||||
</dependencySets>
|
||||
<fileSets>
|
||||
<fileSet>
|
||||
<directory>../bin</directory>
|
||||
<includes>
|
||||
<include>*.*</include>
|
||||
</includes>
|
||||
<outputDirectory>bin</outputDirectory>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
</assembly>
|
||||
16
package.json
Normal file
16
package.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"name": "swagger-yaml",
|
||||
"version": "2.0.1",
|
||||
"description": "Converts yaml to swagger json",
|
||||
"author": {
|
||||
"name": "Tony Tam",
|
||||
"email": "fehguy@gmail.com",
|
||||
"url": "http://developer.wordnik.com"
|
||||
},
|
||||
"license": "Apache",
|
||||
"readmeFilename": "README.md",
|
||||
"dependencies": {
|
||||
"json2yaml": "~1.0",
|
||||
"js-yaml": "~3.0"
|
||||
}
|
||||
}
|
||||
1
project/build.properties
Normal file
1
project/build.properties
Normal file
@@ -0,0 +1 @@
|
||||
sbt.version=0.13.0
|
||||
2
project/plugins.sbt
Normal file
2
project/plugins.sbt
Normal file
@@ -0,0 +1,2 @@
|
||||
|
||||
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.9.1")
|
||||
@@ -0,0 +1,49 @@
|
||||
/**
|
||||
* Copyright 2013 Wordnik, Inc.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
import com.wordnik.swagger.codegen.BasicAndroidJavaGenerator
|
||||
|
||||
object AndroidJavaPetstoreCodegen extends BasicAndroidJavaGenerator {
|
||||
def main(args: Array[String]) = generateClient(args)
|
||||
|
||||
// location of templates
|
||||
override def templateDir = "src/main/resources/android-java"
|
||||
|
||||
// where to write generated code
|
||||
override def destinationDir = "samples/client/petstore/android-java/src/main/java"
|
||||
|
||||
// package for api invoker, error files
|
||||
override def invokerPackage = Some("com.wordnik.client")
|
||||
|
||||
// package for models
|
||||
override def modelPackage = Some("com.wordnik.petstore.model")
|
||||
|
||||
// package for api classes
|
||||
override def apiPackage = Some("com.wordnik.petstore.api")
|
||||
|
||||
additionalParams ++= Map(
|
||||
"artifactId" -> "swagger-petstore",
|
||||
"artifactVersion" -> "1.0.0",
|
||||
"groupId" -> "com.wordnik")
|
||||
|
||||
// supporting classes
|
||||
override def supportingFiles = List(
|
||||
("apiInvoker.mustache", destinationDir + java.io.File.separator + invokerPackage.get.replace(".", java.io.File.separator) + java.io.File.separator, "ApiInvoker.java"),
|
||||
("jsonUtil.mustache", destinationDir + java.io.File.separator + invokerPackage.get.replace(".", java.io.File.separator) + java.io.File.separator, "JsonUtil.java"),
|
||||
("apiException.mustache", destinationDir + java.io.File.separator + invokerPackage.get.replace(".", java.io.File.separator) + java.io.File.separator, "ApiException.java"),
|
||||
("pom.mustache", "samples/client/petstore/android-java", "pom.xml")
|
||||
)
|
||||
}
|
||||
@@ -1,51 +1,20 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.wordnik</groupId>
|
||||
<artifactId>swagger-codegen_2.9.1</artifactId>
|
||||
<artifactId>swagger-petstore</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>swagger-codegen</name>
|
||||
<version>2.0.0</version>
|
||||
<name>swagger-petstore</name>
|
||||
<version>1.0.0</version>
|
||||
<scm>
|
||||
<connection>scm:git:git@github.com:wordnik/swagger-codegen.git</connection>
|
||||
<connection>scm:git:git@github.com:wordnik/swagger-mustache.git</connection>
|
||||
<developerConnection>scm:git:git@github.com:wordnik/swagger-codegen.git</developerConnection>
|
||||
<url>https://github.com/wordnik/swagger-codegen</url>
|
||||
</scm>
|
||||
<prerequisites>
|
||||
<maven>2.2.0</maven>
|
||||
</prerequisites>
|
||||
<developers>
|
||||
<developer>
|
||||
<id>rpidikiti</id>
|
||||
<name>Ramesh Pidikiti</name>
|
||||
<email>ramesh@wordnik.com</email>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>ayush</id>
|
||||
<name>Ayush Gupts</name>
|
||||
<email>ayush@glugbot.com</email>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>fehguy</id>
|
||||
<name>Tony Tam</name>
|
||||
<email>fehguy@gmail.com</email>
|
||||
</developer>
|
||||
</developers>
|
||||
<issueManagement>
|
||||
<system>github</system>
|
||||
<url>https://github.com/wordnik/swagger-codegen/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>
|
||||
<plugins>
|
||||
<plugin>
|
||||
@@ -78,6 +47,8 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<!-- attach test jar -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
@@ -93,6 +64,7 @@
|
||||
<configuration>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>build-helper-maven-plugin</artifactId>
|
||||
@@ -135,30 +107,39 @@
|
||||
<plugin>
|
||||
<groupId>net.alchim31.maven</groupId>
|
||||
<artifactId>scala-maven-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<version>${scala-maven-plugin-version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>scala-compile-first</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>add-source</goal>
|
||||
<goal>compile</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>scala-test-compile</id>
|
||||
<phase>process-test-resources</phase>
|
||||
<goals>
|
||||
<goal>testCompile</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<configuration>
|
||||
<recompileMode>incremental</recompileMode>
|
||||
</configuration>
|
||||
<jvmArgs>
|
||||
<jvmArg>-Xms128m</jvmArg>
|
||||
<jvmArg>-Xmx1500m</jvmArg>
|
||||
<jvmArg>-Xmx384m</jvmArg>
|
||||
</jvmArgs>
|
||||
<recompileMode>incremental</recompileMode>
|
||||
<args>
|
||||
<arg>-target:jvm-1.5</arg>
|
||||
<arg>-deprecation</arg>
|
||||
</args>
|
||||
<launchers>
|
||||
<launcher>
|
||||
<id>run-scalatest</id>
|
||||
<mainClass>org.scalatest.tools.Runner</mainClass>
|
||||
<args>
|
||||
<arg>-p</arg>
|
||||
<arg>${project.build.testOutputDirectory}</arg>
|
||||
</args>
|
||||
<jvmArgs>
|
||||
<jvmArg>-Xmx512m</jvmArg>
|
||||
</jvmArgs>
|
||||
</launcher>
|
||||
</launchers>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
@@ -168,39 +149,42 @@
|
||||
<plugin>
|
||||
<groupId>net.alchim31.maven</groupId>
|
||||
<artifactId>scala-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<scalaVersion>${scala-version}</scalaVersion>
|
||||
</configuration>
|
||||
<version>${scala-maven-plugin-version}</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</reporting>
|
||||
<dependencies>
|
||||
<!--dependency>
|
||||
<groupId>com.wordnik</groupId>
|
||||
<artifactId>swagger-core_2.9.1</artifactId>
|
||||
<version>${swagger-core-version}</version>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-core</artifactId>
|
||||
<version>${jackson-version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency-->
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>2.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.fusesource.scalate</groupId>
|
||||
<artifactId>scalate-wikitext</artifactId>
|
||||
<version>1.5.3</version>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-annotations</artifactId>
|
||||
<version>${jackson-version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.fusesource.scalate</groupId>
|
||||
<artifactId>scalate-page</artifactId>
|
||||
<version>1.5.3</version>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
<version>${jackson-version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
<version>${httpclient-version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- test dependencies -->
|
||||
<dependency>
|
||||
<groupId>org.scala-lang</groupId>
|
||||
<artifactId>scala-library</artifactId>
|
||||
<version>${scala-version}</version>
|
||||
<scope>compile</scope>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.scalatest</groupId>
|
||||
@@ -214,31 +198,17 @@
|
||||
<version>${junit-version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.module</groupId>
|
||||
<artifactId>jackson-module-scala</artifactId>
|
||||
<version>2.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-annotations</artifactId>
|
||||
<version>${jackson-version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.jaxrs</groupId>
|
||||
<artifactId>jackson-jaxrs-json-provider</artifactId>
|
||||
<version>2.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<jackson-version>2.0.4</jackson-version>
|
||||
<swagger-core-version>1.1.1-SNAPSHOT</swagger-core-version>
|
||||
<jackson-version>2.1.4</jackson-version>
|
||||
<scala-version>2.9.1-1</scala-version>
|
||||
<junit-version>4.8.1</junit-version>
|
||||
<maven-plugin.version>1.0.0</maven-plugin.version>
|
||||
<maven-plugin-version>1.0.0</maven-plugin-version>
|
||||
<junit-version>4.8.1</junit-version>
|
||||
<scala-test-version>1.6.1</scala-test-version>
|
||||
<httpclient-version>4.2.3</httpclient-version>
|
||||
<scala-maven-plugin-version>3.1.5</scala-maven-plugin-version>
|
||||
</properties>
|
||||
</project>
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.wordnik.client;
|
||||
|
||||
public class ApiException extends Exception {
|
||||
int code = 0;
|
||||
String message = null;
|
||||
|
||||
public ApiException() {}
|
||||
|
||||
public ApiException(int code, String message) {
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,174 @@
|
||||
package com.wordnik.client;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.core.JsonGenerator.Feature;
|
||||
import com.fasterxml.jackson.databind.*;
|
||||
import com.fasterxml.jackson.annotation.*;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
import org.apache.http.*;
|
||||
import org.apache.http.client.*;
|
||||
import org.apache.http.client.methods.*;
|
||||
import org.apache.http.entity.StringEntity;
|
||||
import org.apache.http.impl.client.*;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.net.URLEncoder;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
|
||||
public class ApiInvoker {
|
||||
private static ApiInvoker INSTANCE = new ApiInvoker();
|
||||
private Map<String, String> defaultHeaderMap = new HashMap<String, String>();
|
||||
|
||||
private HttpClient client = null;
|
||||
public static ApiInvoker getInstance() {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
public void addDefaultHeader(String key, String value) {
|
||||
defaultHeaderMap.put(key, value);
|
||||
}
|
||||
|
||||
public String escapeString(String str) {
|
||||
return str;
|
||||
}
|
||||
|
||||
public static Object deserialize(String json, String containerType, Class cls) throws ApiException {
|
||||
try{
|
||||
if("List".equals(containerType)) {
|
||||
JavaType typeInfo = JsonUtil.getJsonMapper().getTypeFactory().constructCollectionType(List.class, cls);
|
||||
List response = (List<?>) JsonUtil.getJsonMapper().readValue(json, typeInfo);
|
||||
return response;
|
||||
}
|
||||
else if(String.class.equals(cls)) {
|
||||
if(json != null && json.startsWith("\"") && json.endsWith("\"") && json.length() > 1)
|
||||
return json.substring(1, json.length() - 2);
|
||||
else
|
||||
return json;
|
||||
}
|
||||
else {
|
||||
return JsonUtil.getJsonMapper().readValue(json, cls);
|
||||
}
|
||||
}
|
||||
catch (IOException e) {
|
||||
throw new ApiException(500, e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public static String serialize(Object obj) throws ApiException {
|
||||
try {
|
||||
if (obj != null)
|
||||
return JsonUtil.getJsonMapper().writeValueAsString(obj);
|
||||
else
|
||||
return null;
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new ApiException(500, e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public String invokeAPI(String host, String path, String method, Map<String, String> queryParams, Object body, Map<String, String> headerParams, String contentType) throws ApiException {
|
||||
HttpClient client = getClient(host);
|
||||
|
||||
StringBuilder b = new StringBuilder();
|
||||
for(String key : queryParams.keySet()) {
|
||||
String value = queryParams.get(key);
|
||||
if (value != null){
|
||||
if(b.toString().length() == 0)
|
||||
b.append("?");
|
||||
else
|
||||
b.append("&");
|
||||
b.append(escapeString(key)).append("=").append(escapeString(value));
|
||||
}
|
||||
}
|
||||
String url = host + path + b.toString();
|
||||
|
||||
HashMap<String, String> headers = new HashMap<String, String>();
|
||||
|
||||
for(String key : headerParams.keySet()) {
|
||||
headers.put(key, headerParams.get(key));
|
||||
}
|
||||
|
||||
for(String key : defaultHeaderMap.keySet()) {
|
||||
if(!headerParams.containsKey(key)) {
|
||||
headers.put(key, defaultHeaderMap.get(key));
|
||||
}
|
||||
}
|
||||
headers.put("Accept", "application/json");
|
||||
|
||||
HttpResponse response = null;
|
||||
try{
|
||||
if("GET".equals(method)) {
|
||||
HttpGet get = new HttpGet(url);
|
||||
get.addHeader("Accept", "application/json");
|
||||
for(String key : headers.keySet()) {
|
||||
get.setHeader(key, headers.get(key));
|
||||
}
|
||||
response = client.execute(get);
|
||||
}
|
||||
else if ("POST".equals(method)) {
|
||||
HttpPost post = new HttpPost(url);
|
||||
post.setHeader("Content-Type", contentType);
|
||||
post.setEntity(new StringEntity(serialize(body), "UTF-8"));
|
||||
for(String key : headers.keySet()) {
|
||||
post.setHeader(key, headers.get(key));
|
||||
}
|
||||
response = client.execute(post);
|
||||
}
|
||||
else if ("PUT".equals(method)) {
|
||||
HttpPut put = new HttpPut(url);
|
||||
if(body != null) {
|
||||
put.setHeader("Content-Type", contentType);
|
||||
put.setEntity(new StringEntity(serialize(body), "UTF-8"));
|
||||
}
|
||||
for(String key : headers.keySet()) {
|
||||
put.setHeader(key, headers.get(key));
|
||||
}
|
||||
response = client.execute(put);
|
||||
}
|
||||
else if ("DELETE".equals(method)) {
|
||||
HttpDelete delete = new HttpDelete(url);
|
||||
for(String key : headers.keySet()) {
|
||||
delete.setHeader(key, headers.get(key));
|
||||
}
|
||||
response = client.execute(delete);
|
||||
}
|
||||
|
||||
int code = response.getStatusLine().getStatusCode();
|
||||
String responseString = null;
|
||||
if(code == 204)
|
||||
responseString = "";
|
||||
else if(code >= 200 && code < 300) {
|
||||
if(response.getEntity() != null) {
|
||||
HttpEntity resEntity = response.getEntity();
|
||||
responseString = EntityUtils.toString(resEntity);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(response.getEntity() != null) {
|
||||
HttpEntity resEntity = response.getEntity();
|
||||
responseString = EntityUtils.toString(resEntity);
|
||||
}
|
||||
else
|
||||
responseString = "no data";
|
||||
throw new ApiException(code, responseString);
|
||||
}
|
||||
return responseString;
|
||||
}
|
||||
catch(IOException e) {
|
||||
throw new ApiException(500, e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
private HttpClient getClient(String host) {
|
||||
if(client == null)
|
||||
client = new DefaultHttpClient();
|
||||
return client;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.wordnik.client;
|
||||
|
||||
import com.fasterxml.jackson.annotation.*;
|
||||
import com.fasterxml.jackson.databind.*;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.core.JsonGenerator.Feature;
|
||||
|
||||
public class JsonUtil {
|
||||
public static ObjectMapper mapper;
|
||||
|
||||
static {
|
||||
mapper = new ObjectMapper();
|
||||
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||
mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
|
||||
}
|
||||
|
||||
public static ObjectMapper getJsonMapper() {
|
||||
return mapper;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,309 @@
|
||||
package com.wordnik.petstore.api;
|
||||
|
||||
import com.wordnik.client.ApiException;
|
||||
import com.wordnik.client.ApiInvoker;
|
||||
import java.io.File;
|
||||
import com.wordnik.petstore.model.Pet;
|
||||
import java.util.*;
|
||||
|
||||
public class PetApi {
|
||||
String basePath = "http://petstore.swagger.wordnik.com/api";
|
||||
ApiInvoker apiInvoker = ApiInvoker.getInstance();
|
||||
|
||||
public void addHeader(String key, String value) {
|
||||
getInvoker().addDefaultHeader(key, value);
|
||||
}
|
||||
|
||||
public ApiInvoker getInvoker() {
|
||||
return apiInvoker;
|
||||
}
|
||||
|
||||
public void setBasePath(String basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
|
||||
public String getBasePath() {
|
||||
return basePath;
|
||||
}
|
||||
|
||||
public Pet getPetById (Long petId) throws ApiException {
|
||||
// verify required params are set
|
||||
if(petId == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
// create path and map variables
|
||||
String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
||||
|
||||
// query params
|
||||
Map<String, String> queryParams = new HashMap<String, String>();
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
|
||||
String contentType = "application/json";
|
||||
|
||||
try {
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams, contentType);
|
||||
if(response != null){
|
||||
return (Pet) ApiInvoker.deserialize(response, "", Pet.class);
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.getCode() == 404) {
|
||||
return null;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
public void deletePet (String petId) throws ApiException {
|
||||
// verify required params are set
|
||||
if(petId == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
// create path and map variables
|
||||
String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
||||
|
||||
// query params
|
||||
Map<String, String> queryParams = new HashMap<String, String>();
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
|
||||
String contentType = "application/json";
|
||||
|
||||
try {
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "DELETE", queryParams, null, headerParams, contentType);
|
||||
if(response != null){
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
return ;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.getCode() == 404) {
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
public List<Pet> partialUpdate (String petId, Pet body) throws ApiException {
|
||||
// verify required params are set
|
||||
if(petId == null || body == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
// create path and map variables
|
||||
String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
||||
|
||||
// query params
|
||||
Map<String, String> queryParams = new HashMap<String, String>();
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
|
||||
String contentType = "application/json";
|
||||
|
||||
try {
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "PATCH", queryParams, body, headerParams, contentType);
|
||||
if(response != null){
|
||||
return (List<Pet>) ApiInvoker.deserialize(response, "Array", Pet.class);
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.getCode() == 404) {
|
||||
return null;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
public void updatePetWithForm (String petId, String name, String status) throws ApiException {
|
||||
// verify required params are set
|
||||
if(petId == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
// create path and map variables
|
||||
String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
||||
|
||||
// query params
|
||||
Map<String, String> queryParams = new HashMap<String, String>();
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
|
||||
String contentType = "application/json";
|
||||
|
||||
try {
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, null, headerParams, contentType);
|
||||
if(response != null){
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
return ;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.getCode() == 404) {
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
public void uploadFile (String additionalMetadata, File body) throws ApiException {
|
||||
// create path and map variables
|
||||
String path = "/pet/uploadImage".replaceAll("\\{format\\}","json");
|
||||
|
||||
// query params
|
||||
Map<String, String> queryParams = new HashMap<String, String>();
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
|
||||
String contentType = "application/json";
|
||||
|
||||
try {
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, body, headerParams, contentType);
|
||||
if(response != null){
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
return ;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.getCode() == 404) {
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
public void addPet (Pet body) throws ApiException {
|
||||
// verify required params are set
|
||||
if(body == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
// create path and map variables
|
||||
String path = "/pet".replaceAll("\\{format\\}","json");
|
||||
|
||||
// query params
|
||||
Map<String, String> queryParams = new HashMap<String, String>();
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
|
||||
String contentType = "application/json";
|
||||
|
||||
try {
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, body, headerParams, contentType);
|
||||
if(response != null){
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
return ;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.getCode() == 404) {
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
public void updatePet (Pet body) throws ApiException {
|
||||
// verify required params are set
|
||||
if(body == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
// create path and map variables
|
||||
String path = "/pet".replaceAll("\\{format\\}","json");
|
||||
|
||||
// query params
|
||||
Map<String, String> queryParams = new HashMap<String, String>();
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
|
||||
String contentType = "application/json";
|
||||
|
||||
try {
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "PUT", queryParams, body, headerParams, contentType);
|
||||
if(response != null){
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
return ;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.getCode() == 404) {
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
public List<Pet> findPetsByStatus (String status) throws ApiException {
|
||||
// verify required params are set
|
||||
if(status == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
// create path and map variables
|
||||
String path = "/pet/findByStatus".replaceAll("\\{format\\}","json");
|
||||
|
||||
// query params
|
||||
Map<String, String> queryParams = new HashMap<String, String>();
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
|
||||
if(!"null".equals(String.valueOf(status)))
|
||||
queryParams.put("status", String.valueOf(status));
|
||||
String contentType = "application/json";
|
||||
|
||||
try {
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams, contentType);
|
||||
if(response != null){
|
||||
return (List<Pet>) ApiInvoker.deserialize(response, "Array", Pet.class);
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.getCode() == 404) {
|
||||
return null;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
public List<Pet> findPetsByTags (String tags) throws ApiException {
|
||||
// verify required params are set
|
||||
if(tags == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
// create path and map variables
|
||||
String path = "/pet/findByTags".replaceAll("\\{format\\}","json");
|
||||
|
||||
// query params
|
||||
Map<String, String> queryParams = new HashMap<String, String>();
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
|
||||
if(!"null".equals(String.valueOf(tags)))
|
||||
queryParams.put("tags", String.valueOf(tags));
|
||||
String contentType = "application/json";
|
||||
|
||||
try {
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams, contentType);
|
||||
if(response != null){
|
||||
return (List<Pet>) ApiInvoker.deserialize(response, "Array", Pet.class);
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.getCode() == 404) {
|
||||
return null;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,122 @@
|
||||
package com.wordnik.petstore.api;
|
||||
|
||||
import com.wordnik.client.ApiException;
|
||||
import com.wordnik.client.ApiInvoker;
|
||||
import com.wordnik.petstore.model.Order;
|
||||
import java.util.*;
|
||||
|
||||
public class StoreApi {
|
||||
String basePath = "http://petstore.swagger.wordnik.com/api";
|
||||
ApiInvoker apiInvoker = ApiInvoker.getInstance();
|
||||
|
||||
public void addHeader(String key, String value) {
|
||||
getInvoker().addDefaultHeader(key, value);
|
||||
}
|
||||
|
||||
public ApiInvoker getInvoker() {
|
||||
return apiInvoker;
|
||||
}
|
||||
|
||||
public void setBasePath(String basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
|
||||
public String getBasePath() {
|
||||
return basePath;
|
||||
}
|
||||
|
||||
public Order getOrderById (String orderId) throws ApiException {
|
||||
// verify required params are set
|
||||
if(orderId == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
// create path and map variables
|
||||
String path = "/store/order/{orderId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "orderId" + "\\}", apiInvoker.escapeString(orderId.toString()));
|
||||
|
||||
// query params
|
||||
Map<String, String> queryParams = new HashMap<String, String>();
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
|
||||
String contentType = "application/json";
|
||||
|
||||
try {
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams, contentType);
|
||||
if(response != null){
|
||||
return (Order) ApiInvoker.deserialize(response, "", Order.class);
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.getCode() == 404) {
|
||||
return null;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
public void deleteOrder (String orderId) throws ApiException {
|
||||
// verify required params are set
|
||||
if(orderId == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
// create path and map variables
|
||||
String path = "/store/order/{orderId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "orderId" + "\\}", apiInvoker.escapeString(orderId.toString()));
|
||||
|
||||
// query params
|
||||
Map<String, String> queryParams = new HashMap<String, String>();
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
|
||||
String contentType = "application/json";
|
||||
|
||||
try {
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "DELETE", queryParams, null, headerParams, contentType);
|
||||
if(response != null){
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
return ;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.getCode() == 404) {
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
public void placeOrder (Order body) throws ApiException {
|
||||
// verify required params are set
|
||||
if(body == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
// create path and map variables
|
||||
String path = "/store/order".replaceAll("\\{format\\}","json");
|
||||
|
||||
// query params
|
||||
Map<String, String> queryParams = new HashMap<String, String>();
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
|
||||
String contentType = "application/json";
|
||||
|
||||
try {
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, body, headerParams, contentType);
|
||||
if(response != null){
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
return ;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.getCode() == 404) {
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,277 @@
|
||||
package com.wordnik.petstore.api;
|
||||
|
||||
import com.wordnik.client.ApiException;
|
||||
import com.wordnik.client.ApiInvoker;
|
||||
import com.wordnik.petstore.model.User;
|
||||
import java.util.*;
|
||||
|
||||
public class UserApi {
|
||||
String basePath = "http://petstore.swagger.wordnik.com/api";
|
||||
ApiInvoker apiInvoker = ApiInvoker.getInstance();
|
||||
|
||||
public void addHeader(String key, String value) {
|
||||
getInvoker().addDefaultHeader(key, value);
|
||||
}
|
||||
|
||||
public ApiInvoker getInvoker() {
|
||||
return apiInvoker;
|
||||
}
|
||||
|
||||
public void setBasePath(String basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
|
||||
public String getBasePath() {
|
||||
return basePath;
|
||||
}
|
||||
|
||||
public void createUser (User body) throws ApiException {
|
||||
// verify required params are set
|
||||
if(body == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
// create path and map variables
|
||||
String path = "/user".replaceAll("\\{format\\}","json");
|
||||
|
||||
// query params
|
||||
Map<String, String> queryParams = new HashMap<String, String>();
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
|
||||
String contentType = "application/json";
|
||||
|
||||
try {
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, body, headerParams, contentType);
|
||||
if(response != null){
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
return ;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.getCode() == 404) {
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
public void createUsersWithArrayInput (List<User> body) throws ApiException {
|
||||
// verify required params are set
|
||||
if(body == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
// create path and map variables
|
||||
String path = "/user/createWithArray".replaceAll("\\{format\\}","json");
|
||||
|
||||
// query params
|
||||
Map<String, String> queryParams = new HashMap<String, String>();
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
|
||||
String contentType = "application/json";
|
||||
|
||||
try {
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, body, headerParams, contentType);
|
||||
if(response != null){
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
return ;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.getCode() == 404) {
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
public void createUsersWithListInput (List<User> body) throws ApiException {
|
||||
// verify required params are set
|
||||
if(body == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
// create path and map variables
|
||||
String path = "/user/createWithList".replaceAll("\\{format\\}","json");
|
||||
|
||||
// query params
|
||||
Map<String, String> queryParams = new HashMap<String, String>();
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
|
||||
String contentType = "application/json";
|
||||
|
||||
try {
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, body, headerParams, contentType);
|
||||
if(response != null){
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
return ;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.getCode() == 404) {
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
public void updateUser (String username, User body) throws ApiException {
|
||||
// verify required params are set
|
||||
if(username == null || body == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
// create path and map variables
|
||||
String path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString()));
|
||||
|
||||
// query params
|
||||
Map<String, String> queryParams = new HashMap<String, String>();
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
|
||||
String contentType = "application/json";
|
||||
|
||||
try {
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "PUT", queryParams, body, headerParams, contentType);
|
||||
if(response != null){
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
return ;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.getCode() == 404) {
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
public void deleteUser (String username) throws ApiException {
|
||||
// verify required params are set
|
||||
if(username == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
// create path and map variables
|
||||
String path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString()));
|
||||
|
||||
// query params
|
||||
Map<String, String> queryParams = new HashMap<String, String>();
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
|
||||
String contentType = "application/json";
|
||||
|
||||
try {
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "DELETE", queryParams, null, headerParams, contentType);
|
||||
if(response != null){
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
return ;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.getCode() == 404) {
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
public User getUserByName (String username) throws ApiException {
|
||||
// verify required params are set
|
||||
if(username == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
// create path and map variables
|
||||
String path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString()));
|
||||
|
||||
// query params
|
||||
Map<String, String> queryParams = new HashMap<String, String>();
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
|
||||
String contentType = "application/json";
|
||||
|
||||
try {
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams, contentType);
|
||||
if(response != null){
|
||||
return (User) ApiInvoker.deserialize(response, "", User.class);
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.getCode() == 404) {
|
||||
return null;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
public String loginUser (String username, String password) throws ApiException {
|
||||
// verify required params are set
|
||||
if(username == null || password == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
// create path and map variables
|
||||
String path = "/user/login".replaceAll("\\{format\\}","json");
|
||||
|
||||
// query params
|
||||
Map<String, String> queryParams = new HashMap<String, String>();
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
|
||||
if(!"null".equals(String.valueOf(username)))
|
||||
queryParams.put("username", String.valueOf(username));
|
||||
if(!"null".equals(String.valueOf(password)))
|
||||
queryParams.put("password", String.valueOf(password));
|
||||
String contentType = "application/json";
|
||||
|
||||
try {
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams, contentType);
|
||||
if(response != null){
|
||||
return (String) ApiInvoker.deserialize(response, "", String.class);
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.getCode() == 404) {
|
||||
return null;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
public void logoutUser () throws ApiException {
|
||||
// create path and map variables
|
||||
String path = "/user/logout".replaceAll("\\{format\\}","json");
|
||||
|
||||
// query params
|
||||
Map<String, String> queryParams = new HashMap<String, String>();
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
|
||||
String contentType = "application/json";
|
||||
|
||||
try {
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams, contentType);
|
||||
if(response != null){
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
return ;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.getCode() == 404) {
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.wordnik.petstore.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
public class Category {
|
||||
/* Category unique identifier */
|
||||
@JsonProperty("id")
|
||||
private Long id = null;
|
||||
/* Name of the category */
|
||||
@JsonProperty("name")
|
||||
private String name = null;
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Category {\n");
|
||||
sb.append(" id: ").append(id).append("\n");
|
||||
sb.append(" name: ").append(name).append("\n");
|
||||
sb.append("}\n");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.wordnik.petstore.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import java.util.Date;
|
||||
public class Order {
|
||||
/* Unique identifier for the order */
|
||||
@JsonProperty("id")
|
||||
private Long id = null;
|
||||
/* ID of pet being ordered */
|
||||
@JsonProperty("petId")
|
||||
private Long petId = null;
|
||||
/* Number of pets ordered */
|
||||
@JsonProperty("quantity")
|
||||
private Integer quantity = null;
|
||||
/* Status of the order */
|
||||
@JsonProperty("status")
|
||||
private String status = null;
|
||||
/* Date shipped, only if it has been */
|
||||
@JsonProperty("shipDate")
|
||||
private Date shipDate = null;
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getPetId() {
|
||||
return petId;
|
||||
}
|
||||
public void setPetId(Long petId) {
|
||||
this.petId = petId;
|
||||
}
|
||||
|
||||
public Integer getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
public void setQuantity(Integer quantity) {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Date getShipDate() {
|
||||
return shipDate;
|
||||
}
|
||||
public void setShipDate(Date shipDate) {
|
||||
this.shipDate = shipDate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Order {\n");
|
||||
sb.append(" id: ").append(id).append("\n");
|
||||
sb.append(" petId: ").append(petId).append("\n");
|
||||
sb.append(" quantity: ").append(quantity).append("\n");
|
||||
sb.append(" status: ").append(status).append("\n");
|
||||
sb.append(" shipDate: ").append(shipDate).append("\n");
|
||||
sb.append("}\n");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
package com.wordnik.petstore.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import java.util.*;
|
||||
import com.wordnik.petstore.model.Category;
|
||||
import com.wordnik.petstore.model.Tag;
|
||||
public class Pet {
|
||||
/* Unique identifier for the Pet */
|
||||
@JsonProperty("id")
|
||||
private Long id = null;
|
||||
/* Category the pet is in */
|
||||
@JsonProperty("category")
|
||||
private Category category = null;
|
||||
/* Friendly name of the pet */
|
||||
@JsonProperty("name")
|
||||
private String name = null;
|
||||
/* Image URLs */
|
||||
@JsonProperty("photoUrls")
|
||||
private List<String> photoUrls = new ArrayList<String>();
|
||||
/* Tags assigned to this pet */
|
||||
@JsonProperty("tags")
|
||||
private List<Tag> tags = new ArrayList<Tag>();
|
||||
/* pet status in the store */
|
||||
@JsonProperty("status")
|
||||
private String status = null;
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Category getCategory() {
|
||||
return category;
|
||||
}
|
||||
public void setCategory(Category category) {
|
||||
this.category = category;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public List<String> getPhotoUrls() {
|
||||
return photoUrls;
|
||||
}
|
||||
public void setPhotoUrls(List<String> photoUrls) {
|
||||
this.photoUrls = photoUrls;
|
||||
}
|
||||
|
||||
public List<Tag> getTags() {
|
||||
return tags;
|
||||
}
|
||||
public void setTags(List<Tag> tags) {
|
||||
this.tags = tags;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Pet {\n");
|
||||
sb.append(" id: ").append(id).append("\n");
|
||||
sb.append(" category: ").append(category).append("\n");
|
||||
sb.append(" name: ").append(name).append("\n");
|
||||
sb.append(" photoUrls: ").append(photoUrls).append("\n");
|
||||
sb.append(" tags: ").append(tags).append("\n");
|
||||
sb.append(" status: ").append(status).append("\n");
|
||||
sb.append("}\n");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.wordnik.petstore.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
public class Tag {
|
||||
/* Unique identifier for the tag */
|
||||
@JsonProperty("id")
|
||||
private Long id = null;
|
||||
/* Friendly name for the tag */
|
||||
@JsonProperty("name")
|
||||
private String name = null;
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Tag {\n");
|
||||
sb.append(" id: ").append(id).append("\n");
|
||||
sb.append(" name: ").append(name).append("\n");
|
||||
sb.append("}\n");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
package com.wordnik.petstore.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
public class User {
|
||||
/* Unique identifier for the user */
|
||||
@JsonProperty("id")
|
||||
private Long id = null;
|
||||
/* Unique username */
|
||||
@JsonProperty("username")
|
||||
private String username = null;
|
||||
/* First name of the user */
|
||||
@JsonProperty("firstName")
|
||||
private String firstName = null;
|
||||
/* Last name of the user */
|
||||
@JsonProperty("lastName")
|
||||
private String lastName = null;
|
||||
/* Email address of the user */
|
||||
@JsonProperty("email")
|
||||
private String email = null;
|
||||
/* Password name of the user */
|
||||
@JsonProperty("password")
|
||||
private String password = null;
|
||||
/* Phone number of the user */
|
||||
@JsonProperty("phone")
|
||||
private String phone = null;
|
||||
/* User Status */
|
||||
@JsonProperty("userStatus")
|
||||
private Integer userStatus = null;
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getFirstName() {
|
||||
return firstName;
|
||||
}
|
||||
public void setFirstName(String firstName) {
|
||||
this.firstName = firstName;
|
||||
}
|
||||
|
||||
public String getLastName() {
|
||||
return lastName;
|
||||
}
|
||||
public void setLastName(String lastName) {
|
||||
this.lastName = lastName;
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
}
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public Integer getUserStatus() {
|
||||
return userStatus;
|
||||
}
|
||||
public void setUserStatus(Integer userStatus) {
|
||||
this.userStatus = userStatus;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class User {\n");
|
||||
sb.append(" id: ").append(id).append("\n");
|
||||
sb.append(" username: ").append(username).append("\n");
|
||||
sb.append(" firstName: ").append(firstName).append("\n");
|
||||
sb.append(" lastName: ").append(lastName).append("\n");
|
||||
sb.append(" email: ").append(email).append("\n");
|
||||
sb.append(" password: ").append(password).append("\n");
|
||||
sb.append(" phone: ").append(phone).append("\n");
|
||||
sb.append(" userStatus: ").append(userStatus).append("\n");
|
||||
sb.append("}\n");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
||||
45
samples/client/petstore/csharp/CSharpPetstoreCodegen.scala
Normal file
45
samples/client/petstore/csharp/CSharpPetstoreCodegen.scala
Normal file
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* Copyright 2012 Wordnik, Inc.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
import com.wordnik.swagger.codegen.BasicCSharpGenerator
|
||||
|
||||
object CSharpPetstoreCodegen extends BasicCSharpGenerator {
|
||||
def main(args: Array[String]) = generateClient(args)
|
||||
|
||||
// location of templates
|
||||
override def templateDir = "csharp"
|
||||
|
||||
// where to write generated code
|
||||
override def destinationDir = "samples/client/petstore/csharp/src"
|
||||
|
||||
// package for api invoker, error files
|
||||
override def invokerPackage = Some("Com.Wordnik.Petstore")
|
||||
|
||||
// package for models
|
||||
override def modelPackage = Some("Com.Wordnik.Petstore.Model")
|
||||
|
||||
// package for api classes
|
||||
override def apiPackage = Some("Com.Wordnik.Petstore.Api")
|
||||
|
||||
// supporting classes
|
||||
override def supportingFiles =
|
||||
List(
|
||||
("apiInvoker.mustache", destinationDir + java.io.File.separator + invokerPackage.get.replace(".", java.io.File.separator) + java.io.File.separator, "ApiInvoker.cs"),
|
||||
("apiException.mustache", destinationDir + java.io.File.separator + invokerPackage.get.replace(".", java.io.File.separator) + java.io.File.separator, "ApiException.cs"),
|
||||
("Newtonsoft.Json.dll", "samples/client/petstore/csharp/bin", "Newtonsoft.Json.dll"),
|
||||
("compile.mustache", "samples/client/petstore/csharp", "compile.bat"))
|
||||
}
|
||||
|
||||
BIN
samples/client/petstore/csharp/bin/Com.Wordnik.Petstore.dll
Normal file
BIN
samples/client/petstore/csharp/bin/Com.Wordnik.Petstore.dll
Normal file
Binary file not shown.
BIN
samples/client/petstore/csharp/bin/Newtonsoft.Json.dll
Normal file
BIN
samples/client/petstore/csharp/bin/Newtonsoft.Json.dll
Normal file
Binary file not shown.
2
samples/client/petstore/csharp/compile.bat
Normal file
2
samples/client/petstore/csharp/compile.bat
Normal file
@@ -0,0 +1,2 @@
|
||||
SET CSCPATH=%SYSTEMROOT%\Microsoft.NET\Framework\v4.0.30319
|
||||
%CSCPATH%\csc /reference:bin/Newtonsoft.Json.dll /target:library /out:bin/Com.Wordnik.Petstore.dll /recurse:src\*.cs /doc:bin/Com.Wordnik.Petstore.xml
|
||||
@@ -0,0 +1,348 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Com.Wordnik.Petstore;
|
||||
using Com.Wordnik.Petstore.Model;
|
||||
namespace Com.Wordnik.Petstore.Api {
|
||||
public class PetApi {
|
||||
string basePath = "http://petstore.swagger.wordnik.com/api";
|
||||
private readonly ApiInvoker apiInvoker = ApiInvoker.GetInstance();
|
||||
|
||||
public ApiInvoker getInvoker() {
|
||||
return apiInvoker;
|
||||
}
|
||||
|
||||
// Sets the endpoint base url for the services being accessed
|
||||
public void setBasePath(string basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
|
||||
// Gets the endpoint base url for the services being accessed
|
||||
public String getBasePath() {
|
||||
return basePath;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// uploads an image
|
||||
/// </summary>
|
||||
/// <param name="additionalMetadata">Additional data to pass to server</param>
|
||||
/// <param name="body">file to upload</param>
|
||||
/// <returns></returns>
|
||||
public void uploadFile (string additionalMetadata, File body) {
|
||||
// create path and map variables
|
||||
var path = "/pet/uploadImage".Replace("{format}","json");
|
||||
|
||||
// query params
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
|
||||
string paramStr = null;
|
||||
try {
|
||||
var response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, body, headerParams);
|
||||
if(response != null){
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
return ;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.ErrorCode == 404) {
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Find pet by ID Returns a pet based on ID
|
||||
/// </summary>
|
||||
/// <param name="petId">ID of pet that needs to be fetched</param>
|
||||
/// <returns></returns>
|
||||
public Pet getPetById (long petId) {
|
||||
// create path and map variables
|
||||
var path = "/pet/{petId}".Replace("{format}","json").Replace("{" + "petId" + "}", apiInvoker.escapeString(petId.ToString()));
|
||||
|
||||
// query params
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
|
||||
// verify required params are set
|
||||
if (petId == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
string paramStr = null;
|
||||
try {
|
||||
var response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams);
|
||||
if(response != null){
|
||||
return (Pet) ApiInvoker.deserialize(response, typeof(Pet));
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.ErrorCode == 404) {
|
||||
return null;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Deletes a pet
|
||||
/// </summary>
|
||||
/// <param name="petId">Pet id to delete</param>
|
||||
/// <returns></returns>
|
||||
public void deletePet (string petId) {
|
||||
// create path and map variables
|
||||
var path = "/pet/{petId}".Replace("{format}","json").Replace("{" + "petId" + "}", apiInvoker.escapeString(petId.ToString()));
|
||||
|
||||
// query params
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
|
||||
// verify required params are set
|
||||
if (petId == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
string paramStr = null;
|
||||
try {
|
||||
var response = apiInvoker.invokeAPI(basePath, path, "DELETE", queryParams, null, headerParams);
|
||||
if(response != null){
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
return ;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.ErrorCode == 404) {
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// partial updates to a pet
|
||||
/// </summary>
|
||||
/// <param name="petId">ID of pet that needs to be fetched</param>
|
||||
/// <param name="body">Pet object that needs to be added to the store</param>
|
||||
/// <returns></returns>
|
||||
public List<Pet> partialUpdate (string petId, Pet body) {
|
||||
// create path and map variables
|
||||
var path = "/pet/{petId}".Replace("{format}","json").Replace("{" + "petId" + "}", apiInvoker.escapeString(petId.ToString()));
|
||||
|
||||
// query params
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
|
||||
// verify required params are set
|
||||
if (petId == null || body == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
string paramStr = null;
|
||||
try {
|
||||
var response = apiInvoker.invokeAPI(basePath, path, "PATCH", queryParams, body, headerParams);
|
||||
if(response != null){
|
||||
return (List<Pet>) ApiInvoker.deserialize(response, typeof(List<Pet>));
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.ErrorCode == 404) {
|
||||
return null;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Updates a pet in the store with form data
|
||||
/// </summary>
|
||||
/// <param name="petId">ID of pet that needs to be updated</param>
|
||||
/// <param name="name">Updated name of the pet</param>
|
||||
/// <param name="status">Updated status of the pet</param>
|
||||
/// <returns></returns>
|
||||
public void updatePetWithForm (string petId, string name, string status) {
|
||||
// create path and map variables
|
||||
var path = "/pet/{petId}".Replace("{format}","json").Replace("{" + "petId" + "}", apiInvoker.escapeString(petId.ToString()));
|
||||
|
||||
// query params
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
|
||||
// verify required params are set
|
||||
if (petId == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
string paramStr = null;
|
||||
try {
|
||||
var response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, null, headerParams);
|
||||
if(response != null){
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
return ;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.ErrorCode == 404) {
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Add a new pet to the store
|
||||
/// </summary>
|
||||
/// <param name="body">Pet object that needs to be added to the store</param>
|
||||
/// <returns></returns>
|
||||
public void addPet (Pet body) {
|
||||
// create path and map variables
|
||||
var path = "/pet".Replace("{format}","json");
|
||||
|
||||
// query params
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
|
||||
// verify required params are set
|
||||
if (body == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
string paramStr = null;
|
||||
try {
|
||||
var response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, body, headerParams);
|
||||
if(response != null){
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
return ;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.ErrorCode == 404) {
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Update an existing pet
|
||||
/// </summary>
|
||||
/// <param name="body">Pet object that needs to be updated in the store</param>
|
||||
/// <returns></returns>
|
||||
public void updatePet (Pet body) {
|
||||
// create path and map variables
|
||||
var path = "/pet".Replace("{format}","json");
|
||||
|
||||
// query params
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
|
||||
// verify required params are set
|
||||
if (body == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
string paramStr = null;
|
||||
try {
|
||||
var response = apiInvoker.invokeAPI(basePath, path, "PUT", queryParams, body, headerParams);
|
||||
if(response != null){
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
return ;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.ErrorCode == 404) {
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Finds Pets by status Multiple status values can be provided with comma seperated strings
|
||||
/// </summary>
|
||||
/// <param name="status">Status values that need to be considered for filter</param>
|
||||
/// <returns></returns>
|
||||
public List<Pet> findPetsByStatus (string status) {
|
||||
// create path and map variables
|
||||
var path = "/pet/findByStatus".Replace("{format}","json");
|
||||
|
||||
// query params
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
|
||||
// verify required params are set
|
||||
if (status == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
string paramStr = null;
|
||||
if (status != null){
|
||||
paramStr = (status != null && status is DateTime) ? ((DateTime)(object)status).ToString("u") : Convert.ToString(status);
|
||||
queryParams.Add("status", paramStr);
|
||||
}
|
||||
try {
|
||||
var response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams);
|
||||
if(response != null){
|
||||
return (List<Pet>) ApiInvoker.deserialize(response, typeof(List<Pet>));
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.ErrorCode == 404) {
|
||||
return null;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Finds Pets by tags Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
||||
/// </summary>
|
||||
/// <param name="tags">Tags to filter by</param>
|
||||
/// <returns></returns>
|
||||
public List<Pet> findPetsByTags (string tags) {
|
||||
// create path and map variables
|
||||
var path = "/pet/findByTags".Replace("{format}","json");
|
||||
|
||||
// query params
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
|
||||
// verify required params are set
|
||||
if (tags == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
string paramStr = null;
|
||||
if (tags != null){
|
||||
paramStr = (tags != null && tags is DateTime) ? ((DateTime)(object)tags).ToString("u") : Convert.ToString(tags);
|
||||
queryParams.Add("tags", paramStr);
|
||||
}
|
||||
try {
|
||||
var response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams);
|
||||
if(response != null){
|
||||
return (List<Pet>) ApiInvoker.deserialize(response, typeof(List<Pet>));
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.ErrorCode == 404) {
|
||||
return null;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,130 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Com.Wordnik.Petstore;
|
||||
using Com.Wordnik.Petstore.Model;
|
||||
namespace Com.Wordnik.Petstore.Api {
|
||||
public class StoreApi {
|
||||
string basePath = "http://petstore.swagger.wordnik.com/api";
|
||||
private readonly ApiInvoker apiInvoker = ApiInvoker.GetInstance();
|
||||
|
||||
public ApiInvoker getInvoker() {
|
||||
return apiInvoker;
|
||||
}
|
||||
|
||||
// Sets the endpoint base url for the services being accessed
|
||||
public void setBasePath(string basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
|
||||
// Gets the endpoint base url for the services being accessed
|
||||
public String getBasePath() {
|
||||
return basePath;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
/// </summary>
|
||||
/// <param name="orderId">ID of the order that needs to be deleted</param>
|
||||
/// <returns></returns>
|
||||
public void deleteOrder (string orderId) {
|
||||
// create path and map variables
|
||||
var path = "/store/order/{orderId}".Replace("{format}","json").Replace("{" + "orderId" + "}", apiInvoker.escapeString(orderId.ToString()));
|
||||
|
||||
// query params
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
|
||||
// verify required params are set
|
||||
if (orderId == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
string paramStr = null;
|
||||
try {
|
||||
var response = apiInvoker.invokeAPI(basePath, path, "DELETE", queryParams, null, headerParams);
|
||||
if(response != null){
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
return ;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.ErrorCode == 404) {
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Find purchase order by ID For valid response try integer IDs with value <= 5. Anything above 5 or nonintegers will generate API errors
|
||||
/// </summary>
|
||||
/// <param name="orderId">ID of pet that needs to be fetched</param>
|
||||
/// <returns></returns>
|
||||
public Order getOrderById (string orderId) {
|
||||
// create path and map variables
|
||||
var path = "/store/order/{orderId}".Replace("{format}","json").Replace("{" + "orderId" + "}", apiInvoker.escapeString(orderId.ToString()));
|
||||
|
||||
// query params
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
|
||||
// verify required params are set
|
||||
if (orderId == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
string paramStr = null;
|
||||
try {
|
||||
var response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams);
|
||||
if(response != null){
|
||||
return (Order) ApiInvoker.deserialize(response, typeof(Order));
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.ErrorCode == 404) {
|
||||
return null;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Place an order for a pet
|
||||
/// </summary>
|
||||
/// <param name="body">order placed for purchasing the pet</param>
|
||||
/// <returns></returns>
|
||||
public void placeOrder (Order body) {
|
||||
// create path and map variables
|
||||
var path = "/store/order".Replace("{format}","json");
|
||||
|
||||
// query params
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
|
||||
// verify required params are set
|
||||
if (body == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
string paramStr = null;
|
||||
try {
|
||||
var response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, body, headerParams);
|
||||
if(response != null){
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
return ;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.ErrorCode == 404) {
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,310 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Com.Wordnik.Petstore;
|
||||
using Com.Wordnik.Petstore.Model;
|
||||
namespace Com.Wordnik.Petstore.Api {
|
||||
public class UserApi {
|
||||
string basePath = "http://petstore.swagger.wordnik.com/api";
|
||||
private readonly ApiInvoker apiInvoker = ApiInvoker.GetInstance();
|
||||
|
||||
public ApiInvoker getInvoker() {
|
||||
return apiInvoker;
|
||||
}
|
||||
|
||||
// Sets the endpoint base url for the services being accessed
|
||||
public void setBasePath(string basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
|
||||
// Gets the endpoint base url for the services being accessed
|
||||
public String getBasePath() {
|
||||
return basePath;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete user This can only be done by the logged in user.
|
||||
/// </summary>
|
||||
/// <param name="username">The name that needs to be deleted</param>
|
||||
/// <returns></returns>
|
||||
public void deleteUser (string username) {
|
||||
// create path and map variables
|
||||
var path = "/user/{username}".Replace("{format}","json").Replace("{" + "username" + "}", apiInvoker.escapeString(username.ToString()));
|
||||
|
||||
// query params
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
|
||||
// verify required params are set
|
||||
if (username == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
string paramStr = null;
|
||||
try {
|
||||
var response = apiInvoker.invokeAPI(basePath, path, "DELETE", queryParams, null, headerParams);
|
||||
if(response != null){
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
return ;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.ErrorCode == 404) {
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Get user by user name
|
||||
/// </summary>
|
||||
/// <param name="username">The name that needs to be fetched. Use user1 for testing.</param>
|
||||
/// <returns></returns>
|
||||
public User getUserByName (string username) {
|
||||
// create path and map variables
|
||||
var path = "/user/{username}".Replace("{format}","json").Replace("{" + "username" + "}", apiInvoker.escapeString(username.ToString()));
|
||||
|
||||
// query params
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
|
||||
// verify required params are set
|
||||
if (username == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
string paramStr = null;
|
||||
try {
|
||||
var response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams);
|
||||
if(response != null){
|
||||
return (User) ApiInvoker.deserialize(response, typeof(User));
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.ErrorCode == 404) {
|
||||
return null;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Updated user This can only be done by the logged in user.
|
||||
/// </summary>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="body">Updated user object</param>
|
||||
/// <returns></returns>
|
||||
public void updateUser (string username, User body) {
|
||||
// create path and map variables
|
||||
var path = "/user/{username}".Replace("{format}","json").Replace("{" + "username" + "}", apiInvoker.escapeString(username.ToString()));
|
||||
|
||||
// query params
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
|
||||
// verify required params are set
|
||||
if (username == null || body == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
string paramStr = null;
|
||||
try {
|
||||
var response = apiInvoker.invokeAPI(basePath, path, "PUT", queryParams, body, headerParams);
|
||||
if(response != null){
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
return ;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.ErrorCode == 404) {
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Logs user into the system
|
||||
/// </summary>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <returns></returns>
|
||||
public string loginUser (string username, string password) {
|
||||
// create path and map variables
|
||||
var path = "/user/login".Replace("{format}","json");
|
||||
|
||||
// query params
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
|
||||
// verify required params are set
|
||||
if (username == null || password == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
string paramStr = null;
|
||||
if (username != null){
|
||||
paramStr = (username != null && username is DateTime) ? ((DateTime)(object)username).ToString("u") : Convert.ToString(username);
|
||||
queryParams.Add("username", paramStr);
|
||||
}
|
||||
if (password != null){
|
||||
paramStr = (password != null && password is DateTime) ? ((DateTime)(object)password).ToString("u") : Convert.ToString(password);
|
||||
queryParams.Add("password", paramStr);
|
||||
}
|
||||
try {
|
||||
var response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams);
|
||||
if(response != null){
|
||||
return (string) ApiInvoker.deserialize(response, typeof(string));
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.ErrorCode == 404) {
|
||||
return null;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Logs out current logged in user session
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public void logoutUser () {
|
||||
// create path and map variables
|
||||
var path = "/user/logout".Replace("{format}","json");
|
||||
|
||||
// query params
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
|
||||
string paramStr = null;
|
||||
try {
|
||||
var response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams);
|
||||
if(response != null){
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
return ;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.ErrorCode == 404) {
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Create user This can only be done by the logged in user.
|
||||
/// </summary>
|
||||
/// <param name="body">Created user object</param>
|
||||
/// <returns></returns>
|
||||
public void createUser (User body) {
|
||||
// create path and map variables
|
||||
var path = "/user".Replace("{format}","json");
|
||||
|
||||
// query params
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
|
||||
// verify required params are set
|
||||
if (body == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
string paramStr = null;
|
||||
try {
|
||||
var response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, body, headerParams);
|
||||
if(response != null){
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
return ;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.ErrorCode == 404) {
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Creates list of users with given input array
|
||||
/// </summary>
|
||||
/// <param name="body">List of user object</param>
|
||||
/// <returns></returns>
|
||||
public void createUsersWithArrayInput (List<User> body) {
|
||||
// create path and map variables
|
||||
var path = "/user/createWithArray".Replace("{format}","json");
|
||||
|
||||
// query params
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
|
||||
// verify required params are set
|
||||
if (body == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
string paramStr = null;
|
||||
try {
|
||||
var response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, body, headerParams);
|
||||
if(response != null){
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
return ;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.ErrorCode == 404) {
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Creates list of users with given list input
|
||||
/// </summary>
|
||||
/// <param name="body">List of user object</param>
|
||||
/// <returns></returns>
|
||||
public void createUsersWithListInput (List<User> body) {
|
||||
// create path and map variables
|
||||
var path = "/user/createWithList".Replace("{format}","json");
|
||||
|
||||
// query params
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
|
||||
// verify required params are set
|
||||
if (body == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
string paramStr = null;
|
||||
try {
|
||||
var response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, body, headerParams);
|
||||
if(response != null){
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
return ;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.ErrorCode == 404) {
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
|
||||
namespace Com.Wordnik.Petstore {
|
||||
public class ApiException : Exception {
|
||||
|
||||
private int errorCode = 0;
|
||||
|
||||
public ApiException() {}
|
||||
|
||||
public int ErrorCode {
|
||||
get
|
||||
{
|
||||
return errorCode;
|
||||
}
|
||||
}
|
||||
|
||||
public ApiException(int errorCode, string message) : base(message) {
|
||||
this.errorCode = errorCode;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Com.Wordnik.Petstore {
|
||||
public class ApiInvoker {
|
||||
private static readonly ApiInvoker _instance = new ApiInvoker();
|
||||
private Dictionary<String, String> defaultHeaderMap = new Dictionary<String, String>();
|
||||
|
||||
public static ApiInvoker GetInstance() {
|
||||
return _instance;
|
||||
}
|
||||
|
||||
public void addDefaultHeader(string key, string value) {
|
||||
defaultHeaderMap.Add(key, value);
|
||||
}
|
||||
|
||||
public string escapeString(string str) {
|
||||
return str;
|
||||
}
|
||||
|
||||
public static object deserialize(string json, Type type) {
|
||||
try
|
||||
{
|
||||
return JsonConvert.DeserializeObject(json, type);
|
||||
}
|
||||
catch (IOException e) {
|
||||
throw new ApiException(500, e.Message);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static string serialize(object obj) {
|
||||
try
|
||||
{
|
||||
return obj != null ? JsonConvert.SerializeObject(obj) : null;
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new ApiException(500, e.Message);
|
||||
}
|
||||
}
|
||||
|
||||
public string invokeAPI(string host, string path, string method, Dictionary<String, String> queryParams, object body, Dictionary<String, String> headerParams) {
|
||||
var b = new StringBuilder();
|
||||
|
||||
foreach (var queryParamItem in queryParams)
|
||||
{
|
||||
var value = queryParamItem.Value;
|
||||
if (value == null) continue;
|
||||
b.Append(b.ToString().Length == 0 ? "?" : "&");
|
||||
b.Append(escapeString(queryParamItem.Key)).Append("=").Append(escapeString(value));
|
||||
}
|
||||
|
||||
var querystring = b.ToString();
|
||||
|
||||
host = host.EndsWith("/") ? host.Substring(0, host.Length - 1) : host;
|
||||
|
||||
var client = WebRequest.Create(host + path + querystring);
|
||||
client.ContentType = "application/json";
|
||||
|
||||
foreach (var headerParamsItem in headerParams)
|
||||
{
|
||||
client.Headers.Add(headerParamsItem.Key, headerParamsItem.Value);
|
||||
}
|
||||
foreach (var defaultHeaderMapItem in defaultHeaderMap.Where(defaultHeaderMapItem => !headerParams.ContainsKey(defaultHeaderMapItem.Key)))
|
||||
{
|
||||
client.Headers.Add(defaultHeaderMapItem.Key, defaultHeaderMapItem.Value);
|
||||
}
|
||||
|
||||
switch (method)
|
||||
{
|
||||
case "GET":
|
||||
break;
|
||||
case "POST":
|
||||
case "PUT":
|
||||
case "DELETE":
|
||||
var swRequestWriter = new StreamWriter(client.GetRequestStream());
|
||||
swRequestWriter.Write(serialize(body));
|
||||
swRequestWriter.Close();
|
||||
break;
|
||||
default:
|
||||
throw new ApiException(500, "unknown method type " + method);
|
||||
}
|
||||
var webResponse = (HttpWebResponse) client.GetResponse();
|
||||
if (webResponse.StatusCode != HttpStatusCode.OK) throw new ApiException((int) webResponse.StatusCode, webResponse.StatusDescription);
|
||||
|
||||
var responseReader = new StreamReader(webResponse.GetResponseStream());
|
||||
var responseData = responseReader.ReadToEnd();
|
||||
responseReader.Close();
|
||||
return responseData;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Com.Wordnik.Petstore.Model {
|
||||
public class Category {
|
||||
public long id { get; set; }
|
||||
|
||||
public string name { get; set; }
|
||||
|
||||
public override string ToString() {
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class Category {\n");
|
||||
sb.Append(" id: ").Append(id).Append("\n");
|
||||
sb.Append(" name: ").Append(name).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Com.Wordnik.Petstore.Model {
|
||||
public class Order {
|
||||
public long id { get; set; }
|
||||
|
||||
public long petId { get; set; }
|
||||
|
||||
public int quantity { get; set; }
|
||||
|
||||
/* Order Status */
|
||||
public string status { get; set; }
|
||||
|
||||
public DateTime shipDate { get; set; }
|
||||
|
||||
public override string ToString() {
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class Order {\n");
|
||||
sb.Append(" id: ").Append(id).Append("\n");
|
||||
sb.Append(" petId: ").Append(petId).Append("\n");
|
||||
sb.Append(" quantity: ").Append(quantity).Append("\n");
|
||||
sb.Append(" status: ").Append(status).Append("\n");
|
||||
sb.Append(" shipDate: ").Append(shipDate).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Com.Wordnik.Petstore.Model {
|
||||
public class Pet {
|
||||
/* unique identifier for the pet */
|
||||
public long id { get; set; }
|
||||
|
||||
public Category category { get; set; }
|
||||
|
||||
public string name { get; set; }
|
||||
|
||||
public List<string> photoUrls { get; set; }
|
||||
|
||||
public List<Tag> tags { get; set; }
|
||||
|
||||
/* pet status in the store */
|
||||
public string status { get; set; }
|
||||
|
||||
public override string ToString() {
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class Pet {\n");
|
||||
sb.Append(" id: ").Append(id).Append("\n");
|
||||
sb.Append(" category: ").Append(category).Append("\n");
|
||||
sb.Append(" name: ").Append(name).Append("\n");
|
||||
sb.Append(" photoUrls: ").Append(photoUrls).Append("\n");
|
||||
sb.Append(" tags: ").Append(tags).Append("\n");
|
||||
sb.Append(" status: ").Append(status).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Com.Wordnik.Petstore.Model {
|
||||
public class Tag {
|
||||
public long id { get; set; }
|
||||
|
||||
public string name { get; set; }
|
||||
|
||||
public override string ToString() {
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class Tag {\n");
|
||||
sb.Append(" id: ").Append(id).Append("\n");
|
||||
sb.Append(" name: ").Append(name).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Com.Wordnik.Petstore.Model {
|
||||
public class User {
|
||||
public long id { get; set; }
|
||||
|
||||
public string firstName { get; set; }
|
||||
|
||||
public string username { get; set; }
|
||||
|
||||
public string lastName { get; set; }
|
||||
|
||||
public string email { get; set; }
|
||||
|
||||
public string password { get; set; }
|
||||
|
||||
public string phone { get; set; }
|
||||
|
||||
/* User Status */
|
||||
public int userStatus { get; set; }
|
||||
|
||||
public override string ToString() {
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class User {\n");
|
||||
sb.Append(" id: ").Append(id).Append("\n");
|
||||
sb.Append(" firstName: ").Append(firstName).Append("\n");
|
||||
sb.Append(" username: ").Append(username).Append("\n");
|
||||
sb.Append(" lastName: ").Append(lastName).Append("\n");
|
||||
sb.Append(" email: ").Append(email).Append("\n");
|
||||
sb.Append(" password: ").Append(password).Append("\n");
|
||||
sb.Append(" phone: ").Append(phone).Append("\n");
|
||||
sb.Append(" userStatus: ").Append(userStatus).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,7 @@ import com.wordnik.swagger.common.ApiUserCredentials;
|
||||
import com.wordnik.swagger.event.Response;
|
||||
import com.wordnik.swagger.common.SwaggerApi;
|
||||
import com.wordnik.client.model.Pet;
|
||||
import com.wordnik.client.model.File;
|
||||
import mx.rpc.AsyncToken;
|
||||
import mx.utils.UIDUtil;
|
||||
import flash.utils.Dictionary;
|
||||
@@ -23,15 +24,19 @@ public class PetApi extends SwaggerApi {
|
||||
}
|
||||
|
||||
public static const event_getPetById: String = "getPetById";
|
||||
public static const event_deletePet: String = "deletePet";
|
||||
public static const event_partialUpdate: String = "partialUpdate";
|
||||
public static const event_updatePetWithForm: String = "updatePetWithForm";
|
||||
public static const event_uploadFile: String = "uploadFile";
|
||||
public static const event_addPet: String = "addPet";
|
||||
public static const event_updatePet: String = "updatePet";
|
||||
public static const event_findPetsByStatus: String = "findPetsByStatus";
|
||||
public static const event_findPetsByTags: String = "findPetsByTags";
|
||||
/*
|
||||
* Returns Pet */
|
||||
public function getPetById (petId: String): String {
|
||||
public function getPetById (petId: Number): String {
|
||||
// create path and map variables
|
||||
var path: String = "/pet.{format}/{petId}".replace(/{format}/g,"xml").replace("{" + "petId" + "}", getApiInvoker().escapeString(petId));
|
||||
var path: String = "/pet/{petId}".replace(/{format}/g,"xml").replace("{" + "petId" + "}", getApiInvoker().escapeString(petId));
|
||||
|
||||
// query params
|
||||
var queryParams: Dictionary = new Dictionary();
|
||||
@@ -51,12 +56,108 @@ public static const event_findPetsByTags: String = "findPetsByTags";
|
||||
token.returnType = Pet;
|
||||
return requestId;
|
||||
|
||||
}
|
||||
/*
|
||||
* Returns void */
|
||||
public function deletePet (petId: String): String {
|
||||
// create path and map variables
|
||||
var path: String = "/pet/{petId}".replace(/{format}/g,"xml").replace("{" + "petId" + "}", getApiInvoker().escapeString(petId));
|
||||
|
||||
// query params
|
||||
var queryParams: Dictionary = new Dictionary();
|
||||
var headerParams: Dictionary = new Dictionary();
|
||||
|
||||
// verify required params are set
|
||||
if(petId == null ) {
|
||||
throw new ApiError(400, "missing required params");
|
||||
}
|
||||
var token:AsyncToken = getApiInvoker().invokeAPI(path, "DELETE", queryParams, null, headerParams);
|
||||
|
||||
var requestId: String = getUniqueId();
|
||||
|
||||
token.requestId = requestId;
|
||||
token.completionEventType = "deletePet";
|
||||
|
||||
token.returnType = null ;
|
||||
return requestId;
|
||||
|
||||
}
|
||||
/*
|
||||
* Returns Array[Pet] */
|
||||
public function partialUpdate (petId: String, body: Pet): String {
|
||||
// create path and map variables
|
||||
var path: String = "/pet/{petId}".replace(/{format}/g,"xml").replace("{" + "petId" + "}", getApiInvoker().escapeString(petId));
|
||||
|
||||
// query params
|
||||
var queryParams: Dictionary = new Dictionary();
|
||||
var headerParams: Dictionary = new Dictionary();
|
||||
|
||||
// verify required params are set
|
||||
if(petId == null || body == null ) {
|
||||
throw new ApiError(400, "missing required params");
|
||||
}
|
||||
var token:AsyncToken = getApiInvoker().invokeAPI(path, "PATCH", queryParams, body, headerParams);
|
||||
|
||||
var requestId: String = getUniqueId();
|
||||
|
||||
token.requestId = requestId;
|
||||
token.completionEventType = "partialUpdate";
|
||||
|
||||
token.returnType = Array[Pet];
|
||||
return requestId;
|
||||
|
||||
}
|
||||
/*
|
||||
* Returns void */
|
||||
public function updatePetWithForm (petId: String, name: String, status: String): String {
|
||||
// create path and map variables
|
||||
var path: String = "/pet/{petId}".replace(/{format}/g,"xml").replace("{" + "petId" + "}", getApiInvoker().escapeString(petId));
|
||||
|
||||
// query params
|
||||
var queryParams: Dictionary = new Dictionary();
|
||||
var headerParams: Dictionary = new Dictionary();
|
||||
|
||||
// verify required params are set
|
||||
if(petId == null ) {
|
||||
throw new ApiError(400, "missing required params");
|
||||
}
|
||||
var token:AsyncToken = getApiInvoker().invokeAPI(path, "POST", queryParams, null, headerParams);
|
||||
|
||||
var requestId: String = getUniqueId();
|
||||
|
||||
token.requestId = requestId;
|
||||
token.completionEventType = "updatePetWithForm";
|
||||
|
||||
token.returnType = null ;
|
||||
return requestId;
|
||||
|
||||
}
|
||||
/*
|
||||
* Returns void */
|
||||
public function uploadFile (additionalMetadata: String, body: File): String {
|
||||
// create path and map variables
|
||||
var path: String = "/pet/uploadImage".replace(/{format}/g,"xml");
|
||||
|
||||
// query params
|
||||
var queryParams: Dictionary = new Dictionary();
|
||||
var headerParams: Dictionary = new Dictionary();
|
||||
|
||||
var token:AsyncToken = getApiInvoker().invokeAPI(path, "POST", queryParams, body, headerParams);
|
||||
|
||||
var requestId: String = getUniqueId();
|
||||
|
||||
token.requestId = requestId;
|
||||
token.completionEventType = "uploadFile";
|
||||
|
||||
token.returnType = null ;
|
||||
return requestId;
|
||||
|
||||
}
|
||||
/*
|
||||
* Returns void */
|
||||
public function addPet (body: Pet): String {
|
||||
// create path and map variables
|
||||
var path: String = "/pet.{format}".replace(/{format}/g,"xml");
|
||||
var path: String = "/pet".replace(/{format}/g,"xml");
|
||||
|
||||
// query params
|
||||
var queryParams: Dictionary = new Dictionary();
|
||||
@@ -81,7 +182,7 @@ public static const event_findPetsByTags: String = "findPetsByTags";
|
||||
* Returns void */
|
||||
public function updatePet (body: Pet): String {
|
||||
// create path and map variables
|
||||
var path: String = "/pet.{format}".replace(/{format}/g,"xml");
|
||||
var path: String = "/pet".replace(/{format}/g,"xml");
|
||||
|
||||
// query params
|
||||
var queryParams: Dictionary = new Dictionary();
|
||||
@@ -103,10 +204,10 @@ public static const event_findPetsByTags: String = "findPetsByTags";
|
||||
|
||||
}
|
||||
/*
|
||||
* Returns com.wordnik.client.model.PetList */
|
||||
* Returns Array[Pet] */
|
||||
public function findPetsByStatus (status: String= "available"): String {
|
||||
// create path and map variables
|
||||
var path: String = "/pet.{format}/findByStatus".replace(/{format}/g,"xml");
|
||||
var path: String = "/pet/findByStatus".replace(/{format}/g,"xml");
|
||||
|
||||
// query params
|
||||
var queryParams: Dictionary = new Dictionary();
|
||||
@@ -125,15 +226,15 @@ public static const event_findPetsByTags: String = "findPetsByTags";
|
||||
token.requestId = requestId;
|
||||
token.completionEventType = "findPetsByStatus";
|
||||
|
||||
token.returnType = com.wordnik.client.model.PetList;
|
||||
token.returnType = Array[Pet];
|
||||
return requestId;
|
||||
|
||||
}
|
||||
/*
|
||||
* Returns com.wordnik.client.model.PetList */
|
||||
* Returns Array[Pet] */
|
||||
public function findPetsByTags (tags: String): String {
|
||||
// create path and map variables
|
||||
var path: String = "/pet.{format}/findByTags".replace(/{format}/g,"xml");
|
||||
var path: String = "/pet/findByTags".replace(/{format}/g,"xml");
|
||||
|
||||
// query params
|
||||
var queryParams: Dictionary = new Dictionary();
|
||||
@@ -152,7 +253,7 @@ public static const event_findPetsByTags: String = "findPetsByTags";
|
||||
token.requestId = requestId;
|
||||
token.completionEventType = "findPetsByTags";
|
||||
|
||||
token.returnType = com.wordnik.client.model.PetList;
|
||||
token.returnType = Array[Pet];
|
||||
return requestId;
|
||||
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ public static const event_placeOrder: String = "placeOrder";
|
||||
* Returns Order */
|
||||
public function getOrderById (orderId: String): String {
|
||||
// create path and map variables
|
||||
var path: String = "/store.{format}/order/{orderId}".replace(/{format}/g,"xml").replace("{" + "orderId" + "}", getApiInvoker().escapeString(orderId));
|
||||
var path: String = "/store/order/{orderId}".replace(/{format}/g,"xml").replace("{" + "orderId" + "}", getApiInvoker().escapeString(orderId));
|
||||
|
||||
// query params
|
||||
var queryParams: Dictionary = new Dictionary();
|
||||
@@ -54,7 +54,7 @@ public static const event_placeOrder: String = "placeOrder";
|
||||
* Returns void */
|
||||
public function deleteOrder (orderId: String): String {
|
||||
// create path and map variables
|
||||
var path: String = "/store.{format}/order/{orderId}".replace(/{format}/g,"xml").replace("{" + "orderId" + "}", getApiInvoker().escapeString(orderId));
|
||||
var path: String = "/store/order/{orderId}".replace(/{format}/g,"xml").replace("{" + "orderId" + "}", getApiInvoker().escapeString(orderId));
|
||||
|
||||
// query params
|
||||
var queryParams: Dictionary = new Dictionary();
|
||||
@@ -79,7 +79,7 @@ public static const event_placeOrder: String = "placeOrder";
|
||||
* Returns void */
|
||||
public function placeOrder (body: Order): String {
|
||||
// create path and map variables
|
||||
var path: String = "/store.{format}/order".replace(/{format}/g,"xml");
|
||||
var path: String = "/store/order".replace(/{format}/g,"xml");
|
||||
|
||||
// query params
|
||||
var queryParams: Dictionary = new Dictionary();
|
||||
|
||||
@@ -22,8 +22,8 @@ public class UserApi extends SwaggerApi {
|
||||
super(apiCredentials, eventDispatcher);
|
||||
}
|
||||
|
||||
public static const event_createUsersWithArrayInput: String = "createUsersWithArrayInput";
|
||||
public static const event_createUser: String = "createUser";
|
||||
public static const event_createUsersWithArrayInput: String = "createUsersWithArrayInput";
|
||||
public static const event_createUsersWithListInput: String = "createUsersWithListInput";
|
||||
public static const event_updateUser: String = "updateUser";
|
||||
public static const event_deleteUser: String = "deleteUser";
|
||||
@@ -32,34 +32,9 @@ public static const event_loginUser: String = "loginUser";
|
||||
public static const event_logoutUser: String = "logoutUser";
|
||||
/*
|
||||
* Returns void */
|
||||
public function createUsersWithArrayInput (body: Array): String {
|
||||
// create path and map variables
|
||||
var path: String = "/user.{format}/createWithArray".replace(/{format}/g,"xml");
|
||||
|
||||
// query params
|
||||
var queryParams: Dictionary = new Dictionary();
|
||||
var headerParams: Dictionary = new Dictionary();
|
||||
|
||||
// verify required params are set
|
||||
if(body == null ) {
|
||||
throw new ApiError(400, "missing required params");
|
||||
}
|
||||
var token:AsyncToken = getApiInvoker().invokeAPI(path, "POST", queryParams, body, headerParams);
|
||||
|
||||
var requestId: String = getUniqueId();
|
||||
|
||||
token.requestId = requestId;
|
||||
token.completionEventType = "createUsersWithArrayInput";
|
||||
|
||||
token.returnType = null ;
|
||||
return requestId;
|
||||
|
||||
}
|
||||
/*
|
||||
* Returns void */
|
||||
public function createUser (body: User): String {
|
||||
// create path and map variables
|
||||
var path: String = "/user.{format}".replace(/{format}/g,"xml");
|
||||
var path: String = "/user".replace(/{format}/g,"xml");
|
||||
|
||||
// query params
|
||||
var queryParams: Dictionary = new Dictionary();
|
||||
@@ -79,12 +54,37 @@ public static const event_logoutUser: String = "logoutUser";
|
||||
token.returnType = null ;
|
||||
return requestId;
|
||||
|
||||
}
|
||||
/*
|
||||
* Returns void */
|
||||
public function createUsersWithArrayInput (body: Array): String {
|
||||
// create path and map variables
|
||||
var path: String = "/user/createWithArray".replace(/{format}/g,"xml");
|
||||
|
||||
// query params
|
||||
var queryParams: Dictionary = new Dictionary();
|
||||
var headerParams: Dictionary = new Dictionary();
|
||||
|
||||
// verify required params are set
|
||||
if(body == null ) {
|
||||
throw new ApiError(400, "missing required params");
|
||||
}
|
||||
var token:AsyncToken = getApiInvoker().invokeAPI(path, "POST", queryParams, body, headerParams);
|
||||
|
||||
var requestId: String = getUniqueId();
|
||||
|
||||
token.requestId = requestId;
|
||||
token.completionEventType = "createUsersWithArrayInput";
|
||||
|
||||
token.returnType = null ;
|
||||
return requestId;
|
||||
|
||||
}
|
||||
/*
|
||||
* Returns void */
|
||||
public function createUsersWithListInput (body: Array): String {
|
||||
// create path and map variables
|
||||
var path: String = "/user.{format}/createWithList".replace(/{format}/g,"xml");
|
||||
var path: String = "/user/createWithList".replace(/{format}/g,"xml");
|
||||
|
||||
// query params
|
||||
var queryParams: Dictionary = new Dictionary();
|
||||
@@ -109,7 +109,7 @@ public static const event_logoutUser: String = "logoutUser";
|
||||
* Returns void */
|
||||
public function updateUser (username: String, body: User): String {
|
||||
// create path and map variables
|
||||
var path: String = "/user.{format}/{username}".replace(/{format}/g,"xml").replace("{" + "username" + "}", getApiInvoker().escapeString(username));
|
||||
var path: String = "/user/{username}".replace(/{format}/g,"xml").replace("{" + "username" + "}", getApiInvoker().escapeString(username));
|
||||
|
||||
// query params
|
||||
var queryParams: Dictionary = new Dictionary();
|
||||
@@ -134,7 +134,7 @@ public static const event_logoutUser: String = "logoutUser";
|
||||
* Returns void */
|
||||
public function deleteUser (username: String): String {
|
||||
// create path and map variables
|
||||
var path: String = "/user.{format}/{username}".replace(/{format}/g,"xml").replace("{" + "username" + "}", getApiInvoker().escapeString(username));
|
||||
var path: String = "/user/{username}".replace(/{format}/g,"xml").replace("{" + "username" + "}", getApiInvoker().escapeString(username));
|
||||
|
||||
// query params
|
||||
var queryParams: Dictionary = new Dictionary();
|
||||
@@ -159,7 +159,7 @@ public static const event_logoutUser: String = "logoutUser";
|
||||
* Returns User */
|
||||
public function getUserByName (username: String): String {
|
||||
// create path and map variables
|
||||
var path: String = "/user.{format}/{username}".replace(/{format}/g,"xml").replace("{" + "username" + "}", getApiInvoker().escapeString(username));
|
||||
var path: String = "/user/{username}".replace(/{format}/g,"xml").replace("{" + "username" + "}", getApiInvoker().escapeString(username));
|
||||
|
||||
// query params
|
||||
var queryParams: Dictionary = new Dictionary();
|
||||
@@ -184,7 +184,7 @@ public static const event_logoutUser: String = "logoutUser";
|
||||
* Returns string */
|
||||
public function loginUser (username: String, password: String): String {
|
||||
// create path and map variables
|
||||
var path: String = "/user.{format}/login".replace(/{format}/g,"xml");
|
||||
var path: String = "/user/login".replace(/{format}/g,"xml");
|
||||
|
||||
// query params
|
||||
var queryParams: Dictionary = new Dictionary();
|
||||
@@ -213,7 +213,7 @@ public static const event_logoutUser: String = "logoutUser";
|
||||
* Returns void */
|
||||
public function logoutUser (): String {
|
||||
// create path and map variables
|
||||
var path: String = "/user.{format}/logout".replace(/{format}/g,"xml");
|
||||
var path: String = "/user/logout".replace(/{format}/g,"xml");
|
||||
|
||||
// query params
|
||||
var queryParams: Dictionary = new Dictionary();
|
||||
|
||||
@@ -2,9 +2,11 @@ package com.wordnik.client.model {
|
||||
|
||||
[XmlRootNode(name="Category")]
|
||||
public class Category {
|
||||
/* Category unique identifier */
|
||||
[XmlElement(name="id")]
|
||||
public var id: Number = 0.0;
|
||||
|
||||
/* Name of the category */
|
||||
[XmlElement(name="name")]
|
||||
public var name: String = null;
|
||||
|
||||
|
||||
@@ -2,19 +2,23 @@ package com.wordnik.client.model {
|
||||
|
||||
[XmlRootNode(name="Order")]
|
||||
public class Order {
|
||||
/* Unique identifier for the order */
|
||||
[XmlElement(name="id")]
|
||||
public var id: Number = 0.0;
|
||||
|
||||
/* ID of pet being ordered */
|
||||
[XmlElement(name="petId")]
|
||||
public var petId: Number = 0.0;
|
||||
|
||||
/* Order Status */
|
||||
[XmlElement(name="status")]
|
||||
public var status: String = null;
|
||||
|
||||
/* Number of pets ordered */
|
||||
[XmlElement(name="quantity")]
|
||||
public var quantity: Number = 0.0;
|
||||
|
||||
/* Status of the order */
|
||||
[XmlElement(name="status")]
|
||||
public var status: String = null;
|
||||
|
||||
/* Date shipped, only if it has been */
|
||||
[XmlElement(name="shipDate")]
|
||||
public var shipDate: Date = null;
|
||||
|
||||
@@ -22,8 +26,8 @@ package com.wordnik.client.model {
|
||||
var str: String = "Order: ";
|
||||
str += " (id: " + id + ")";
|
||||
str += " (petId: " + petId + ")";
|
||||
str += " (status: " + status + ")";
|
||||
str += " (quantity: " + quantity + ")";
|
||||
str += " (status: " + status + ")";
|
||||
str += " (shipDate: " + shipDate + ")";
|
||||
return str;
|
||||
}
|
||||
|
||||
@@ -4,39 +4,44 @@ import com.wordnik.client.model.Category;
|
||||
import com.wordnik.client.model.Tag;
|
||||
[XmlRootNode(name="Pet")]
|
||||
public class Pet {
|
||||
/* Unique identifier for the Pet */
|
||||
[XmlElement(name="id")]
|
||||
public var id: Number = 0.0;
|
||||
|
||||
// This declaration below of _tags_obj_class is to force flash compiler to include this class
|
||||
private var _tags_obj_class: com.wordnik.client.model.Tag = null;
|
||||
[XmlElementWrapper(name="tags")]
|
||||
[XmlElements(name="tag", type="com.wordnik.client.model.Tag")]
|
||||
public var tags: Array = new Array();
|
||||
|
||||
/* Category the pet is in */
|
||||
[XmlElement(name="category")]
|
||||
public var category: Category = null;
|
||||
|
||||
/* pet status in the store */
|
||||
[XmlElement(name="status")]
|
||||
public var status: String = null;
|
||||
|
||||
/* Friendly name of the pet */
|
||||
[XmlElement(name="name")]
|
||||
public var name: String = null;
|
||||
|
||||
/* Image URLs */
|
||||
// This declaration below of _photoUrls_obj_class is to force flash compiler to include this class
|
||||
private var _photoUrls_obj_class: com.wordnik.client.model.String = null;
|
||||
[XmlElementWrapper(name="photoUrls")]
|
||||
[XmlElements(name="photoUrl", type="com.wordnik.client.model.String")]
|
||||
public var photoUrls: Array = new Array();
|
||||
|
||||
/* Tags assigned to this pet */
|
||||
// This declaration below of _tags_obj_class is to force flash compiler to include this class
|
||||
private var _tags_obj_class: com.wordnik.client.model.Tag = null;
|
||||
[XmlElementWrapper(name="tags")]
|
||||
[XmlElements(name="tag", type="com.wordnik.client.model.Tag")]
|
||||
public var tags: Array = new Array();
|
||||
|
||||
/* pet status in the store */
|
||||
[XmlElement(name="status")]
|
||||
public var status: String = null;
|
||||
|
||||
public function toString(): String {
|
||||
var str: String = "Pet: ";
|
||||
str += " (id: " + id + ")";
|
||||
str += " (tags: " + tags + ")";
|
||||
str += " (category: " + category + ")";
|
||||
str += " (status: " + status + ")";
|
||||
str += " (name: " + name + ")";
|
||||
str += " (photoUrls: " + photoUrls + ")";
|
||||
str += " (tags: " + tags + ")";
|
||||
str += " (status: " + status + ")";
|
||||
return str;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,9 +2,11 @@ package com.wordnik.client.model {
|
||||
|
||||
[XmlRootNode(name="Tag")]
|
||||
public class Tag {
|
||||
/* Unique identifier for the tag */
|
||||
[XmlElement(name="id")]
|
||||
public var id: Number = 0.0;
|
||||
|
||||
/* Friendly name for the tag */
|
||||
[XmlElement(name="name")]
|
||||
public var name: String = null;
|
||||
|
||||
|
||||
@@ -2,41 +2,48 @@ package com.wordnik.client.model {
|
||||
|
||||
[XmlRootNode(name="User")]
|
||||
public class User {
|
||||
/* Unique identifier for the user */
|
||||
[XmlElement(name="id")]
|
||||
public var id: Number = 0.0;
|
||||
|
||||
[XmlElement(name="lastName")]
|
||||
public var lastName: String = null;
|
||||
|
||||
/* Unique username */
|
||||
[XmlElement(name="username")]
|
||||
public var username: String = null;
|
||||
|
||||
[XmlElement(name="phone")]
|
||||
public var phone: String = null;
|
||||
/* First name of the user */
|
||||
[XmlElement(name="firstName")]
|
||||
public var firstName: String = null;
|
||||
|
||||
/* Last name of the user */
|
||||
[XmlElement(name="lastName")]
|
||||
public var lastName: String = null;
|
||||
|
||||
/* Email address of the user */
|
||||
[XmlElement(name="email")]
|
||||
public var email: String = null;
|
||||
|
||||
/* Password name of the user */
|
||||
[XmlElement(name="password")]
|
||||
public var password: String = null;
|
||||
|
||||
/* Phone number of the user */
|
||||
[XmlElement(name="phone")]
|
||||
public var phone: String = null;
|
||||
|
||||
/* User Status */
|
||||
[XmlElement(name="userStatus")]
|
||||
public var userStatus: Number = 0.0;
|
||||
|
||||
[XmlElement(name="firstName")]
|
||||
public var firstName: String = null;
|
||||
|
||||
[XmlElement(name="password")]
|
||||
public var password: String = null;
|
||||
|
||||
public function toString(): String {
|
||||
var str: String = "User: ";
|
||||
str += " (id: " + id + ")";
|
||||
str += " (lastName: " + lastName + ")";
|
||||
str += " (username: " + username + ")";
|
||||
str += " (phone: " + phone + ")";
|
||||
str += " (email: " + email + ")";
|
||||
str += " (userStatus: " + userStatus + ")";
|
||||
str += " (firstName: " + firstName + ")";
|
||||
str += " (lastName: " + lastName + ")";
|
||||
str += " (email: " + email + ")";
|
||||
str += " (password: " + password + ")";
|
||||
str += " (phone: " + phone + ")";
|
||||
str += " (userStatus: " + userStatus + ")";
|
||||
return str;
|
||||
}
|
||||
|
||||
|
||||
@@ -238,7 +238,7 @@ public class ApiInvoker extends EventDispatcher
|
||||
var qualifiedClassName:String=objDescriptor.@name;
|
||||
qualifiedClassName=qualifiedClassName.replace("::",".");
|
||||
var className: String = qualifiedClassName.substring(qualifiedClassName.lastIndexOf(".") + 1);
|
||||
className = className.charAt().toLowerCase() + className.substring(1);
|
||||
className = className().toLowerCase() + className.substring(1);
|
||||
writer.xml.setName(className);
|
||||
|
||||
for each(property in objDescriptor.elements("variable")){
|
||||
|
||||
@@ -31,7 +31,7 @@ internal class ApiUrlHelper {
|
||||
}
|
||||
|
||||
internal static function getProxyUrl(hostName: String, proxyPath: String): String{
|
||||
if (hostName.charAt(hostName.length - 1) == "/") //remove trailing slash
|
||||
if (hostName(hostName.length - 1) == "/") //remove trailing slash
|
||||
{
|
||||
hostName = hostName.substring(0, hostName.length - 1);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Copyright 2012 Wordnik, Inc.
|
||||
* Copyright 2013 Wordnik, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -34,10 +34,16 @@ object JavaPetstoreCodegen extends BasicJavaGenerator {
|
||||
// package for api classes
|
||||
override def apiPackage = Some("com.wordnik.petstore.api")
|
||||
|
||||
additionalParams ++= Map(
|
||||
"artifactId" -> "swagger-petstore",
|
||||
"artifactVersion" -> "1.0.0",
|
||||
"groupId" -> "com.wordnik")
|
||||
|
||||
// supporting classes
|
||||
override def supportingFiles =
|
||||
List(
|
||||
("apiInvoker.mustache", destinationDir + java.io.File.separator + invokerPackage.get.replaceAll("\\.", java.io.File.separator) + java.io.File.separator, "ApiInvoker.java"),
|
||||
("apiException.mustache", destinationDir + java.io.File.separator + invokerPackage.get.replaceAll("\\.", java.io.File.separator) + java.io.File.separator, "ApiException.java"),
|
||||
("apiInvoker.mustache", destinationDir + java.io.File.separator + invokerPackage.get.replace(".", java.io.File.separator) + java.io.File.separator, "ApiInvoker.java"),
|
||||
("JsonUtil.mustache", destinationDir + java.io.File.separator + invokerPackage.get.replace(".", java.io.File.separator) + java.io.File.separator, "JsonUtil.java"),
|
||||
("apiException.mustache", destinationDir + java.io.File.separator + invokerPackage.get.replace(".", java.io.File.separator) + java.io.File.separator, "ApiException.java"),
|
||||
("pom.mustache", "samples/client/petstore/java", "pom.xml"))
|
||||
}
|
||||
|
||||
@@ -1,225 +1,214 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.wordnik</groupId>
|
||||
<artifactId>swagger-client</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>swagger-client</name>
|
||||
<version>1.0</version>
|
||||
<scm>
|
||||
<connection>scm:git:git@github.com:wordnik/swagger-mustache.git</connection>
|
||||
<developerConnection>scm:git:git@github.com:wordnik/swagger-mustache.git</developerConnection>
|
||||
<url>https://github.com/wordnik/swagger-mustache</url>
|
||||
</scm>
|
||||
<prerequisites>
|
||||
<maven>2.2.0</maven>
|
||||
</prerequisites>
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.wordnik.client</groupId>
|
||||
<artifactId>api-client</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>api-client</name>
|
||||
<version>1.0.0</version>
|
||||
<scm>
|
||||
<connection>scm:git:git@github.com:wordnik/swagger-mustache.git</connection>
|
||||
<developerConnection>scm:git:git@github.com:wordnik/swagger-codegen.git</developerConnection>
|
||||
<url>https://github.com/wordnik/swagger-codegen</url>
|
||||
</scm>
|
||||
<prerequisites>
|
||||
<maven>2.2.0</maven>
|
||||
</prerequisites>
|
||||
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>scala-tools.org</id>
|
||||
<name>Scala-Tools Maven2 Repository</name>
|
||||
<url>http://scala-tools.org/repo-releases</url>
|
||||
</pluginRepository>
|
||||
<pluginRepository>
|
||||
<id>maven-mongodb-plugin-repo</id>
|
||||
<name>maven mongodb plugin repository</name>
|
||||
<url>http://maven-mongodb-plugin.googlecode.com/svn/maven/repo</url>
|
||||
<layout>default</layout>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>2.12</version>
|
||||
<configuration>
|
||||
<systemProperties>
|
||||
<property>
|
||||
<name>loggerPath</name>
|
||||
<value>conf/log4j.properties</value>
|
||||
</property>
|
||||
</systemProperties>
|
||||
<argLine>-Xms512m -Xmx1500m</argLine>
|
||||
<parallel>methods</parallel>
|
||||
<forkMode>pertest</forkMode>
|
||||
</configuration>
|
||||
</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>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>2.12</version>
|
||||
<configuration>
|
||||
<systemProperties>
|
||||
<property>
|
||||
<name>loggerPath</name>
|
||||
<value>conf/log4j.properties</value>
|
||||
</property>
|
||||
</systemProperties>
|
||||
<argLine>-Xms512m -Xmx1500m</argLine>
|
||||
<parallel>methods</parallel>
|
||||
<forkMode>pertest</forkMode>
|
||||
</configuration>
|
||||
</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>
|
||||
<!-- attach test jar -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>2.2</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
<goal>test-jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<!-- attach test jar -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>2.2</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
<goal>test-jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>build-helper-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>add_sources</id>
|
||||
<phase>generate-sources</phase>
|
||||
<goals>
|
||||
<goal>add-source</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<sources>
|
||||
<source>src/main/java</source>
|
||||
</sources>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>add_test_sources</id>
|
||||
<phase>generate-test-sources</phase>
|
||||
<goals>
|
||||
<goal>add-test-source</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<sources>
|
||||
<source>src/test/java</source>
|
||||
</sources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>2.3.2</version>
|
||||
<configuration>
|
||||
<source>1.6</source>
|
||||
<target>1.6</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.scala-tools</groupId>
|
||||
<artifactId>maven-scala-plugin</artifactId>
|
||||
<version>2.15.2</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>scala-compile-first</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>add-source</goal>
|
||||
<goal>compile</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>scala-test-compile</id>
|
||||
<phase>process-test-resources</phase>
|
||||
<goals>
|
||||
<goal>testCompile</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<jvmArgs>
|
||||
<jvmArg>-Xms128m</jvmArg>
|
||||
<jvmArg>-Xmx1500m</jvmArg>
|
||||
</jvmArgs>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<reporting>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.scala-tools</groupId>
|
||||
<artifactId>maven-scala-plugin</artifactId>
|
||||
<configuration>
|
||||
<scalaVersion>${scala-version}</scalaVersion>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</reporting>
|
||||
<dependencies>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>build-helper-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>add_sources</id>
|
||||
<phase>generate-sources</phase>
|
||||
<goals>
|
||||
<goal>add-source</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<sources>
|
||||
<source>src/main/java</source>
|
||||
</sources>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>add_test_sources</id>
|
||||
<phase>generate-test-sources</phase>
|
||||
<goals>
|
||||
<goal>add-test-source</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<sources>
|
||||
<source>src/test/java</source>
|
||||
</sources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>2.3.2</version>
|
||||
<configuration>
|
||||
<source>1.6</source>
|
||||
<target>1.6</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>net.alchim31.maven</groupId>
|
||||
<artifactId>scala-maven-plugin</artifactId>
|
||||
<version>${scala-maven-plugin-version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
<goal>testCompile</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<configuration>
|
||||
<recompileMode>incremental</recompileMode>
|
||||
</configuration>
|
||||
<jvmArgs>
|
||||
<jvmArg>-Xmx384m</jvmArg>
|
||||
</jvmArgs>
|
||||
<args>
|
||||
<arg>-target:jvm-1.5</arg>
|
||||
<arg>-deprecation</arg>
|
||||
</args>
|
||||
<launchers>
|
||||
<launcher>
|
||||
<id>run-scalatest</id>
|
||||
<mainClass>org.scalatest.tools.Runner</mainClass>
|
||||
<args>
|
||||
<arg>-p</arg>
|
||||
<arg>${project.build.testOutputDirectory}</arg>
|
||||
</args>
|
||||
<jvmArgs>
|
||||
<jvmArg>-Xmx512m</jvmArg>
|
||||
</jvmArgs>
|
||||
</launcher>
|
||||
</launchers>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<reporting>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>net.alchim31.maven</groupId>
|
||||
<artifactId>scala-maven-plugin</artifactId>
|
||||
<version>${scala-maven-plugin-version}</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</reporting>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.sun.jersey</groupId>
|
||||
<artifactId>jersey-client</artifactId>
|
||||
<version>${jersey-version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.scala-lang</groupId>
|
||||
<artifactId>scala-library</artifactId>
|
||||
<version>${scala-version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.wordnik</groupId>
|
||||
<artifactId>swagger-core_2.9.1</artifactId>
|
||||
<version>${swagger-core-version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.scalatest</groupId>
|
||||
<artifactId>scalatest_2.9.1</artifactId>
|
||||
<version>${scala-test-version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>${junit-version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>scala-tools.org</id>
|
||||
<name>Scala-Tools Maven2 Repository</name>
|
||||
<url>http://scala-tools.org/repo-releases</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>wordnik-ci-aws</id>
|
||||
<url>https://ci.aws.wordnik.com/artifactory/libs-snapshots/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>wordnik-ci-aws-maven</id>
|
||||
<url>https://ci.aws.wordnik.com/artifactory/m2-snapshots/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>wordnik-ci-aws-remote</id>
|
||||
<url>https://ci.aws.wordnik.com/artifactory/remote-repos/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-core</artifactId>
|
||||
<version>${jackson-version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-annotations</artifactId>
|
||||
<version>${jackson-version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
<version>${jackson-version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<properties>
|
||||
<!-- test dependencies -->
|
||||
<dependency>
|
||||
<groupId>org.scala-lang</groupId>
|
||||
<artifactId>scala-library</artifactId>
|
||||
<version>${scala-version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.scalatest</groupId>
|
||||
<artifactId>scalatest_2.9.1</artifactId>
|
||||
<version>${scala-test-version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>${junit-version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<jersey-version>1.7</jersey-version>
|
||||
<swagger-core-version>1.1.0</swagger-core-version>
|
||||
<scala-version>2.9.1-1</scala-version>
|
||||
<junit-version>4.8.1</junit-version>
|
||||
<maven-plugin.version>1.0.0</maven-plugin.version>
|
||||
<scala-test-version>1.6.1</scala-test-version>
|
||||
<junit-version>4.8.1</junit-version>
|
||||
<scala-test-version>1.6.1</scala-test-version>
|
||||
</properties>
|
||||
<jackson-version>2.1.4</jackson-version>
|
||||
<scala-version>2.9.1-1</scala-version>
|
||||
<junit-version>4.8.1</junit-version>
|
||||
<maven-plugin-version>1.0.0</maven-plugin-version>
|
||||
<junit-version>4.8.1</junit-version>
|
||||
<scala-test-version>1.6.1</scala-test-version>
|
||||
<scala-maven-plugin-version>3.1.5</scala-maven-plugin-version>
|
||||
</properties>
|
||||
</project>
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package com.wordnik.client;
|
||||
|
||||
import com.wordnik.swagger.core.util.JsonUtil;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonGenerator.Feature;
|
||||
import com.fasterxml.jackson.databind.*;
|
||||
import com.fasterxml.jackson.annotation.*;
|
||||
@@ -14,6 +12,7 @@ import com.sun.jersey.api.client.config.DefaultClientConfig;
|
||||
import com.sun.jersey.api.client.filter.LoggingFilter;
|
||||
import com.sun.jersey.api.client.WebResource.Builder;
|
||||
|
||||
import javax.ws.rs.core.Response.Status.Family;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
|
||||
import java.util.Map;
|
||||
@@ -29,7 +28,7 @@ public class ApiInvoker {
|
||||
public static ApiInvoker getInstance() {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
|
||||
public void addDefaultHeader(String key, String value) {
|
||||
defaultHeaderMap.put(key, value);
|
||||
}
|
||||
@@ -46,10 +45,9 @@ public class ApiInvoker {
|
||||
return response;
|
||||
}
|
||||
else if(String.class.equals(cls)) {
|
||||
if(json != null && json.startsWith("\"") && json.endsWith("\"") && json.length() > 1) {
|
||||
if(json != null && json.startsWith("\"") && json.endsWith("\"") && json.length() > 1)
|
||||
return json.substring(1, json.length() - 2);
|
||||
}
|
||||
else
|
||||
else
|
||||
return json;
|
||||
}
|
||||
else {
|
||||
@@ -63,34 +61,38 @@ public class ApiInvoker {
|
||||
|
||||
public static String serialize(Object obj) throws ApiException {
|
||||
try {
|
||||
if (obj != null) return JsonUtil.getJsonMapper().writeValueAsString(obj);
|
||||
else return null;
|
||||
if (obj != null)
|
||||
return JsonUtil.getJsonMapper().writeValueAsString(obj);
|
||||
else
|
||||
return null;
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new ApiException(500, e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public String invokeAPI(String host, String path, String method, Map<String, String> queryParams, Object body, Map<String, String> headerParams) throws ApiException {
|
||||
public String invokeAPI(String host, String path, String method, Map<String, String> queryParams, Object body, Map<String, String> headerParams, String contentType) throws ApiException {
|
||||
Client client = getClient(host);
|
||||
|
||||
StringBuilder b = new StringBuilder();
|
||||
|
||||
|
||||
for(String key : queryParams.keySet()) {
|
||||
String value = queryParams.get(key);
|
||||
if (value != null){
|
||||
if(b.toString().length() == 0) b.append("?");
|
||||
else b.append("&");
|
||||
if(b.toString().length() == 0)
|
||||
b.append("?");
|
||||
else
|
||||
b.append("&");
|
||||
b.append(escapeString(key)).append("=").append(escapeString(value));
|
||||
}
|
||||
}
|
||||
String querystring = b.toString();
|
||||
|
||||
Builder builder = client.resource(host + path + querystring).type("application/json");
|
||||
Builder builder = client.resource(host + path + querystring).accept("application/json");
|
||||
for(String key : headerParams.keySet()) {
|
||||
builder.header(key, headerParams.get(key));
|
||||
}
|
||||
|
||||
|
||||
for(String key : defaultHeaderMap.keySet()) {
|
||||
if(!headerParams.containsKey(key)) {
|
||||
builder.header(key, defaultHeaderMap.get(key));
|
||||
@@ -102,34 +104,46 @@ public class ApiInvoker {
|
||||
response = (ClientResponse) builder.get(ClientResponse.class);
|
||||
}
|
||||
else if ("POST".equals(method)) {
|
||||
if(body == null)
|
||||
response = builder.post(ClientResponse.class, serialize(body));
|
||||
else
|
||||
response = builder.type("application/json").post(ClientResponse.class, serialize(body));
|
||||
}
|
||||
else if ("PUT".equals(method)) {
|
||||
response = builder.put(ClientResponse.class, serialize(body));
|
||||
}
|
||||
if(body == null)
|
||||
response = builder.put(ClientResponse.class, serialize(body));
|
||||
else
|
||||
response = builder.type("application/json").put(ClientResponse.class, serialize(body));
|
||||
}
|
||||
else if ("DELETE".equals(method)) {
|
||||
if(body == null)
|
||||
response = builder.delete(ClientResponse.class, serialize(body));
|
||||
else
|
||||
response = builder.type("application/json").delete(ClientResponse.class, serialize(body));
|
||||
}
|
||||
else {
|
||||
throw new ApiException(500, "unknown method type " + method);
|
||||
}
|
||||
if(response.getClientResponseStatus() == ClientResponse.Status.OK) {
|
||||
if(response.getClientResponseStatus() == ClientResponse.Status.NO_CONTENT) {
|
||||
return null;
|
||||
}
|
||||
else if(response.getClientResponseStatus().getFamily() == Family.SUCCESSFUL) {
|
||||
return (String) response.getEntity(String.class);
|
||||
}
|
||||
else {
|
||||
throw new ApiException(
|
||||
response.getClientResponseStatus().getStatusCode(),
|
||||
response.getEntity(String.class));
|
||||
response.getEntity(String.class));
|
||||
}
|
||||
}
|
||||
|
||||
private Client getClient(String host) {
|
||||
if(!hostMap.containsKey(host)) {
|
||||
Client client = Client.create();
|
||||
client.addFilter(new LoggingFilter());
|
||||
hostMap.put(host, client);
|
||||
}
|
||||
return hostMap.get(host);
|
||||
if(!hostMap.containsKey(host)) {
|
||||
Client client = Client.create();
|
||||
client.addFilter(new LoggingFilter());
|
||||
hostMap.put(host, client);
|
||||
}
|
||||
return hostMap.get(host);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.wordnik.client;
|
||||
|
||||
import com.fasterxml.jackson.annotation.*;
|
||||
import com.fasterxml.jackson.databind.*;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.core.JsonGenerator.Feature;
|
||||
|
||||
public class JsonUtil {
|
||||
public static ObjectMapper mapper;
|
||||
|
||||
static {
|
||||
mapper = new ObjectMapper();
|
||||
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||
mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
|
||||
}
|
||||
|
||||
public static ObjectMapper getJsonMapper() {
|
||||
return mapper;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.wordnik.petstore.api;
|
||||
|
||||
import com.wordnik.client.ApiException;
|
||||
import com.wordnik.client.ApiInvoker;
|
||||
import java.io.File;
|
||||
import com.wordnik.petstore.model.Pet;
|
||||
import java.util.*;
|
||||
|
||||
@@ -21,20 +22,49 @@ public class PetApi {
|
||||
return basePath;
|
||||
}
|
||||
|
||||
public Pet getPetById (String petId) throws ApiException {
|
||||
public void uploadFile (String additionalMetadata, File body) throws ApiException {
|
||||
// create path and map variables
|
||||
String path = "/pet.{format}/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId));
|
||||
String path = "/pet/uploadImage".replaceAll("\\{format\\}","json");
|
||||
|
||||
// query params
|
||||
Map<String, String> queryParams = new HashMap<String, String>();
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
|
||||
String contentType = "application/json";
|
||||
|
||||
try {
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, body, headerParams, contentType);
|
||||
if(response != null){
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
return ;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.getCode() == 404) {
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
public Pet getPetById (Long petId) throws ApiException {
|
||||
// verify required params are set
|
||||
if(petId == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
// create path and map variables
|
||||
String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
||||
|
||||
// query params
|
||||
Map<String, String> queryParams = new HashMap<String, String>();
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
|
||||
String contentType = "application/json";
|
||||
|
||||
try {
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams);
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams, contentType);
|
||||
if(response != null){
|
||||
return (Pet) ApiInvoker.deserialize(response, "", Pet.class);
|
||||
}
|
||||
@@ -50,20 +80,115 @@ public class PetApi {
|
||||
}
|
||||
}
|
||||
}
|
||||
public void addPet (Pet body) throws ApiException {
|
||||
public void deletePet (String petId) throws ApiException {
|
||||
// verify required params are set
|
||||
if(petId == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
// create path and map variables
|
||||
String path = "/pet.{format}".replaceAll("\\{format\\}","json");
|
||||
String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
||||
|
||||
// query params
|
||||
Map<String, String> queryParams = new HashMap<String, String>();
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
|
||||
String contentType = "application/json";
|
||||
|
||||
try {
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "DELETE", queryParams, null, headerParams, contentType);
|
||||
if(response != null){
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
return ;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.getCode() == 404) {
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
public List<Pet> partialUpdate (String petId, Pet body) throws ApiException {
|
||||
// verify required params are set
|
||||
if(petId == null || body == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
// create path and map variables
|
||||
String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
||||
|
||||
// query params
|
||||
Map<String, String> queryParams = new HashMap<String, String>();
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
|
||||
String contentType = "application/json";
|
||||
|
||||
try {
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "PATCH", queryParams, body, headerParams, contentType);
|
||||
if(response != null){
|
||||
return (List<Pet>) ApiInvoker.deserialize(response, "Array", Pet.class);
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.getCode() == 404) {
|
||||
return null;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
public void updatePetWithForm (String petId, String name, String status) throws ApiException {
|
||||
// verify required params are set
|
||||
if(petId == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
// create path and map variables
|
||||
String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
||||
|
||||
// query params
|
||||
Map<String, String> queryParams = new HashMap<String, String>();
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
|
||||
String contentType = "application/json";
|
||||
|
||||
try {
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, null, headerParams, contentType);
|
||||
if(response != null){
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
return ;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.getCode() == 404) {
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
public void addPet (Pet body) throws ApiException {
|
||||
// verify required params are set
|
||||
if(body == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
// create path and map variables
|
||||
String path = "/pet".replaceAll("\\{format\\}","json");
|
||||
|
||||
// query params
|
||||
Map<String, String> queryParams = new HashMap<String, String>();
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
|
||||
String contentType = "application/json";
|
||||
|
||||
try {
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, body, headerParams);
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, body, headerParams, contentType);
|
||||
if(response != null){
|
||||
return ;
|
||||
}
|
||||
@@ -80,19 +205,21 @@ public class PetApi {
|
||||
}
|
||||
}
|
||||
public void updatePet (Pet body) throws ApiException {
|
||||
// verify required params are set
|
||||
if(body == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
// create path and map variables
|
||||
String path = "/pet.{format}".replaceAll("\\{format\\}","json");
|
||||
String path = "/pet".replaceAll("\\{format\\}","json");
|
||||
|
||||
// query params
|
||||
Map<String, String> queryParams = new HashMap<String, String>();
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
|
||||
// verify required params are set
|
||||
if(body == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
String contentType = "application/json";
|
||||
|
||||
try {
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "PUT", queryParams, body, headerParams);
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "PUT", queryParams, body, headerParams, contentType);
|
||||
if(response != null){
|
||||
return ;
|
||||
}
|
||||
@@ -109,23 +236,25 @@ public class PetApi {
|
||||
}
|
||||
}
|
||||
public List<Pet> findPetsByStatus (String status) throws ApiException {
|
||||
// verify required params are set
|
||||
if(status == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
// create path and map variables
|
||||
String path = "/pet.{format}/findByStatus".replaceAll("\\{format\\}","json");
|
||||
String path = "/pet/findByStatus".replaceAll("\\{format\\}","json");
|
||||
|
||||
// query params
|
||||
Map<String, String> queryParams = new HashMap<String, String>();
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
|
||||
// verify required params are set
|
||||
if(status == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
if(!"null".equals(String.valueOf(status)))
|
||||
queryParams.put("status", String.valueOf(status));
|
||||
String contentType = "application/json";
|
||||
|
||||
try {
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams);
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams, contentType);
|
||||
if(response != null){
|
||||
return (List<Pet>) ApiInvoker.deserialize(response, "List", Pet.class);
|
||||
return (List<Pet>) ApiInvoker.deserialize(response, "Array", Pet.class);
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
@@ -140,23 +269,25 @@ public class PetApi {
|
||||
}
|
||||
}
|
||||
public List<Pet> findPetsByTags (String tags) throws ApiException {
|
||||
// verify required params are set
|
||||
if(tags == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
// create path and map variables
|
||||
String path = "/pet.{format}/findByTags".replaceAll("\\{format\\}","json");
|
||||
String path = "/pet/findByTags".replaceAll("\\{format\\}","json");
|
||||
|
||||
// query params
|
||||
Map<String, String> queryParams = new HashMap<String, String>();
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
|
||||
// verify required params are set
|
||||
if(tags == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
if(!"null".equals(String.valueOf(tags)))
|
||||
queryParams.put("tags", String.valueOf(tags));
|
||||
String contentType = "application/json";
|
||||
|
||||
try {
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams);
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams, contentType);
|
||||
if(response != null){
|
||||
return (List<Pet>) ApiInvoker.deserialize(response, "List", Pet.class);
|
||||
return (List<Pet>) ApiInvoker.deserialize(response, "Array", Pet.class);
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
|
||||
@@ -21,20 +21,53 @@ public class StoreApi {
|
||||
return basePath;
|
||||
}
|
||||
|
||||
public Order getOrderById (String orderId) throws ApiException {
|
||||
public void deleteOrder (String orderId) throws ApiException {
|
||||
// verify required params are set
|
||||
if(orderId == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
// create path and map variables
|
||||
String path = "/store.{format}/order/{orderId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "orderId" + "\\}", apiInvoker.escapeString(orderId));
|
||||
String path = "/store/order/{orderId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "orderId" + "\\}", apiInvoker.escapeString(orderId.toString()));
|
||||
|
||||
// query params
|
||||
Map<String, String> queryParams = new HashMap<String, String>();
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
|
||||
String contentType = "application/json";
|
||||
|
||||
try {
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "DELETE", queryParams, null, headerParams, contentType);
|
||||
if(response != null){
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
return ;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.getCode() == 404) {
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
public Order getOrderById (String orderId) throws ApiException {
|
||||
// verify required params are set
|
||||
if(orderId == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
// create path and map variables
|
||||
String path = "/store/order/{orderId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "orderId" + "\\}", apiInvoker.escapeString(orderId.toString()));
|
||||
|
||||
// query params
|
||||
Map<String, String> queryParams = new HashMap<String, String>();
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
|
||||
String contentType = "application/json";
|
||||
|
||||
try {
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams);
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams, contentType);
|
||||
if(response != null){
|
||||
return (Order) ApiInvoker.deserialize(response, "", Order.class);
|
||||
}
|
||||
@@ -50,49 +83,22 @@ public class StoreApi {
|
||||
}
|
||||
}
|
||||
}
|
||||
public void deleteOrder (String orderId) throws ApiException {
|
||||
// create path and map variables
|
||||
String path = "/store.{format}/order/{orderId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "orderId" + "\\}", apiInvoker.escapeString(orderId));
|
||||
|
||||
// query params
|
||||
Map<String, String> queryParams = new HashMap<String, String>();
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
|
||||
// verify required params are set
|
||||
if(orderId == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
try {
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "DELETE", queryParams, null, headerParams);
|
||||
if(response != null){
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
return ;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.getCode() == 404) {
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
public void placeOrder (Order body) throws ApiException {
|
||||
// create path and map variables
|
||||
String path = "/store.{format}/order".replaceAll("\\{format\\}","json");
|
||||
|
||||
// query params
|
||||
Map<String, String> queryParams = new HashMap<String, String>();
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
|
||||
// verify required params are set
|
||||
if(body == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
// create path and map variables
|
||||
String path = "/store/order".replaceAll("\\{format\\}","json");
|
||||
|
||||
// query params
|
||||
Map<String, String> queryParams = new HashMap<String, String>();
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
|
||||
String contentType = "application/json";
|
||||
|
||||
try {
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, body, headerParams);
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, body, headerParams, contentType);
|
||||
if(response != null){
|
||||
return ;
|
||||
}
|
||||
|
||||
@@ -21,136 +21,22 @@ public class UserApi {
|
||||
return basePath;
|
||||
}
|
||||
|
||||
public void createUsersWithArrayInput (List<User> body) throws ApiException {
|
||||
// create path and map variables
|
||||
String path = "/user.{format}/createWithArray".replaceAll("\\{format\\}","json");
|
||||
|
||||
// query params
|
||||
Map<String, String> queryParams = new HashMap<String, String>();
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
|
||||
// verify required params are set
|
||||
if(body == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
try {
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, body, headerParams);
|
||||
if(response != null){
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
return ;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.getCode() == 404) {
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
public void createUser (User body) throws ApiException {
|
||||
// create path and map variables
|
||||
String path = "/user.{format}".replaceAll("\\{format\\}","json");
|
||||
|
||||
// query params
|
||||
Map<String, String> queryParams = new HashMap<String, String>();
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
|
||||
// verify required params are set
|
||||
if(body == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
try {
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, body, headerParams);
|
||||
if(response != null){
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
return ;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.getCode() == 404) {
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
public void createUsersWithListInput (List<User> body) throws ApiException {
|
||||
// create path and map variables
|
||||
String path = "/user.{format}/createWithList".replaceAll("\\{format\\}","json");
|
||||
|
||||
// query params
|
||||
Map<String, String> queryParams = new HashMap<String, String>();
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
|
||||
// verify required params are set
|
||||
if(body == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
try {
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, body, headerParams);
|
||||
if(response != null){
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
return ;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.getCode() == 404) {
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
public void updateUser (String username, User body) throws ApiException {
|
||||
// create path and map variables
|
||||
String path = "/user.{format}/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username));
|
||||
|
||||
// query params
|
||||
Map<String, String> queryParams = new HashMap<String, String>();
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
|
||||
// verify required params are set
|
||||
if(username == null || body == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
try {
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "PUT", queryParams, body, headerParams);
|
||||
if(response != null){
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
return ;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.getCode() == 404) {
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
public void deleteUser (String username) throws ApiException {
|
||||
// create path and map variables
|
||||
String path = "/user.{format}/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username));
|
||||
|
||||
// query params
|
||||
Map<String, String> queryParams = new HashMap<String, String>();
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
|
||||
// verify required params are set
|
||||
if(username == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
// create path and map variables
|
||||
String path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString()));
|
||||
|
||||
// query params
|
||||
Map<String, String> queryParams = new HashMap<String, String>();
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
|
||||
String contentType = "application/json";
|
||||
|
||||
try {
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "DELETE", queryParams, null, headerParams);
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "DELETE", queryParams, null, headerParams, contentType);
|
||||
if(response != null){
|
||||
return ;
|
||||
}
|
||||
@@ -167,19 +53,21 @@ public class UserApi {
|
||||
}
|
||||
}
|
||||
public User getUserByName (String username) throws ApiException {
|
||||
// verify required params are set
|
||||
if(username == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
// create path and map variables
|
||||
String path = "/user.{format}/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username));
|
||||
String path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString()));
|
||||
|
||||
// query params
|
||||
Map<String, String> queryParams = new HashMap<String, String>();
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
|
||||
// verify required params are set
|
||||
if(username == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
String contentType = "application/json";
|
||||
|
||||
try {
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams);
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams, contentType);
|
||||
if(response != null){
|
||||
return (User) ApiInvoker.deserialize(response, "", User.class);
|
||||
}
|
||||
@@ -195,24 +83,57 @@ public class UserApi {
|
||||
}
|
||||
}
|
||||
}
|
||||
public String loginUser (String username, String password) throws ApiException {
|
||||
public void updateUser (String username, User body) throws ApiException {
|
||||
// verify required params are set
|
||||
if(username == null || body == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
// create path and map variables
|
||||
String path = "/user.{format}/login".replaceAll("\\{format\\}","json");
|
||||
String path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString()));
|
||||
|
||||
// query params
|
||||
Map<String, String> queryParams = new HashMap<String, String>();
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
|
||||
String contentType = "application/json";
|
||||
|
||||
try {
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "PUT", queryParams, body, headerParams, contentType);
|
||||
if(response != null){
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
return ;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.getCode() == 404) {
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
public String loginUser (String username, String password) throws ApiException {
|
||||
// verify required params are set
|
||||
if(username == null || password == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
// create path and map variables
|
||||
String path = "/user/login".replaceAll("\\{format\\}","json");
|
||||
|
||||
// query params
|
||||
Map<String, String> queryParams = new HashMap<String, String>();
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
|
||||
if(!"null".equals(String.valueOf(username)))
|
||||
queryParams.put("username", String.valueOf(username));
|
||||
if(!"null".equals(String.valueOf(password)))
|
||||
queryParams.put("password", String.valueOf(password));
|
||||
String contentType = "application/json";
|
||||
|
||||
try {
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams);
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams, contentType);
|
||||
if(response != null){
|
||||
return (String) ApiInvoker.deserialize(response, "", String.class);
|
||||
}
|
||||
@@ -230,14 +151,109 @@ public class UserApi {
|
||||
}
|
||||
public void logoutUser () throws ApiException {
|
||||
// create path and map variables
|
||||
String path = "/user.{format}/logout".replaceAll("\\{format\\}","json");
|
||||
String path = "/user/logout".replaceAll("\\{format\\}","json");
|
||||
|
||||
// query params
|
||||
Map<String, String> queryParams = new HashMap<String, String>();
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
|
||||
String contentType = "application/json";
|
||||
|
||||
try {
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams);
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams, contentType);
|
||||
if(response != null){
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
return ;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.getCode() == 404) {
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
public void createUser (User body) throws ApiException {
|
||||
// verify required params are set
|
||||
if(body == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
// create path and map variables
|
||||
String path = "/user".replaceAll("\\{format\\}","json");
|
||||
|
||||
// query params
|
||||
Map<String, String> queryParams = new HashMap<String, String>();
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
|
||||
String contentType = "application/json";
|
||||
|
||||
try {
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, body, headerParams, contentType);
|
||||
if(response != null){
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
return ;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.getCode() == 404) {
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
public void createUsersWithArrayInput (List<User> body) throws ApiException {
|
||||
// verify required params are set
|
||||
if(body == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
// create path and map variables
|
||||
String path = "/user/createWithArray".replaceAll("\\{format\\}","json");
|
||||
|
||||
// query params
|
||||
Map<String, String> queryParams = new HashMap<String, String>();
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
|
||||
String contentType = "application/json";
|
||||
|
||||
try {
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, body, headerParams, contentType);
|
||||
if(response != null){
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
return ;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
if(ex.getCode() == 404) {
|
||||
return ;
|
||||
}
|
||||
else {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
public void createUsersWithListInput (List<User> body) throws ApiException {
|
||||
// verify required params are set
|
||||
if(body == null ) {
|
||||
throw new ApiException(400, "missing required params");
|
||||
}
|
||||
// create path and map variables
|
||||
String path = "/user/createWithList".replaceAll("\\{format\\}","json");
|
||||
|
||||
// query params
|
||||
Map<String, String> queryParams = new HashMap<String, String>();
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
|
||||
String contentType = "application/json";
|
||||
|
||||
try {
|
||||
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, body, headerParams, contentType);
|
||||
if(response != null){
|
||||
return ;
|
||||
}
|
||||
|
||||
@@ -4,9 +4,10 @@ import java.util.Date;
|
||||
public class Order {
|
||||
private Long id = null;
|
||||
private Long petId = null;
|
||||
private Integer quantity = null;
|
||||
/* Order Status */
|
||||
private String status = null;
|
||||
private Integer quantity = null;
|
||||
//public enum statusEnum { placed, approved, delivered, };
|
||||
private Date shipDate = null;
|
||||
public Long getId() {
|
||||
return id;
|
||||
@@ -22,13 +23,6 @@ public class Order {
|
||||
this.petId = petId;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
@@ -36,6 +30,13 @@ public class Order {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Date getShipDate() {
|
||||
return shipDate;
|
||||
}
|
||||
@@ -49,8 +50,8 @@ public class Order {
|
||||
sb.append("class Order {\n");
|
||||
sb.append(" id: ").append(id).append("\n");
|
||||
sb.append(" petId: ").append(petId).append("\n");
|
||||
sb.append(" status: ").append(status).append("\n");
|
||||
sb.append(" quantity: ").append(quantity).append("\n");
|
||||
sb.append(" status: ").append(status).append("\n");
|
||||
sb.append(" shipDate: ").append(shipDate).append("\n");
|
||||
sb.append("}\n");
|
||||
return sb.toString();
|
||||
|
||||
@@ -4,13 +4,15 @@ import java.util.*;
|
||||
import com.wordnik.petstore.model.Category;
|
||||
import com.wordnik.petstore.model.Tag;
|
||||
public class Pet {
|
||||
/* unique identifier for the pet */
|
||||
private Long id = null;
|
||||
private List<Tag> tags = new ArrayList<Tag>();
|
||||
private Category category = null;
|
||||
/* pet status in the store */
|
||||
private String status = null;
|
||||
private String name = null;
|
||||
private List<String> photoUrls = new ArrayList<String>();
|
||||
private List<Tag> tags = new ArrayList<Tag>();
|
||||
/* pet status in the store */
|
||||
private String status = null;
|
||||
//public enum statusEnum { available, pending, sold, };
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
@@ -18,13 +20,6 @@ public class Pet {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public List<Tag> getTags() {
|
||||
return tags;
|
||||
}
|
||||
public void setTags(List<Tag> tags) {
|
||||
this.tags = tags;
|
||||
}
|
||||
|
||||
public Category getCategory() {
|
||||
return category;
|
||||
}
|
||||
@@ -32,13 +27,6 @@ public class Pet {
|
||||
this.category = category;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
@@ -53,16 +41,30 @@ public class Pet {
|
||||
this.photoUrls = photoUrls;
|
||||
}
|
||||
|
||||
public List<Tag> getTags() {
|
||||
return tags;
|
||||
}
|
||||
public void setTags(List<Tag> tags) {
|
||||
this.tags = tags;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Pet {\n");
|
||||
sb.append(" id: ").append(id).append("\n");
|
||||
sb.append(" tags: ").append(tags).append("\n");
|
||||
sb.append(" category: ").append(category).append("\n");
|
||||
sb.append(" status: ").append(status).append("\n");
|
||||
sb.append(" name: ").append(name).append("\n");
|
||||
sb.append(" photoUrls: ").append(photoUrls).append("\n");
|
||||
sb.append(" tags: ").append(tags).append("\n");
|
||||
sb.append(" status: ").append(status).append("\n");
|
||||
sb.append("}\n");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@@ -2,14 +2,15 @@ package com.wordnik.petstore.model;
|
||||
|
||||
public class User {
|
||||
private Long id = null;
|
||||
private String lastName = null;
|
||||
private String firstName = null;
|
||||
private String username = null;
|
||||
private String phone = null;
|
||||
private String lastName = null;
|
||||
private String email = null;
|
||||
private String password = null;
|
||||
private String phone = null;
|
||||
/* User Status */
|
||||
private Integer userStatus = null;
|
||||
private String firstName = null;
|
||||
private String password = null;
|
||||
//public enum userStatusEnum { 1-registered, 2-active, 3-closed, };
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
@@ -17,41 +18,6 @@ public class User {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getLastName() {
|
||||
return lastName;
|
||||
}
|
||||
public void setLastName(String lastName) {
|
||||
this.lastName = lastName;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
}
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
public Integer getUserStatus() {
|
||||
return userStatus;
|
||||
}
|
||||
public void setUserStatus(Integer userStatus) {
|
||||
this.userStatus = userStatus;
|
||||
}
|
||||
|
||||
public String getFirstName() {
|
||||
return firstName;
|
||||
}
|
||||
@@ -59,6 +25,27 @@ public class User {
|
||||
this.firstName = firstName;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getLastName() {
|
||||
return lastName;
|
||||
}
|
||||
public void setLastName(String lastName) {
|
||||
this.lastName = lastName;
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
@@ -66,18 +53,32 @@ public class User {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
}
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public Integer getUserStatus() {
|
||||
return userStatus;
|
||||
}
|
||||
public void setUserStatus(Integer userStatus) {
|
||||
this.userStatus = userStatus;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class User {\n");
|
||||
sb.append(" id: ").append(id).append("\n");
|
||||
sb.append(" lastName: ").append(lastName).append("\n");
|
||||
sb.append(" username: ").append(username).append("\n");
|
||||
sb.append(" phone: ").append(phone).append("\n");
|
||||
sb.append(" email: ").append(email).append("\n");
|
||||
sb.append(" userStatus: ").append(userStatus).append("\n");
|
||||
sb.append(" firstName: ").append(firstName).append("\n");
|
||||
sb.append(" username: ").append(username).append("\n");
|
||||
sb.append(" lastName: ").append(lastName).append("\n");
|
||||
sb.append(" email: ").append(email).append("\n");
|
||||
sb.append(" password: ").append(password).append("\n");
|
||||
sb.append(" phone: ").append(phone).append("\n");
|
||||
sb.append(" userStatus: ").append(userStatus).append("\n");
|
||||
sb.append("}\n");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@@ -20,18 +20,25 @@ object ObjcPetstoreCodegen extends BasicObjcGenerator {
|
||||
def main(args: Array[String]) = generateClient(args)
|
||||
|
||||
// where to write generated code
|
||||
override def destinationDir = "samples/client/petstore/objc/client"
|
||||
val outputFolder = "samples/client/petstore/objc/"
|
||||
override def destinationDir = outputFolder + java.io.File.separator + "client"
|
||||
|
||||
// to avoid recompiling ...
|
||||
override def templateDir = "src/main/resources/objc"
|
||||
override def templateDir = "objc"
|
||||
|
||||
additionalParams ++= Map("projectName" -> "PetstoreClient")
|
||||
|
||||
// supporting classes
|
||||
override def supportingFiles =
|
||||
List(
|
||||
("NIKSwaggerObject.h", destinationDir, "NIKSwaggerObject.h"),
|
||||
("NIKSwaggerObject.m", destinationDir, "NIKSwaggerObject.m"),
|
||||
("NIKApiInvoker.h", destinationDir, "NIKApiInvoker.h"),
|
||||
("NIKApiInvoker.m", destinationDir, "NIKApiInvoker.m"),
|
||||
("NIKDate.h", destinationDir, "NIKDate.h"),
|
||||
("NIKDate.m", destinationDir, "NIKDate.m"))
|
||||
("SWGObject.h", destinationDir, "SWGObject.h"),
|
||||
("SWGObject.m", destinationDir, "SWGObject.m"),
|
||||
("SWGApiClient.h", destinationDir, "SWGApiClient.h"),
|
||||
("SWGApiClient.m", destinationDir, "SWGApiClient.m"),
|
||||
("SWGFile.h", destinationDir, "SWGFile.h"),
|
||||
("SWGFile.m", destinationDir, "SWGFile.m"),
|
||||
("SWGDate.h", destinationDir, "SWGDate.h"),
|
||||
("SWGDate.m", destinationDir, "SWGDate.m"),
|
||||
("Podfile.mustache", outputFolder, "Podfile")
|
||||
)
|
||||
}
|
||||
|
||||
1
samples/client/petstore/objc/PetstoreClient.xcworkspace/contents.xcworkspacedata
generated
Normal file
1
samples/client/petstore/objc/PetstoreClient.xcworkspace/contents.xcworkspacedata
generated
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?><Workspace version='1.0'><FileRef location='group:PetstoreClient/PetstoreClient.xcodeproj'/><FileRef location='group:Pods/Pods.xcodeproj'/></Workspace>
|
||||
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDESourceControlProjectFavoriteDictionaryKey</key>
|
||||
<false/>
|
||||
<key>IDESourceControlProjectIdentifier</key>
|
||||
<string>81EB09FA-DD8C-4FE1-82D3-1FB6FF0D9C43</string>
|
||||
<key>IDESourceControlProjectName</key>
|
||||
<string>PetstoreClient</string>
|
||||
<key>IDESourceControlProjectOriginsDictionary</key>
|
||||
<dict>
|
||||
<key>92840518-904D-4771-AA3D-9AF52CA48B71</key>
|
||||
<string>ssh://github.com/wordnik/swagger-codegen.git</string>
|
||||
</dict>
|
||||
<key>IDESourceControlProjectPath</key>
|
||||
<string>samples/client/petstore/objc/PetstoreClient.xcworkspace</string>
|
||||
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
|
||||
<dict>
|
||||
<key>92840518-904D-4771-AA3D-9AF52CA48B71</key>
|
||||
<string>../../../../..</string>
|
||||
</dict>
|
||||
<key>IDESourceControlProjectURL</key>
|
||||
<string>ssh://github.com/wordnik/swagger-codegen.git</string>
|
||||
<key>IDESourceControlProjectVersion</key>
|
||||
<integer>110</integer>
|
||||
<key>IDESourceControlProjectWCCIdentifier</key>
|
||||
<string>92840518-904D-4771-AA3D-9AF52CA48B71</string>
|
||||
<key>IDESourceControlProjectWCConfigurations</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
|
||||
<string>public.vcs.git</string>
|
||||
<key>IDESourceControlWCCIdentifierKey</key>
|
||||
<string>92840518-904D-4771-AA3D-9AF52CA48B71</string>
|
||||
<key>IDESourceControlWCCName</key>
|
||||
<string>swagger-codegen</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
@@ -7,236 +7,245 @@
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
EA07F4BE16134F27006A2112 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EA07F4BD16134F27006A2112 /* Foundation.framework */; };
|
||||
EA07F4C116134F27006A2112 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = EA07F4C016134F27006A2112 /* main.m */; };
|
||||
EA07F4C516134F27006A2112 /* PetstoreClient.1 in CopyFiles */ = {isa = PBXBuildFile; fileRef = EA07F4C416134F27006A2112 /* PetstoreClient.1 */; };
|
||||
EA07F5221613569A006A2112 /* NIKApiInvoker.m in Sources */ = {isa = PBXBuildFile; fileRef = EA07F50D1613569A006A2112 /* NIKApiInvoker.m */; };
|
||||
EA07F5231613569A006A2112 /* NIKCategory.m in Sources */ = {isa = PBXBuildFile; fileRef = EA07F50F1613569A006A2112 /* NIKCategory.m */; };
|
||||
EA07F5241613569A006A2112 /* NIKDate.m in Sources */ = {isa = PBXBuildFile; fileRef = EA07F5111613569A006A2112 /* NIKDate.m */; };
|
||||
EA07F5251613569A006A2112 /* NIKOrder.m in Sources */ = {isa = PBXBuildFile; fileRef = EA07F5131613569A006A2112 /* NIKOrder.m */; };
|
||||
EA07F5261613569A006A2112 /* NIKPet.m in Sources */ = {isa = PBXBuildFile; fileRef = EA07F5151613569A006A2112 /* NIKPet.m */; };
|
||||
EA07F5271613569A006A2112 /* NIKPetApi.m in Sources */ = {isa = PBXBuildFile; fileRef = EA07F5171613569A006A2112 /* NIKPetApi.m */; };
|
||||
EA07F5281613569A006A2112 /* NIKStoreApi.m in Sources */ = {isa = PBXBuildFile; fileRef = EA07F5191613569A006A2112 /* NIKStoreApi.m */; };
|
||||
EA07F5291613569A006A2112 /* NIKSwaggerObject.m in Sources */ = {isa = PBXBuildFile; fileRef = EA07F51B1613569A006A2112 /* NIKSwaggerObject.m */; };
|
||||
EA07F52A1613569A006A2112 /* NIKTag.m in Sources */ = {isa = PBXBuildFile; fileRef = EA07F51D1613569A006A2112 /* NIKTag.m */; };
|
||||
EA07F52B1613569A006A2112 /* NIKUser.m in Sources */ = {isa = PBXBuildFile; fileRef = EA07F51F1613569A006A2112 /* NIKUser.m */; };
|
||||
EA07F52C1613569A006A2112 /* NIKUserApi.m in Sources */ = {isa = PBXBuildFile; fileRef = EA07F5211613569A006A2112 /* NIKUserApi.m */; };
|
||||
EA07F5311613580E006A2112 /* SenTestingKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EA07F5301613580E006A2112 /* SenTestingKit.framework */; };
|
||||
EA07F53316135819006A2112 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EA07F53216135819006A2112 /* Cocoa.framework */; };
|
||||
EA07F53516135916006A2112 /* NIKApiInvoker.h in Sources */ = {isa = PBXBuildFile; fileRef = EA07F50C1613569A006A2112 /* NIKApiInvoker.h */; };
|
||||
EA07F53616135916006A2112 /* NIKApiInvoker.m in Sources */ = {isa = PBXBuildFile; fileRef = EA07F50D1613569A006A2112 /* NIKApiInvoker.m */; };
|
||||
EA07F53716135916006A2112 /* NIKCategory.h in Sources */ = {isa = PBXBuildFile; fileRef = EA07F50E1613569A006A2112 /* NIKCategory.h */; };
|
||||
EA07F53816135916006A2112 /* NIKCategory.m in Sources */ = {isa = PBXBuildFile; fileRef = EA07F50F1613569A006A2112 /* NIKCategory.m */; };
|
||||
EA07F53916135916006A2112 /* NIKDate.h in Sources */ = {isa = PBXBuildFile; fileRef = EA07F5101613569A006A2112 /* NIKDate.h */; };
|
||||
EA07F53A16135916006A2112 /* NIKDate.m in Sources */ = {isa = PBXBuildFile; fileRef = EA07F5111613569A006A2112 /* NIKDate.m */; };
|
||||
EA07F53B16135916006A2112 /* NIKOrder.h in Sources */ = {isa = PBXBuildFile; fileRef = EA07F5121613569A006A2112 /* NIKOrder.h */; };
|
||||
EA07F53C16135916006A2112 /* NIKOrder.m in Sources */ = {isa = PBXBuildFile; fileRef = EA07F5131613569A006A2112 /* NIKOrder.m */; };
|
||||
EA07F53D16135916006A2112 /* NIKPet.h in Sources */ = {isa = PBXBuildFile; fileRef = EA07F5141613569A006A2112 /* NIKPet.h */; };
|
||||
EA07F53E16135916006A2112 /* NIKPet.m in Sources */ = {isa = PBXBuildFile; fileRef = EA07F5151613569A006A2112 /* NIKPet.m */; };
|
||||
EA07F53F16135916006A2112 /* NIKPetApi.h in Sources */ = {isa = PBXBuildFile; fileRef = EA07F5161613569A006A2112 /* NIKPetApi.h */; };
|
||||
EA07F54016135916006A2112 /* NIKPetApi.m in Sources */ = {isa = PBXBuildFile; fileRef = EA07F5171613569A006A2112 /* NIKPetApi.m */; };
|
||||
EA07F54116135916006A2112 /* NIKStoreApi.h in Sources */ = {isa = PBXBuildFile; fileRef = EA07F5181613569A006A2112 /* NIKStoreApi.h */; };
|
||||
EA07F54216135916006A2112 /* NIKStoreApi.m in Sources */ = {isa = PBXBuildFile; fileRef = EA07F5191613569A006A2112 /* NIKStoreApi.m */; };
|
||||
EA07F54316135916006A2112 /* NIKSwaggerObject.h in Sources */ = {isa = PBXBuildFile; fileRef = EA07F51A1613569A006A2112 /* NIKSwaggerObject.h */; };
|
||||
EA07F54416135916006A2112 /* NIKSwaggerObject.m in Sources */ = {isa = PBXBuildFile; fileRef = EA07F51B1613569A006A2112 /* NIKSwaggerObject.m */; };
|
||||
EA07F54516135916006A2112 /* NIKTag.h in Sources */ = {isa = PBXBuildFile; fileRef = EA07F51C1613569A006A2112 /* NIKTag.h */; };
|
||||
EA07F54616135916006A2112 /* NIKTag.m in Sources */ = {isa = PBXBuildFile; fileRef = EA07F51D1613569A006A2112 /* NIKTag.m */; };
|
||||
EA07F54716135916006A2112 /* NIKUser.h in Sources */ = {isa = PBXBuildFile; fileRef = EA07F51E1613569A006A2112 /* NIKUser.h */; };
|
||||
EA07F54816135916006A2112 /* NIKUser.m in Sources */ = {isa = PBXBuildFile; fileRef = EA07F51F1613569A006A2112 /* NIKUser.m */; };
|
||||
EA07F54916135916006A2112 /* NIKUserApi.h in Sources */ = {isa = PBXBuildFile; fileRef = EA07F5201613569A006A2112 /* NIKUserApi.h */; };
|
||||
EA07F54A16135916006A2112 /* NIKUserApi.m in Sources */ = {isa = PBXBuildFile; fileRef = EA07F5211613569A006A2112 /* NIKUserApi.m */; };
|
||||
EA5A034416141443003B3E41 /* UserApiTest.m in Sources */ = {isa = PBXBuildFile; fileRef = EA5A034316141443003B3E41 /* UserApiTest.m */; };
|
||||
EAE96DE616138695004AB97C /* PetApiTest.m in Sources */ = {isa = PBXBuildFile; fileRef = EA81837816137FD500341A6E /* PetApiTest.m */; };
|
||||
EAE96DE716138695004AB97C /* PetApiTest.h in Sources */ = {isa = PBXBuildFile; fileRef = EA81837916137FD500341A6E /* PetApiTest.h */; };
|
||||
BA525648922D4C0E9F44D4F1 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 73DA4F1067C343C3962F1542 /* libPods.a */; };
|
||||
EA66999A1811D2FA00A70D03 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EA6699991811D2FA00A70D03 /* Foundation.framework */; };
|
||||
EA66999C1811D2FA00A70D03 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EA66999B1811D2FA00A70D03 /* CoreGraphics.framework */; };
|
||||
EA66999E1811D2FA00A70D03 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EA66999D1811D2FA00A70D03 /* UIKit.framework */; };
|
||||
EA6699A41811D2FA00A70D03 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = EA6699A21811D2FA00A70D03 /* InfoPlist.strings */; };
|
||||
EA6699A61811D2FA00A70D03 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = EA6699A51811D2FA00A70D03 /* main.m */; };
|
||||
EA6699AA1811D2FA00A70D03 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = EA6699A91811D2FA00A70D03 /* AppDelegate.m */; };
|
||||
EA6699AD1811D2FA00A70D03 /* Main_iPhone.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = EA6699AB1811D2FA00A70D03 /* Main_iPhone.storyboard */; };
|
||||
EA6699B01811D2FA00A70D03 /* Main_iPad.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = EA6699AE1811D2FA00A70D03 /* Main_iPad.storyboard */; };
|
||||
EA6699B31811D2FA00A70D03 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = EA6699B21811D2FA00A70D03 /* ViewController.m */; };
|
||||
EA6699B51811D2FA00A70D03 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = EA6699B41811D2FA00A70D03 /* Images.xcassets */; };
|
||||
EA6699BC1811D2FB00A70D03 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EA6699BB1811D2FB00A70D03 /* XCTest.framework */; };
|
||||
EA6699BD1811D2FB00A70D03 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EA6699991811D2FA00A70D03 /* Foundation.framework */; };
|
||||
EA6699BE1811D2FB00A70D03 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EA66999D1811D2FA00A70D03 /* UIKit.framework */; };
|
||||
EA6699C61811D2FB00A70D03 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = EA6699C41811D2FB00A70D03 /* InfoPlist.strings */; };
|
||||
EA6699C81811D2FB00A70D03 /* PetstoreClientTests.m in Sources */ = {isa = PBXBuildFile; fileRef = EA6699C71811D2FB00A70D03 /* PetstoreClientTests.m */; };
|
||||
EAEA85E41811D3AE00F06E69 /* SWGApiClient.m in Sources */ = {isa = PBXBuildFile; fileRef = EAEA85CD1811D3AE00F06E69 /* SWGApiClient.m */; };
|
||||
EAEA85E51811D3AE00F06E69 /* SWGCategory.m in Sources */ = {isa = PBXBuildFile; fileRef = EAEA85CF1811D3AE00F06E69 /* SWGCategory.m */; };
|
||||
EAEA85E61811D3AE00F06E69 /* SWGDate.m in Sources */ = {isa = PBXBuildFile; fileRef = EAEA85D11811D3AE00F06E69 /* SWGDate.m */; };
|
||||
EAEA85E71811D3AE00F06E69 /* SWGFile.m in Sources */ = {isa = PBXBuildFile; fileRef = EAEA85D31811D3AE00F06E69 /* SWGFile.m */; };
|
||||
EAEA85E81811D3AE00F06E69 /* SWGObject.m in Sources */ = {isa = PBXBuildFile; fileRef = EAEA85D51811D3AE00F06E69 /* SWGObject.m */; };
|
||||
EAEA85E91811D3AE00F06E69 /* SWGOrder.m in Sources */ = {isa = PBXBuildFile; fileRef = EAEA85D71811D3AE00F06E69 /* SWGOrder.m */; };
|
||||
EAEA85EA1811D3AE00F06E69 /* SWGPet.m in Sources */ = {isa = PBXBuildFile; fileRef = EAEA85D91811D3AE00F06E69 /* SWGPet.m */; };
|
||||
EAEA85EB1811D3AE00F06E69 /* SWGPetApi.m in Sources */ = {isa = PBXBuildFile; fileRef = EAEA85DB1811D3AE00F06E69 /* SWGPetApi.m */; };
|
||||
EAEA85EC1811D3AE00F06E69 /* SWGStoreApi.m in Sources */ = {isa = PBXBuildFile; fileRef = EAEA85DD1811D3AE00F06E69 /* SWGStoreApi.m */; };
|
||||
EAEA85ED1811D3AE00F06E69 /* SWGTag.m in Sources */ = {isa = PBXBuildFile; fileRef = EAEA85DF1811D3AE00F06E69 /* SWGTag.m */; };
|
||||
EAEA85EE1811D3AE00F06E69 /* SWGUser.m in Sources */ = {isa = PBXBuildFile; fileRef = EAEA85E11811D3AE00F06E69 /* SWGUser.m */; };
|
||||
EAEA85EF1811D3AE00F06E69 /* SWGUserApi.m in Sources */ = {isa = PBXBuildFile; fileRef = EAEA85E31811D3AE00F06E69 /* SWGUserApi.m */; };
|
||||
EAEA85F11811D8F100F06E69 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = EAEA85F01811D8F100F06E69 /* libPods.a */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
EA07F52E161357A5006A2112 /* PBXContainerItemProxy */ = {
|
||||
EA6699BF1811D2FB00A70D03 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = EA07F4B016134F27006A2112 /* Project object */;
|
||||
containerPortal = EA66998E1811D2FA00A70D03 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = EA07F4B816134F27006A2112;
|
||||
remoteGlobalIDString = EA6699951811D2FA00A70D03;
|
||||
remoteInfo = PetstoreClient;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
EA07F4B716134F27006A2112 /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = /usr/share/man/man1/;
|
||||
dstSubfolderSpec = 0;
|
||||
files = (
|
||||
EA07F4C516134F27006A2112 /* PetstoreClient.1 in CopyFiles */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 1;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
EA07F4B916134F27006A2112 /* PetstoreClient */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = PetstoreClient; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
EA07F4BD16134F27006A2112 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||
EA07F4C016134F27006A2112 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
|
||||
EA07F4C316134F27006A2112 /* PetstoreClient-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PetstoreClient-Prefix.pch"; sourceTree = "<group>"; };
|
||||
EA07F4C416134F27006A2112 /* PetstoreClient.1 */ = {isa = PBXFileReference; lastKnownFileType = text.man; path = PetstoreClient.1; sourceTree = "<group>"; };
|
||||
EA07F4F21613521A006A2112 /* PetstoreClientTests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PetstoreClientTests.octest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
EA07F50C1613569A006A2112 /* NIKApiInvoker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NIKApiInvoker.h; path = ../client/NIKApiInvoker.h; sourceTree = "<group>"; };
|
||||
EA07F50D1613569A006A2112 /* NIKApiInvoker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NIKApiInvoker.m; path = ../client/NIKApiInvoker.m; sourceTree = "<group>"; };
|
||||
EA07F50E1613569A006A2112 /* NIKCategory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NIKCategory.h; path = ../client/NIKCategory.h; sourceTree = "<group>"; };
|
||||
EA07F50F1613569A006A2112 /* NIKCategory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NIKCategory.m; path = ../client/NIKCategory.m; sourceTree = "<group>"; };
|
||||
EA07F5101613569A006A2112 /* NIKDate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NIKDate.h; path = ../client/NIKDate.h; sourceTree = "<group>"; };
|
||||
EA07F5111613569A006A2112 /* NIKDate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NIKDate.m; path = ../client/NIKDate.m; sourceTree = "<group>"; };
|
||||
EA07F5121613569A006A2112 /* NIKOrder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NIKOrder.h; path = ../client/NIKOrder.h; sourceTree = "<group>"; };
|
||||
EA07F5131613569A006A2112 /* NIKOrder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NIKOrder.m; path = ../client/NIKOrder.m; sourceTree = "<group>"; };
|
||||
EA07F5141613569A006A2112 /* NIKPet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NIKPet.h; path = ../client/NIKPet.h; sourceTree = "<group>"; };
|
||||
EA07F5151613569A006A2112 /* NIKPet.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NIKPet.m; path = ../client/NIKPet.m; sourceTree = "<group>"; };
|
||||
EA07F5161613569A006A2112 /* NIKPetApi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NIKPetApi.h; path = ../client/NIKPetApi.h; sourceTree = "<group>"; };
|
||||
EA07F5171613569A006A2112 /* NIKPetApi.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NIKPetApi.m; path = ../client/NIKPetApi.m; sourceTree = "<group>"; };
|
||||
EA07F5181613569A006A2112 /* NIKStoreApi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NIKStoreApi.h; path = ../client/NIKStoreApi.h; sourceTree = "<group>"; };
|
||||
EA07F5191613569A006A2112 /* NIKStoreApi.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NIKStoreApi.m; path = ../client/NIKStoreApi.m; sourceTree = "<group>"; };
|
||||
EA07F51A1613569A006A2112 /* NIKSwaggerObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NIKSwaggerObject.h; path = ../client/NIKSwaggerObject.h; sourceTree = "<group>"; };
|
||||
EA07F51B1613569A006A2112 /* NIKSwaggerObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NIKSwaggerObject.m; path = ../client/NIKSwaggerObject.m; sourceTree = "<group>"; };
|
||||
EA07F51C1613569A006A2112 /* NIKTag.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NIKTag.h; path = ../client/NIKTag.h; sourceTree = "<group>"; };
|
||||
EA07F51D1613569A006A2112 /* NIKTag.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NIKTag.m; path = ../client/NIKTag.m; sourceTree = "<group>"; };
|
||||
EA07F51E1613569A006A2112 /* NIKUser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NIKUser.h; path = ../client/NIKUser.h; sourceTree = "<group>"; };
|
||||
EA07F51F1613569A006A2112 /* NIKUser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NIKUser.m; path = ../client/NIKUser.m; sourceTree = "<group>"; };
|
||||
EA07F5201613569A006A2112 /* NIKUserApi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NIKUserApi.h; path = ../client/NIKUserApi.h; sourceTree = "<group>"; };
|
||||
EA07F5211613569A006A2112 /* NIKUserApi.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NIKUserApi.m; path = ../client/NIKUserApi.m; sourceTree = "<group>"; };
|
||||
EA07F5301613580E006A2112 /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = Library/Frameworks/SenTestingKit.framework; sourceTree = DEVELOPER_DIR; };
|
||||
EA07F53216135819006A2112 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
|
||||
EA5A034216141443003B3E41 /* UserApiTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UserApiTest.h; path = ../tests/UserApiTest.h; sourceTree = "<group>"; };
|
||||
EA5A034316141443003B3E41 /* UserApiTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = UserApiTest.m; path = ../tests/UserApiTest.m; sourceTree = "<group>"; };
|
||||
EA81837816137FD500341A6E /* PetApiTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PetApiTest.m; path = ../tests/PetApiTest.m; sourceTree = "<group>"; };
|
||||
EA81837916137FD500341A6E /* PetApiTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PetApiTest.h; path = ../tests/PetApiTest.h; sourceTree = "<group>"; };
|
||||
73DA4F1067C343C3962F1542 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
EA5799F266AC4D21AD004BC4 /* Pods.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.xcconfig; path = ../Pods/Pods.xcconfig; sourceTree = "<group>"; };
|
||||
EA6699961811D2FA00A70D03 /* PetstoreClient.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PetstoreClient.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
EA6699991811D2FA00A70D03 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||
EA66999B1811D2FA00A70D03 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
|
||||
EA66999D1811D2FA00A70D03 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
|
||||
EA6699A11811D2FA00A70D03 /* PetstoreClient-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "PetstoreClient-Info.plist"; sourceTree = "<group>"; };
|
||||
EA6699A31811D2FA00A70D03 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
EA6699A51811D2FA00A70D03 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
|
||||
EA6699A71811D2FA00A70D03 /* PetstoreClient-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PetstoreClient-Prefix.pch"; sourceTree = "<group>"; };
|
||||
EA6699A81811D2FA00A70D03 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
|
||||
EA6699A91811D2FA00A70D03 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
|
||||
EA6699AC1811D2FA00A70D03 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main_iPhone.storyboard; sourceTree = "<group>"; };
|
||||
EA6699AF1811D2FA00A70D03 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main_iPad.storyboard; sourceTree = "<group>"; };
|
||||
EA6699B11811D2FA00A70D03 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
|
||||
EA6699B21811D2FA00A70D03 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
|
||||
EA6699B41811D2FA00A70D03 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
|
||||
EA6699BA1811D2FB00A70D03 /* PetstoreClientTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PetstoreClientTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
EA6699BB1811D2FB00A70D03 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
|
||||
EA6699C31811D2FB00A70D03 /* PetstoreClientTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "PetstoreClientTests-Info.plist"; sourceTree = "<group>"; };
|
||||
EA6699C51811D2FB00A70D03 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
EA6699C71811D2FB00A70D03 /* PetstoreClientTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PetstoreClientTests.m; sourceTree = "<group>"; };
|
||||
EAEA85CC1811D3AE00F06E69 /* SWGApiClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SWGApiClient.h; sourceTree = "<group>"; };
|
||||
EAEA85CD1811D3AE00F06E69 /* SWGApiClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SWGApiClient.m; sourceTree = "<group>"; };
|
||||
EAEA85CE1811D3AE00F06E69 /* SWGCategory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SWGCategory.h; sourceTree = "<group>"; };
|
||||
EAEA85CF1811D3AE00F06E69 /* SWGCategory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SWGCategory.m; sourceTree = "<group>"; };
|
||||
EAEA85D01811D3AE00F06E69 /* SWGDate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SWGDate.h; sourceTree = "<group>"; };
|
||||
EAEA85D11811D3AE00F06E69 /* SWGDate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SWGDate.m; sourceTree = "<group>"; };
|
||||
EAEA85D21811D3AE00F06E69 /* SWGFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SWGFile.h; sourceTree = "<group>"; };
|
||||
EAEA85D31811D3AE00F06E69 /* SWGFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SWGFile.m; sourceTree = "<group>"; };
|
||||
EAEA85D41811D3AE00F06E69 /* SWGObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SWGObject.h; sourceTree = "<group>"; };
|
||||
EAEA85D51811D3AE00F06E69 /* SWGObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SWGObject.m; sourceTree = "<group>"; };
|
||||
EAEA85D61811D3AE00F06E69 /* SWGOrder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SWGOrder.h; sourceTree = "<group>"; };
|
||||
EAEA85D71811D3AE00F06E69 /* SWGOrder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SWGOrder.m; sourceTree = "<group>"; };
|
||||
EAEA85D81811D3AE00F06E69 /* SWGPet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SWGPet.h; sourceTree = "<group>"; };
|
||||
EAEA85D91811D3AE00F06E69 /* SWGPet.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SWGPet.m; sourceTree = "<group>"; };
|
||||
EAEA85DA1811D3AE00F06E69 /* SWGPetApi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SWGPetApi.h; sourceTree = "<group>"; };
|
||||
EAEA85DB1811D3AE00F06E69 /* SWGPetApi.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SWGPetApi.m; sourceTree = "<group>"; };
|
||||
EAEA85DC1811D3AE00F06E69 /* SWGStoreApi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SWGStoreApi.h; sourceTree = "<group>"; };
|
||||
EAEA85DD1811D3AE00F06E69 /* SWGStoreApi.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SWGStoreApi.m; sourceTree = "<group>"; };
|
||||
EAEA85DE1811D3AE00F06E69 /* SWGTag.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SWGTag.h; sourceTree = "<group>"; };
|
||||
EAEA85DF1811D3AE00F06E69 /* SWGTag.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SWGTag.m; sourceTree = "<group>"; };
|
||||
EAEA85E01811D3AE00F06E69 /* SWGUser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SWGUser.h; sourceTree = "<group>"; };
|
||||
EAEA85E11811D3AE00F06E69 /* SWGUser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SWGUser.m; sourceTree = "<group>"; };
|
||||
EAEA85E21811D3AE00F06E69 /* SWGUserApi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SWGUserApi.h; sourceTree = "<group>"; };
|
||||
EAEA85E31811D3AE00F06E69 /* SWGUserApi.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SWGUserApi.m; sourceTree = "<group>"; };
|
||||
EAEA85F01811D8F100F06E69 /* libPods.a */ = {isa = PBXFileReference; lastKnownFileType = file; name = libPods.a; path = "../Pods/build/Debug-iphoneos/libPods.a"; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
EA07F4B616134F27006A2112 /* Frameworks */ = {
|
||||
EA6699931811D2FA00A70D03 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
EA07F4BE16134F27006A2112 /* Foundation.framework in Frameworks */,
|
||||
EA66999C1811D2FA00A70D03 /* CoreGraphics.framework in Frameworks */,
|
||||
EA66999E1811D2FA00A70D03 /* UIKit.framework in Frameworks */,
|
||||
EA66999A1811D2FA00A70D03 /* Foundation.framework in Frameworks */,
|
||||
BA525648922D4C0E9F44D4F1 /* libPods.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
EA07F4EE1613521A006A2112 /* Frameworks */ = {
|
||||
EA6699B71811D2FB00A70D03 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
EA07F53316135819006A2112 /* Cocoa.framework in Frameworks */,
|
||||
EA07F5311613580E006A2112 /* SenTestingKit.framework in Frameworks */,
|
||||
EAEA85F11811D8F100F06E69 /* libPods.a in Frameworks */,
|
||||
EA6699BC1811D2FB00A70D03 /* XCTest.framework in Frameworks */,
|
||||
EA6699BE1811D2FB00A70D03 /* UIKit.framework in Frameworks */,
|
||||
EA6699BD1811D2FB00A70D03 /* Foundation.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
EA07F4AE16134F27006A2112 = {
|
||||
EA66998D1811D2FA00A70D03 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
EA81837C1613809300341A6E /* Tests */,
|
||||
EA07F52D1613569E006A2112 /* Generated Client */,
|
||||
EA07F4BF16134F27006A2112 /* PetstoreClient */,
|
||||
EA07F4BC16134F27006A2112 /* Frameworks */,
|
||||
EA07F4BA16134F27006A2112 /* Products */,
|
||||
EAEA85CB1811D3AE00F06E69 /* client */,
|
||||
EA66999F1811D2FA00A70D03 /* PetstoreClient */,
|
||||
EA6699C11811D2FB00A70D03 /* PetstoreClientTests */,
|
||||
EA6699981811D2FA00A70D03 /* Frameworks */,
|
||||
EA6699971811D2FA00A70D03 /* Products */,
|
||||
EA5799F266AC4D21AD004BC4 /* Pods.xcconfig */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
EA07F4BA16134F27006A2112 /* Products */ = {
|
||||
EA6699971811D2FA00A70D03 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
EA07F4B916134F27006A2112 /* PetstoreClient */,
|
||||
EA07F4F21613521A006A2112 /* PetstoreClientTests.octest */,
|
||||
EA6699961811D2FA00A70D03 /* PetstoreClient.app */,
|
||||
EA6699BA1811D2FB00A70D03 /* PetstoreClientTests.xctest */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
EA07F4BC16134F27006A2112 /* Frameworks */ = {
|
||||
EA6699981811D2FA00A70D03 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
EA07F53216135819006A2112 /* Cocoa.framework */,
|
||||
EA07F5301613580E006A2112 /* SenTestingKit.framework */,
|
||||
EA07F4BD16134F27006A2112 /* Foundation.framework */,
|
||||
EA07F4F71613521A006A2112 /* Other Frameworks */,
|
||||
EAEA85F01811D8F100F06E69 /* libPods.a */,
|
||||
EA6699991811D2FA00A70D03 /* Foundation.framework */,
|
||||
EA66999B1811D2FA00A70D03 /* CoreGraphics.framework */,
|
||||
EA66999D1811D2FA00A70D03 /* UIKit.framework */,
|
||||
EA6699BB1811D2FB00A70D03 /* XCTest.framework */,
|
||||
73DA4F1067C343C3962F1542 /* libPods.a */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
EA07F4BF16134F27006A2112 /* PetstoreClient */ = {
|
||||
EA66999F1811D2FA00A70D03 /* PetstoreClient */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
EA07F4C016134F27006A2112 /* main.m */,
|
||||
EA07F4C416134F27006A2112 /* PetstoreClient.1 */,
|
||||
EA07F4C216134F27006A2112 /* Supporting Files */,
|
||||
EA6699A81811D2FA00A70D03 /* AppDelegate.h */,
|
||||
EA6699A91811D2FA00A70D03 /* AppDelegate.m */,
|
||||
EA6699AB1811D2FA00A70D03 /* Main_iPhone.storyboard */,
|
||||
EA6699AE1811D2FA00A70D03 /* Main_iPad.storyboard */,
|
||||
EA6699B11811D2FA00A70D03 /* ViewController.h */,
|
||||
EA6699B21811D2FA00A70D03 /* ViewController.m */,
|
||||
EA6699B41811D2FA00A70D03 /* Images.xcassets */,
|
||||
EA6699A01811D2FA00A70D03 /* Supporting Files */,
|
||||
);
|
||||
path = PetstoreClient;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
EA07F4C216134F27006A2112 /* Supporting Files */ = {
|
||||
EA6699A01811D2FA00A70D03 /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
EA07F4C316134F27006A2112 /* PetstoreClient-Prefix.pch */,
|
||||
EA6699A11811D2FA00A70D03 /* PetstoreClient-Info.plist */,
|
||||
EA6699A21811D2FA00A70D03 /* InfoPlist.strings */,
|
||||
EA6699A51811D2FA00A70D03 /* main.m */,
|
||||
EA6699A71811D2FA00A70D03 /* PetstoreClient-Prefix.pch */,
|
||||
);
|
||||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
EA07F4F71613521A006A2112 /* Other Frameworks */ = {
|
||||
EA6699C11811D2FB00A70D03 /* PetstoreClientTests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
EA6699C71811D2FB00A70D03 /* PetstoreClientTests.m */,
|
||||
EA6699C21811D2FB00A70D03 /* Supporting Files */,
|
||||
);
|
||||
name = "Other Frameworks";
|
||||
path = PetstoreClientTests;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
EA07F52D1613569E006A2112 /* Generated Client */ = {
|
||||
EA6699C21811D2FB00A70D03 /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
EA07F50C1613569A006A2112 /* NIKApiInvoker.h */,
|
||||
EA07F50D1613569A006A2112 /* NIKApiInvoker.m */,
|
||||
EA07F50E1613569A006A2112 /* NIKCategory.h */,
|
||||
EA07F50F1613569A006A2112 /* NIKCategory.m */,
|
||||
EA07F5101613569A006A2112 /* NIKDate.h */,
|
||||
EA07F5111613569A006A2112 /* NIKDate.m */,
|
||||
EA07F5121613569A006A2112 /* NIKOrder.h */,
|
||||
EA07F5131613569A006A2112 /* NIKOrder.m */,
|
||||
EA07F5141613569A006A2112 /* NIKPet.h */,
|
||||
EA07F5151613569A006A2112 /* NIKPet.m */,
|
||||
EA07F5161613569A006A2112 /* NIKPetApi.h */,
|
||||
EA07F5171613569A006A2112 /* NIKPetApi.m */,
|
||||
EA07F5181613569A006A2112 /* NIKStoreApi.h */,
|
||||
EA07F5191613569A006A2112 /* NIKStoreApi.m */,
|
||||
EA07F51A1613569A006A2112 /* NIKSwaggerObject.h */,
|
||||
EA07F51B1613569A006A2112 /* NIKSwaggerObject.m */,
|
||||
EA07F51C1613569A006A2112 /* NIKTag.h */,
|
||||
EA07F51D1613569A006A2112 /* NIKTag.m */,
|
||||
EA07F51E1613569A006A2112 /* NIKUser.h */,
|
||||
EA07F51F1613569A006A2112 /* NIKUser.m */,
|
||||
EA07F5201613569A006A2112 /* NIKUserApi.h */,
|
||||
EA07F5211613569A006A2112 /* NIKUserApi.m */,
|
||||
EA6699C31811D2FB00A70D03 /* PetstoreClientTests-Info.plist */,
|
||||
EA6699C41811D2FB00A70D03 /* InfoPlist.strings */,
|
||||
);
|
||||
name = "Generated Client";
|
||||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
EA81837C1613809300341A6E /* Tests */ = {
|
||||
EAEA85CB1811D3AE00F06E69 /* client */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
EA81837816137FD500341A6E /* PetApiTest.m */,
|
||||
EA81837916137FD500341A6E /* PetApiTest.h */,
|
||||
EA5A034216141443003B3E41 /* UserApiTest.h */,
|
||||
EA5A034316141443003B3E41 /* UserApiTest.m */,
|
||||
EAEA85CC1811D3AE00F06E69 /* SWGApiClient.h */,
|
||||
EAEA85CD1811D3AE00F06E69 /* SWGApiClient.m */,
|
||||
EAEA85CE1811D3AE00F06E69 /* SWGCategory.h */,
|
||||
EAEA85CF1811D3AE00F06E69 /* SWGCategory.m */,
|
||||
EAEA85D01811D3AE00F06E69 /* SWGDate.h */,
|
||||
EAEA85D11811D3AE00F06E69 /* SWGDate.m */,
|
||||
EAEA85D21811D3AE00F06E69 /* SWGFile.h */,
|
||||
EAEA85D31811D3AE00F06E69 /* SWGFile.m */,
|
||||
EAEA85D41811D3AE00F06E69 /* SWGObject.h */,
|
||||
EAEA85D51811D3AE00F06E69 /* SWGObject.m */,
|
||||
EAEA85D61811D3AE00F06E69 /* SWGOrder.h */,
|
||||
EAEA85D71811D3AE00F06E69 /* SWGOrder.m */,
|
||||
EAEA85D81811D3AE00F06E69 /* SWGPet.h */,
|
||||
EAEA85D91811D3AE00F06E69 /* SWGPet.m */,
|
||||
EAEA85DA1811D3AE00F06E69 /* SWGPetApi.h */,
|
||||
EAEA85DB1811D3AE00F06E69 /* SWGPetApi.m */,
|
||||
EAEA85DC1811D3AE00F06E69 /* SWGStoreApi.h */,
|
||||
EAEA85DD1811D3AE00F06E69 /* SWGStoreApi.m */,
|
||||
EAEA85DE1811D3AE00F06E69 /* SWGTag.h */,
|
||||
EAEA85DF1811D3AE00F06E69 /* SWGTag.m */,
|
||||
EAEA85E01811D3AE00F06E69 /* SWGUser.h */,
|
||||
EAEA85E11811D3AE00F06E69 /* SWGUser.m */,
|
||||
EAEA85E21811D3AE00F06E69 /* SWGUserApi.h */,
|
||||
EAEA85E31811D3AE00F06E69 /* SWGUserApi.m */,
|
||||
);
|
||||
name = Tests;
|
||||
name = client;
|
||||
path = ../client;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
EA07F4B816134F27006A2112 /* PetstoreClient */ = {
|
||||
EA6699951811D2FA00A70D03 /* PetstoreClient */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = EA07F4C816134F27006A2112 /* Build configuration list for PBXNativeTarget "PetstoreClient" */;
|
||||
buildConfigurationList = EA6699CB1811D2FB00A70D03 /* Build configuration list for PBXNativeTarget "PetstoreClient" */;
|
||||
buildPhases = (
|
||||
EA07F4B516134F27006A2112 /* Sources */,
|
||||
EA07F4B616134F27006A2112 /* Frameworks */,
|
||||
EA07F4B716134F27006A2112 /* CopyFiles */,
|
||||
04DAA264FD78471BBAD25173 /* Check Pods Manifest.lock */,
|
||||
EA6699921811D2FA00A70D03 /* Sources */,
|
||||
EA6699931811D2FA00A70D03 /* Frameworks */,
|
||||
EA6699941811D2FA00A70D03 /* Resources */,
|
||||
3692D11BB04F489DAA7C0B6A /* Copy Pods Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@@ -244,161 +253,213 @@
|
||||
);
|
||||
name = PetstoreClient;
|
||||
productName = PetstoreClient;
|
||||
productReference = EA07F4B916134F27006A2112 /* PetstoreClient */;
|
||||
productType = "com.apple.product-type.tool";
|
||||
productReference = EA6699961811D2FA00A70D03 /* PetstoreClient.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
EA07F4F11613521A006A2112 /* PetstoreClientTests */ = {
|
||||
EA6699B91811D2FB00A70D03 /* PetstoreClientTests */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = EA07F5051613521A006A2112 /* Build configuration list for PBXNativeTarget "PetstoreClientTests" */;
|
||||
buildConfigurationList = EA6699CE1811D2FB00A70D03 /* Build configuration list for PBXNativeTarget "PetstoreClientTests" */;
|
||||
buildPhases = (
|
||||
EA07F4ED1613521A006A2112 /* Sources */,
|
||||
EA07F4EE1613521A006A2112 /* Frameworks */,
|
||||
EA07F4EF1613521A006A2112 /* Resources */,
|
||||
EA07F4F01613521A006A2112 /* ShellScript */,
|
||||
EA6699B61811D2FB00A70D03 /* Sources */,
|
||||
EA6699B71811D2FB00A70D03 /* Frameworks */,
|
||||
EA6699B81811D2FB00A70D03 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
EA07F52F161357A5006A2112 /* PBXTargetDependency */,
|
||||
EA6699C01811D2FB00A70D03 /* PBXTargetDependency */,
|
||||
);
|
||||
name = PetstoreClientTests;
|
||||
productName = PetstoreClientTests;
|
||||
productReference = EA07F4F21613521A006A2112 /* PetstoreClientTests.octest */;
|
||||
productType = "com.apple.product-type.bundle";
|
||||
productReference = EA6699BA1811D2FB00A70D03 /* PetstoreClientTests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.unit-test";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
EA07F4B016134F27006A2112 /* Project object */ = {
|
||||
EA66998E1811D2FA00A70D03 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0450;
|
||||
ORGANIZATIONNAME = "Tony Tam";
|
||||
LastUpgradeCheck = 0500;
|
||||
ORGANIZATIONNAME = Reverb;
|
||||
TargetAttributes = {
|
||||
EA6699B91811D2FB00A70D03 = {
|
||||
TestTargetID = EA6699951811D2FA00A70D03;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = EA07F4B316134F27006A2112 /* Build configuration list for PBXProject "PetstoreClient" */;
|
||||
buildConfigurationList = EA6699911811D2FA00A70D03 /* Build configuration list for PBXProject "PetstoreClient" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = EA07F4AE16134F27006A2112;
|
||||
productRefGroup = EA07F4BA16134F27006A2112 /* Products */;
|
||||
mainGroup = EA66998D1811D2FA00A70D03;
|
||||
productRefGroup = EA6699971811D2FA00A70D03 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
EA07F4B816134F27006A2112 /* PetstoreClient */,
|
||||
EA07F4F11613521A006A2112 /* PetstoreClientTests */,
|
||||
EA6699951811D2FA00A70D03 /* PetstoreClient */,
|
||||
EA6699B91811D2FB00A70D03 /* PetstoreClientTests */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
EA07F4EF1613521A006A2112 /* Resources */ = {
|
||||
EA6699941811D2FA00A70D03 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
EA6699B01811D2FA00A70D03 /* Main_iPad.storyboard in Resources */,
|
||||
EA6699B51811D2FA00A70D03 /* Images.xcassets in Resources */,
|
||||
EA6699AD1811D2FA00A70D03 /* Main_iPhone.storyboard in Resources */,
|
||||
EA6699A41811D2FA00A70D03 /* InfoPlist.strings in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
EA6699B81811D2FB00A70D03 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
EA6699C61811D2FB00A70D03 /* InfoPlist.strings in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
EA07F4F01613521A006A2112 /* ShellScript */ = {
|
||||
04DAA264FD78471BBAD25173 /* Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Check Pods Manifest.lock";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n";
|
||||
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
3692D11BB04F489DAA7C0B6A /* Copy Pods Resources */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Copy Pods Resources";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${SRCROOT}/../Pods/Pods-resources.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
EA07F4B516134F27006A2112 /* Sources */ = {
|
||||
EA6699921811D2FA00A70D03 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
EA07F4C116134F27006A2112 /* main.m in Sources */,
|
||||
EA07F5221613569A006A2112 /* NIKApiInvoker.m in Sources */,
|
||||
EA07F5231613569A006A2112 /* NIKCategory.m in Sources */,
|
||||
EA07F5241613569A006A2112 /* NIKDate.m in Sources */,
|
||||
EA07F5251613569A006A2112 /* NIKOrder.m in Sources */,
|
||||
EA07F5261613569A006A2112 /* NIKPet.m in Sources */,
|
||||
EA07F5271613569A006A2112 /* NIKPetApi.m in Sources */,
|
||||
EA07F5281613569A006A2112 /* NIKStoreApi.m in Sources */,
|
||||
EA07F5291613569A006A2112 /* NIKSwaggerObject.m in Sources */,
|
||||
EA07F52A1613569A006A2112 /* NIKTag.m in Sources */,
|
||||
EA07F52B1613569A006A2112 /* NIKUser.m in Sources */,
|
||||
EA07F52C1613569A006A2112 /* NIKUserApi.m in Sources */,
|
||||
EAEA85E51811D3AE00F06E69 /* SWGCategory.m in Sources */,
|
||||
EAEA85ED1811D3AE00F06E69 /* SWGTag.m in Sources */,
|
||||
EA6699B31811D2FA00A70D03 /* ViewController.m in Sources */,
|
||||
EA6699AA1811D2FA00A70D03 /* AppDelegate.m in Sources */,
|
||||
EAEA85EE1811D3AE00F06E69 /* SWGUser.m in Sources */,
|
||||
EAEA85EF1811D3AE00F06E69 /* SWGUserApi.m in Sources */,
|
||||
EAEA85EB1811D3AE00F06E69 /* SWGPetApi.m in Sources */,
|
||||
EAEA85E61811D3AE00F06E69 /* SWGDate.m in Sources */,
|
||||
EA6699A61811D2FA00A70D03 /* main.m in Sources */,
|
||||
EAEA85EA1811D3AE00F06E69 /* SWGPet.m in Sources */,
|
||||
EAEA85E41811D3AE00F06E69 /* SWGApiClient.m in Sources */,
|
||||
EAEA85EC1811D3AE00F06E69 /* SWGStoreApi.m in Sources */,
|
||||
EAEA85E91811D3AE00F06E69 /* SWGOrder.m in Sources */,
|
||||
EAEA85E81811D3AE00F06E69 /* SWGObject.m in Sources */,
|
||||
EAEA85E71811D3AE00F06E69 /* SWGFile.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
EA07F4ED1613521A006A2112 /* Sources */ = {
|
||||
EA6699B61811D2FB00A70D03 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
EAE96DE616138695004AB97C /* PetApiTest.m in Sources */,
|
||||
EAE96DE716138695004AB97C /* PetApiTest.h in Sources */,
|
||||
EA07F53516135916006A2112 /* NIKApiInvoker.h in Sources */,
|
||||
EA07F53616135916006A2112 /* NIKApiInvoker.m in Sources */,
|
||||
EA07F53716135916006A2112 /* NIKCategory.h in Sources */,
|
||||
EA07F53816135916006A2112 /* NIKCategory.m in Sources */,
|
||||
EA07F53916135916006A2112 /* NIKDate.h in Sources */,
|
||||
EA07F53A16135916006A2112 /* NIKDate.m in Sources */,
|
||||
EA07F53B16135916006A2112 /* NIKOrder.h in Sources */,
|
||||
EA07F53C16135916006A2112 /* NIKOrder.m in Sources */,
|
||||
EA07F53D16135916006A2112 /* NIKPet.h in Sources */,
|
||||
EA07F53E16135916006A2112 /* NIKPet.m in Sources */,
|
||||
EA07F53F16135916006A2112 /* NIKPetApi.h in Sources */,
|
||||
EA07F54016135916006A2112 /* NIKPetApi.m in Sources */,
|
||||
EA07F54116135916006A2112 /* NIKStoreApi.h in Sources */,
|
||||
EA07F54216135916006A2112 /* NIKStoreApi.m in Sources */,
|
||||
EA07F54316135916006A2112 /* NIKSwaggerObject.h in Sources */,
|
||||
EA07F54416135916006A2112 /* NIKSwaggerObject.m in Sources */,
|
||||
EA07F54516135916006A2112 /* NIKTag.h in Sources */,
|
||||
EA07F54616135916006A2112 /* NIKTag.m in Sources */,
|
||||
EA07F54716135916006A2112 /* NIKUser.h in Sources */,
|
||||
EA07F54816135916006A2112 /* NIKUser.m in Sources */,
|
||||
EA07F54916135916006A2112 /* NIKUserApi.h in Sources */,
|
||||
EA07F54A16135916006A2112 /* NIKUserApi.m in Sources */,
|
||||
EA5A034416141443003B3E41 /* UserApiTest.m in Sources */,
|
||||
EA6699C81811D2FB00A70D03 /* PetstoreClientTests.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
EA07F52F161357A5006A2112 /* PBXTargetDependency */ = {
|
||||
EA6699C01811D2FB00A70D03 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = EA07F4B816134F27006A2112 /* PetstoreClient */;
|
||||
targetProxy = EA07F52E161357A5006A2112 /* PBXContainerItemProxy */;
|
||||
target = EA6699951811D2FA00A70D03 /* PetstoreClient */;
|
||||
targetProxy = EA6699BF1811D2FB00A70D03 /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
EA6699A21811D2FA00A70D03 /* InfoPlist.strings */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
EA6699A31811D2FA00A70D03 /* en */,
|
||||
);
|
||||
name = InfoPlist.strings;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
EA6699AB1811D2FA00A70D03 /* Main_iPhone.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
EA6699AC1811D2FA00A70D03 /* Base */,
|
||||
);
|
||||
name = Main_iPhone.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
EA6699AE1811D2FA00A70D03 /* Main_iPad.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
EA6699AF1811D2FA00A70D03 /* Base */,
|
||||
);
|
||||
name = Main_iPad.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
EA6699C41811D2FB00A70D03 /* InfoPlist.strings */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
EA6699C51811D2FB00A70D03 /* en */,
|
||||
);
|
||||
name = InfoPlist.strings;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
EA07F4C616134F27006A2112 /* Debug */ = {
|
||||
EA6699C91811D2FB00A70D03 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
|
||||
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"\"$(SDKROOT)/Developer/Library/Frameworks $(DEVELOPER_LIBRARY_DIR)/Frameworks\"",
|
||||
);
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
@@ -406,124 +467,153 @@
|
||||
);
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.8;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = macosx;
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
EA07F4C716134F27006A2112 /* Release */ = {
|
||||
EA6699CA1811D2FB00A70D03 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
|
||||
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = YES;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"\"$(SDKROOT)/Developer/Library/Frameworks $(DEVELOPER_LIBRARY_DIR)/Frameworks\"",
|
||||
);
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.8;
|
||||
SDKROOT = macosx;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
EA07F4C916134F27006A2112 /* Debug */ = {
|
||||
EA6699CC1811D2FB00A70D03 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = EA5799F266AC4D21AD004BC4 /* Pods.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "PetstoreClient/PetstoreClient-Prefix.pch";
|
||||
INFOPLIST_FILE = "PetstoreClient/PetstoreClient-Info.plist";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
WRAPPER_EXTENSION = app;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
EA07F4CA16134F27006A2112 /* Release */ = {
|
||||
EA6699CD1811D2FB00A70D03 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = EA5799F266AC4D21AD004BC4 /* Pods.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "PetstoreClient/PetstoreClient-Prefix.pch";
|
||||
INFOPLIST_FILE = "PetstoreClient/PetstoreClient-Info.plist";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
WRAPPER_EXTENSION = app;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
EA07F5061613521A006A2112 /* Debug */ = {
|
||||
EA6699CF1811D2FB00A70D03 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
|
||||
BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/PetstoreClient.app/PetstoreClient";
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(DEVELOPER_LIBRARY_DIR)/Frameworks",
|
||||
"$(DEVELOPER_LIBRARY_DIR)/Frameworks",
|
||||
"$(SDKROOT)/Developer/Library/Frameworks",
|
||||
"$(inherited)",
|
||||
"$(DEVELOPER_FRAMEWORKS_DIR)",
|
||||
);
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "../tests/PetstoreClientTests-Prefix.pch";
|
||||
INFOPLIST_FILE = "../tests/PetstoreClientTests-Info.plist";
|
||||
GCC_PREFIX_HEADER = "PetstoreClient/PetstoreClient-Prefix.pch";
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
INFOPLIST_FILE = "PetstoreClientTests/PetstoreClientTests-Info.plist";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
WRAPPER_EXTENSION = octest;
|
||||
TEST_HOST = "$(BUNDLE_LOADER)";
|
||||
WRAPPER_EXTENSION = xctest;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
EA07F5071613521A006A2112 /* Release */ = {
|
||||
EA6699D01811D2FB00A70D03 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
|
||||
BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/PetstoreClient.app/PetstoreClient";
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(DEVELOPER_LIBRARY_DIR)/Frameworks",
|
||||
"$(DEVELOPER_LIBRARY_DIR)/Frameworks",
|
||||
"$(SDKROOT)/Developer/Library/Frameworks",
|
||||
"$(inherited)",
|
||||
"$(DEVELOPER_FRAMEWORKS_DIR)",
|
||||
);
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "../tests/PetstoreClientTests-Prefix.pch";
|
||||
INFOPLIST_FILE = "../tests/PetstoreClientTests-Info.plist";
|
||||
GCC_PREFIX_HEADER = "PetstoreClient/PetstoreClient-Prefix.pch";
|
||||
INFOPLIST_FILE = "PetstoreClientTests/PetstoreClientTests-Info.plist";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
WRAPPER_EXTENSION = octest;
|
||||
TEST_HOST = "$(BUNDLE_LOADER)";
|
||||
WRAPPER_EXTENSION = xctest;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
EA07F4B316134F27006A2112 /* Build configuration list for PBXProject "PetstoreClient" */ = {
|
||||
EA6699911811D2FA00A70D03 /* Build configuration list for PBXProject "PetstoreClient" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
EA07F4C616134F27006A2112 /* Debug */,
|
||||
EA07F4C716134F27006A2112 /* Release */,
|
||||
EA6699C91811D2FB00A70D03 /* Debug */,
|
||||
EA6699CA1811D2FB00A70D03 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
EA07F4C816134F27006A2112 /* Build configuration list for PBXNativeTarget "PetstoreClient" */ = {
|
||||
EA6699CB1811D2FB00A70D03 /* Build configuration list for PBXNativeTarget "PetstoreClient" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
EA07F4C916134F27006A2112 /* Debug */,
|
||||
EA07F4CA16134F27006A2112 /* Release */,
|
||||
EA6699CC1811D2FB00A70D03 /* Debug */,
|
||||
EA6699CD1811D2FB00A70D03 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
EA07F5051613521A006A2112 /* Build configuration list for PBXNativeTarget "PetstoreClientTests" */ = {
|
||||
EA6699CE1811D2FB00A70D03 /* Build configuration list for PBXNativeTarget "PetstoreClientTests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
EA07F5061613521A006A2112 /* Debug */,
|
||||
EA07F5071613521A006A2112 /* Release */,
|
||||
EA6699CF1811D2FB00A70D03 /* Debug */,
|
||||
EA6699D01811D2FB00A70D03 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = EA07F4B016134F27006A2112 /* Project object */;
|
||||
rootObject = EA66998E1811D2FA00A70D03 /* Project object */;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDESourceControlProjectFavoriteDictionaryKey</key>
|
||||
<false/>
|
||||
<key>IDESourceControlProjectIdentifier</key>
|
||||
<string>7A33CEA3-5D3F-4B6D-8F47-84701AB3E283</string>
|
||||
<key>IDESourceControlProjectName</key>
|
||||
<string>PetstoreClient</string>
|
||||
<key>IDESourceControlProjectOriginsDictionary</key>
|
||||
<dict>
|
||||
<key>92840518-904D-4771-AA3D-9AF52CA48B71</key>
|
||||
<string>ssh://github.com/wordnik/swagger-codegen.git</string>
|
||||
</dict>
|
||||
<key>IDESourceControlProjectPath</key>
|
||||
<string>samples/client/petstore/objc/PetstoreClient/PetstoreClient.xcodeproj/project.xcworkspace</string>
|
||||
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
|
||||
<dict>
|
||||
<key>92840518-904D-4771-AA3D-9AF52CA48B71</key>
|
||||
<string>../../../../../../..</string>
|
||||
</dict>
|
||||
<key>IDESourceControlProjectURL</key>
|
||||
<string>ssh://github.com/wordnik/swagger-codegen.git</string>
|
||||
<key>IDESourceControlProjectVersion</key>
|
||||
<integer>110</integer>
|
||||
<key>IDESourceControlProjectWCCIdentifier</key>
|
||||
<string>92840518-904D-4771-AA3D-9AF52CA48B71</string>
|
||||
<key>IDESourceControlProjectWCConfigurations</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
|
||||
<string>public.vcs.git</string>
|
||||
<key>IDESourceControlWCCIdentifierKey</key>
|
||||
<string>92840518-904D-4771-AA3D-9AF52CA48B71</string>
|
||||
<key>IDESourceControlWCCName</key>
|
||||
<string>swagger-codegen</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
@@ -1,254 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Bucket
|
||||
type = "1"
|
||||
version = "1.0">
|
||||
<FileBreakpoints>
|
||||
<FileBreakpoint
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "../tests/PetApiTest.m"
|
||||
timestampString = "370372827.107591"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "74"
|
||||
endingLineNumber = "74"
|
||||
landmarkName = "-testAddPet"
|
||||
landmarkType = "5">
|
||||
</FileBreakpoint>
|
||||
<FileBreakpoint
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "../tests/PetApiTest.m"
|
||||
timestampString = "370372859.750877"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "91"
|
||||
endingLineNumber = "91"
|
||||
landmarkName = "-testAddPet"
|
||||
landmarkType = "5">
|
||||
</FileBreakpoint>
|
||||
<FileBreakpoint
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "../tests/PetApiTest.m"
|
||||
timestampString = "370372874.536795"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "94"
|
||||
endingLineNumber = "94"
|
||||
landmarkName = "-testAddPet"
|
||||
landmarkType = "5">
|
||||
</FileBreakpoint>
|
||||
<FileBreakpoint
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "../tests/PetApiTest.m"
|
||||
timestampString = "370372989.134842"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "105"
|
||||
endingLineNumber = "105"
|
||||
landmarkName = "-testAddPet"
|
||||
landmarkType = "5">
|
||||
</FileBreakpoint>
|
||||
<FileBreakpoint
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "../tests/PetApiTest.m"
|
||||
timestampString = "370372945.467097"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "101"
|
||||
endingLineNumber = "101"
|
||||
landmarkName = "-testAddPet"
|
||||
landmarkType = "5">
|
||||
</FileBreakpoint>
|
||||
<FileBreakpoint
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "../tests/PetApiTest.m"
|
||||
timestampString = "370372989.134842"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "108"
|
||||
endingLineNumber = "108"
|
||||
landmarkName = "-testAddPet"
|
||||
landmarkType = "5">
|
||||
</FileBreakpoint>
|
||||
<FileBreakpoint
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "../tests/PetApiTest.m"
|
||||
timestampString = "370372989.134842"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "113"
|
||||
endingLineNumber = "113"
|
||||
landmarkName = "-testAddPet"
|
||||
landmarkType = "5">
|
||||
</FileBreakpoint>
|
||||
<FileBreakpoint
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "../tests/PetApiTest.m"
|
||||
timestampString = "370372989.134842"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "109"
|
||||
endingLineNumber = "109"
|
||||
landmarkName = "-testAddPet"
|
||||
landmarkType = "5">
|
||||
</FileBreakpoint>
|
||||
<FileBreakpoint
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "../tests/PetApiTest.m"
|
||||
timestampString = "370373828.881393"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "172"
|
||||
endingLineNumber = "172"
|
||||
landmarkName = "-testUpdatePet"
|
||||
landmarkType = "5">
|
||||
</FileBreakpoint>
|
||||
<FileBreakpoint
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "../tests/PetApiTest.m"
|
||||
timestampString = "370373828.881393"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "185"
|
||||
endingLineNumber = "185"
|
||||
landmarkName = "-testUpdatePet"
|
||||
landmarkType = "5">
|
||||
</FileBreakpoint>
|
||||
<FileBreakpoint
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "../tests/PetApiTest.m"
|
||||
timestampString = "370373872.596558"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "213"
|
||||
endingLineNumber = "213"
|
||||
landmarkName = "-testUpdatePet"
|
||||
landmarkType = "5">
|
||||
</FileBreakpoint>
|
||||
<FileBreakpoint
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "../tests/PetApiTest.m"
|
||||
timestampString = "370373826.764943"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "169"
|
||||
endingLineNumber = "169"
|
||||
landmarkName = "-testUpdatePet"
|
||||
landmarkType = "5">
|
||||
</FileBreakpoint>
|
||||
<FileBreakpoint
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "../tests/PetApiTest.m"
|
||||
timestampString = "370373872.596558"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "211"
|
||||
endingLineNumber = "211"
|
||||
landmarkName = "-testUpdatePet"
|
||||
landmarkType = "5">
|
||||
</FileBreakpoint>
|
||||
<FileBreakpoint
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "../tests/PetApiTest.m"
|
||||
timestampString = "370373913.88636"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "239"
|
||||
endingLineNumber = "239"
|
||||
landmarkName = "-testUpdatePet"
|
||||
landmarkType = "5">
|
||||
</FileBreakpoint>
|
||||
<FileBreakpoint
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "../tests/PetApiTest.m"
|
||||
timestampString = "370373915.25218"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "240"
|
||||
endingLineNumber = "240"
|
||||
landmarkName = "-testUpdatePet"
|
||||
landmarkType = "5">
|
||||
</FileBreakpoint>
|
||||
<FileBreakpoint
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "../tests/PetApiTest.m"
|
||||
timestampString = "370373916.607639"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "244"
|
||||
endingLineNumber = "244"
|
||||
landmarkName = "-testUpdatePet"
|
||||
landmarkType = "5">
|
||||
</FileBreakpoint>
|
||||
<FileBreakpoint
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "../tests/PetApiTest.m"
|
||||
timestampString = "370373999.668679"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "201"
|
||||
endingLineNumber = "201"
|
||||
landmarkName = "-testUpdatePet"
|
||||
landmarkType = "5">
|
||||
</FileBreakpoint>
|
||||
<FileBreakpoint
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "../tests/PetApiTest.m"
|
||||
timestampString = "370374817.753901"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "290"
|
||||
endingLineNumber = "290"
|
||||
landmarkName = "-testGetPetByTags"
|
||||
landmarkType = "5">
|
||||
</FileBreakpoint>
|
||||
<FileBreakpoint
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "../tests/UserApiTest.m"
|
||||
timestampString = "370414932.195391"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "44"
|
||||
endingLineNumber = "44"
|
||||
landmarkName = "-testLoginUser"
|
||||
landmarkType = "5">
|
||||
</FileBreakpoint>
|
||||
</FileBreakpoints>
|
||||
</Bucket>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0450"
|
||||
LastUpgradeVersion = "0500"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
@@ -14,8 +14,8 @@
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "EA07F4B816134F27006A2112"
|
||||
BuildableName = "PetstoreClient"
|
||||
BlueprintIdentifier = "EA6699951811D2FA00A70D03"
|
||||
BuildableName = "PetstoreClient.app"
|
||||
BlueprintName = "PetstoreClient"
|
||||
ReferencedContainer = "container:PetstoreClient.xcodeproj">
|
||||
</BuildableReference>
|
||||
@@ -28,12 +28,22 @@
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
buildConfiguration = "Debug">
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "EA6699B91811D2FB00A70D03"
|
||||
BuildableName = "PetstoreClientTests.xctest"
|
||||
BlueprintName = "PetstoreClientTests"
|
||||
ReferencedContainer = "container:PetstoreClient.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "EA07F4B816134F27006A2112"
|
||||
BuildableName = "PetstoreClient"
|
||||
BlueprintIdentifier = "EA6699951811D2FA00A70D03"
|
||||
BuildableName = "PetstoreClient.app"
|
||||
BlueprintName = "PetstoreClient"
|
||||
ReferencedContainer = "container:PetstoreClient.xcodeproj">
|
||||
</BuildableReference>
|
||||
@@ -51,8 +61,8 @@
|
||||
<BuildableProductRunnable>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "EA07F4B816134F27006A2112"
|
||||
BuildableName = "PetstoreClient"
|
||||
BlueprintIdentifier = "EA6699951811D2FA00A70D03"
|
||||
BuildableName = "PetstoreClient.app"
|
||||
BlueprintName = "PetstoreClient"
|
||||
ReferencedContainer = "container:PetstoreClient.xcodeproj">
|
||||
</BuildableReference>
|
||||
@@ -69,8 +79,8 @@
|
||||
<BuildableProductRunnable>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "EA07F4B816134F27006A2112"
|
||||
BuildableName = "PetstoreClient"
|
||||
BlueprintIdentifier = "EA6699951811D2FA00A70D03"
|
||||
BuildableName = "PetstoreClient.app"
|
||||
BlueprintName = "PetstoreClient"
|
||||
ReferencedContainer = "container:PetstoreClient.xcodeproj">
|
||||
</BuildableReference>
|
||||
|
||||
@@ -9,20 +9,15 @@
|
||||
<key>orderHint</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<key>PetstoreClientTests.xcscheme</key>
|
||||
<dict>
|
||||
<key>orderHint</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>SuppressBuildableAutocreation</key>
|
||||
<dict>
|
||||
<key>EA07F4B816134F27006A2112</key>
|
||||
<key>EA6699951811D2FA00A70D03</key>
|
||||
<dict>
|
||||
<key>primary</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>EA07F4F11613521A006A2112</key>
|
||||
<key>EA6699B91811D2FB00A70D03</key>
|
||||
<dict>
|
||||
<key>primary</key>
|
||||
<true/>
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
//
|
||||
// AppDelegate.h
|
||||
// PetstoreClient
|
||||
//
|
||||
// Created by Tony Tam on 10/18/13.
|
||||
// Copyright (c) 2013 Reverb. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface AppDelegate : UIResponder <UIApplicationDelegate>
|
||||
|
||||
@property (strong, nonatomic) UIWindow *window;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,46 @@
|
||||
//
|
||||
// AppDelegate.m
|
||||
// PetstoreClient
|
||||
//
|
||||
// Created by Tony Tam on 10/18/13.
|
||||
// Copyright (c) 2013 Reverb. All rights reserved.
|
||||
//
|
||||
|
||||
#import "AppDelegate.h"
|
||||
|
||||
@implementation AppDelegate
|
||||
|
||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
||||
{
|
||||
// Override point for customization after application launch.
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)applicationWillResignActive:(UIApplication *)application
|
||||
{
|
||||
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
|
||||
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
|
||||
}
|
||||
|
||||
- (void)applicationDidEnterBackground:(UIApplication *)application
|
||||
{
|
||||
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
|
||||
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
|
||||
}
|
||||
|
||||
- (void)applicationWillEnterForeground:(UIApplication *)application
|
||||
{
|
||||
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
|
||||
}
|
||||
|
||||
- (void)applicationDidBecomeActive:(UIApplication *)application
|
||||
{
|
||||
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
|
||||
}
|
||||
|
||||
- (void)applicationWillTerminate:(UIApplication *)application
|
||||
{
|
||||
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4451" systemVersion="13A461" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES" initialViewController="BYZ-38-t0r">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3676"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--class Prefix:identifier View Controller-->
|
||||
<scene sceneID="tne-QT-ifu">
|
||||
<objects>
|
||||
<viewController id="BYZ-38-t0r" customClass="ViewController" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
|
||||
<rect key="frame" x="0.0" y="20" width="768" height="1004"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
</scene>
|
||||
</scenes>
|
||||
<simulatedMetricsContainer key="defaultSimulatedMetrics">
|
||||
<simulatedStatusBarMetrics key="statusBar" statusBarStyle="blackOpaque"/>
|
||||
<simulatedOrientationMetrics key="orientation"/>
|
||||
<simulatedScreenMetrics key="destination"/>
|
||||
</simulatedMetricsContainer>
|
||||
</document>
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4451" systemVersion="13A461" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="vXZ-lx-hvc">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3676"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--class Prefix:identifier View Controller-->
|
||||
<scene sceneID="ufC-wZ-h7g">
|
||||
<objects>
|
||||
<viewController id="vXZ-lx-hvc" customClass="ViewController" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" id="kh9-bI-dsS">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="x5A-6p-PRh" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
</scene>
|
||||
</scenes>
|
||||
<simulatedMetricsContainer key="defaultSimulatedMetrics">
|
||||
<simulatedStatusBarMetrics key="statusBar"/>
|
||||
<simulatedOrientationMetrics key="orientation"/>
|
||||
<simulatedScreenMetrics key="destination" type="retina4"/>
|
||||
</simulatedMetricsContainer>
|
||||
</document>
|
||||
@@ -0,0 +1,53 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "29x29",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "40x40",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "60x60",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "29x29",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "29x29",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "40x40",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "40x40",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "76x76",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "76x76",
|
||||
"scale" : "2x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "iphone",
|
||||
"extent" : "full-screen",
|
||||
"minimum-system-version" : "7.0",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "iphone",
|
||||
"subtype" : "retina4",
|
||||
"extent" : "full-screen",
|
||||
"minimum-system-version" : "7.0",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "ipad",
|
||||
"extent" : "full-screen",
|
||||
"minimum-system-version" : "7.0",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"orientation" : "landscape",
|
||||
"idiom" : "ipad",
|
||||
"extent" : "full-screen",
|
||||
"minimum-system-version" : "7.0",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "ipad",
|
||||
"extent" : "full-screen",
|
||||
"minimum-system-version" : "7.0",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "landscape",
|
||||
"idiom" : "ipad",
|
||||
"extent" : "full-screen",
|
||||
"minimum-system-version" : "7.0",
|
||||
"scale" : "2x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.reverb.${PRODUCT_NAME:rfc1034identifier}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Main_iPhone</string>
|
||||
<key>UIMainStoryboardFile~ipad</key>
|
||||
<string>Main_iPad</string>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,7 +1,17 @@
|
||||
//
|
||||
// Prefix header for all source files of the 'PetstoreClient' target in the 'PetstoreClient' project
|
||||
// Prefix header
|
||||
//
|
||||
// The contents of this file are implicitly included at the beginning of every source file.
|
||||
//
|
||||
|
||||
#ifdef __OBJC__
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <Availability.h>
|
||||
|
||||
#ifndef __IPHONE_5_0
|
||||
#warning "This project uses features only available in iOS SDK 5.0 and later."
|
||||
#endif
|
||||
|
||||
#ifdef __OBJC__
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <SystemConfiguration/SystemConfiguration.h>
|
||||
#endif
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user