Compare commits

..

678 Commits

Author SHA1 Message Date
Tony Tam
ece072aee3 Merge pull request #418 from lucamilanesio/scala-async-http-support
Support for HTTP Async client transport for Jersey on Scala (legacy master)
2015-02-09 13:43:07 -08:00
Luca Milanesio
2386e394ae Support for HTTP Async client transport for Jersey on Scala
When generating Scala client, the ApiInvoker is a class with
overridable options, avoiding the need of public vars to be
manually modified.

Additionally it is possible to plug the AsyncHttp protocol
for Jersey in order to achieve Netty support and maximum scalability.

NOTE: Support for Scala 2.10.0-3 removed as largely obsolete
2015-02-09 19:36:28 +00:00
Tony Tam
f55d9eaa68 Merge pull request #412 from FindTheBest/master
Python/PHP Multipart-Form request support
2015-02-06 10:47:10 -08:00
James Ebentier
0f041dae90 MultipartForm: adding support for php 2015-02-04 12:48:00 -08:00
James Ebentier
6c97a9c6c7 MultipartForm: some more fixing of formating 2015-02-04 10:54:55 -08:00
James Ebentier
257d67346c MultipartForm: fixing some spacing issues 2015-02-04 10:41:25 -08:00
James Ebentier
e955c9dcfd MultipartForm: getting the file uploading working 2015-02-04 09:56:10 -08:00
James Ebentier
63bb20238b MultipartForm: fixing syntax error 2015-02-03 19:01:31 -08:00
James Ebentier
55575541d8 MultipartForm: better formatting 2015-02-03 18:28:56 -08:00
James Ebentier
33e6105822 MultipartForm: adding in basic support for multipart form submissions on python bindings 2015-02-03 18:03:20 -08:00
Tony Tam
87be442ad9 Merge pull request #409 from ethanjcohen/master
Fix "properties" name in node server example template
2015-02-02 22:42:56 -08:00
Ethan Cohen
65b3b594e3 Renamed the "params" operation property to "parameters" to conform to the swagger spec 2015-02-01 16:02:27 -06:00
Ethan Cohen
94ceb504b8 Changed the "params" operation property to "parameters" to conform to the swagger spec 2015-02-01 15:54:47 -06:00
Tony Tam
f914f26f3b Merge pull request #400 from FindTheBest/master
Fixing curl $postData for php bindings
2015-01-28 22:06:23 -08:00
James Ebentier
4a6e719d6a APIClient: making the cURL timeout able to be variably set for better dynamic api calls 2015-01-28 16:04:11 -08:00
James Ebentier
61ea9564f8 building a fix for postData that will pass TravisCI build 2015-01-27 13:48:59 -08:00
James Ebentier
bfc14938d0 Fixing curl $postData for php bindings 2015-01-27 13:16:20 -08:00
Tony Tam
c98a78062f Merge pull request #398 from FindTheBest/master
Fixing issue with deserialization in PHP
2015-01-27 12:50:24 -08:00
James Ebentier
fd128cbab0 Update Swagger.mustache 2015-01-27 12:28:28 -08:00
James Ebentier
59568915de Fixing minor typo 2015-01-27 12:08:41 -08:00
James Ebentier
bff2515bf2 Fixing issue with deserialization in PHP
No longer will deserialize throw errors when converting a json response to a string
2015-01-27 11:48:20 -08:00
Tony Tam
dcaf639bec Merge branch 'STRML-fixPHPFormParams' 2015-01-21 23:19:19 -08:00
Tony Tam
2f6bf95fa2 merged 2015-01-21 23:19:13 -08:00
Tony Tam
154c28b062 Merge pull request #385 from STRML/fixPHPComments
Rework generated PHP function comments.
2015-01-21 22:10:20 -08:00
Samuel Reed
8106de95dc Rework PHP function comments to match PHPDoc style.
Also eliminated bad newline.
2015-01-21 10:58:57 +01:00
Samuel Reed
7c342a060a Add missing formParams to PHP api.mustache. Fixes #383.
Also fixed mixed tabs and spaces in template.
2015-01-21 10:01:41 +01:00
Tony Tam
3abc42eee9 Merge pull request #368 from amandaducrou/master
Adding first and hasRequiredParams parameters to Codegen
2015-01-09 10:26:50 -08:00
Amanda Ducrou
2d81c71b52 Adding first and hasRequiredParams parameters to Codegen 2015-01-09 10:59:21 +10:00
Tony Tam
2d193a0e92 Merge pull request #218 from JDiPierro/output_resource_path_for_no_models_found
Output the resourcePath when no models are found rather than the basePath
2014-12-23 22:23:14 -08:00
Tony Tam
09e7bd9c43 Merge pull request #286 from jebentier/master
Java binding comment creation issue fixed
2014-12-23 22:17:35 -08:00
Tony Tam
0ece4a084f Merge pull request #303 from butlermh/master
Can't run ./bin/scala-petstore.sh as instructed at README
2014-12-23 22:16:35 -08:00
Tony Tam
0821d1859b Merge pull request #321 from Laurent-Sarrazin/patch-doc
Fix a typo
2014-12-23 22:14:39 -08:00
Tony Tam
25aef5fd6e Merge pull request #240 from GerardSoleCa/master
Edit line 76 to place pom.xml correctly and dependency-jar generation
2014-12-23 20:31:26 -08:00
webron
3a77287f8b Update README.md 2014-12-23 17:29:49 +02:00
webron
d2111a8e68 Merge pull request #352 from FMJaguar/patch-2
Update README.md
2014-12-23 17:28:59 +02:00
Rich DeLauder
3c0d639d0e Update README.md 2014-12-19 13:10:02 -08:00
Tony Tam
1f30c65464 Update README.md 2014-12-12 12:47:30 -08:00
webron
1b68671e98 Update README.md 2014-12-04 16:27:44 +02:00
Tony Tam
586420b919 Merge pull request #335 from wing328/master
update deserialize to handle both array(primitive) and Array(model)
2014-12-02 22:07:24 -08:00
Tony Tam
43a5ece5b3 Merge pull request #312 from idosh/master
add support to multipart form data and urlencoded for android client
2014-12-02 20:40:02 -08:00
William Cheng
9f6d883e68 update deserialize to handle both array(primitive) and Array(model) 2014-11-29 18:23:44 +08:00
webron
524497a606 Merge pull request #332 from mhurne/patch-1
Fix spelling errors and improve sentence in Compatibility section
2014-11-24 22:13:29 +02:00
Matt Hurne
665ba22c7a Fix spelling errors and improve sentence in Compatibility section 2014-11-24 15:11:38 -05:00
Ido Shamun
0614d1b221 update pom.xml with dependencies
fix Codegen.scala to support file as a param type
2014-11-08 01:19:53 +02:00
Ido Shamun
fb3f331e3c Merge remote-tracking branch 'upstream/master'
merge fork with master
2014-11-07 18:27:58 +02:00
Tony Tam
4e9378965b Merge pull request #324 from FindTheBest/pull_request
Adding the casting of integer -> int for python generated code
2014-11-05 15:47:44 -08:00
James Ebentier
d1fe146522 Adding the casting of integer -> int for python generated code 2014-11-05 15:37:22 -08:00
Tony Tam
b9758107c3 Merge pull request #322 from Laurent-Sarrazin/patch-php-server-generator
Add a basic PHP server-generator example
2014-10-31 09:32:08 -07:00
Laurent Sarrazin
06332e5dce Add a basic PHP server-generator example 2014-10-31 17:00:34 +01:00
Laurent Sarrazin
aa262f6021 Fix a typo 2014-10-30 14:30:55 +01:00
Tony Tam
88692ec42d updated references 2014-10-22 15:45:21 -07:00
Ivan Porto Carrero
a656ea301e updates the codegen to also include the project name for sbt 2014-10-21 10:59:35 -07:00
Ido Shamun
5e4e838a48 add support to multipart form data and urlencoded for android client 2014-10-21 01:58:31 +03:00
Ivan Porto Carrero
f3dc69a7e7 update dependencies in async scala project 2014-10-20 15:42:10 -07:00
Tony Tam
12eba440ae Update README.md 2014-10-18 17:14:00 -07:00
webron
4676c4cdf7 Merge pull request #307 from catherinedodge/master
Fixed broken link in README.md
2014-10-13 16:58:22 +03:00
catherinedodge
d5674c9a7b Fixed broken link in README.md 2014-10-13 09:48:29 -04:00
Mark H. Butler
c8dac4a3cf Reverting these files, they don't need to change 2014-10-08 08:25:23 -07:00
Mark H. Butler
6f30a6d65a Modifying the pom.xml template because it defaults to building with Scala 2.9.1, but that is broken because BeanProperty moved, so instead use 2.10 as the default but add the option of using Scala 2.11 2014-10-08 08:20:02 -07:00
Mark H. Butler
9d1f0bf568 Adding ignore for gedit files (Linux) 2014-10-08 08:19:08 -07:00
Tony Tam
643c211d72 Merge pull request #296 from lloydmeta/update/fix_deprecations
Update deprecated method calls
2014-10-07 21:42:13 -07:00
Tony Tam
fb84985e9b Merge pull request #298 from dreamfactorysoftware/master
adding a space in call to completionHandler to kill latest Xcode parse errors
2014-10-02 16:45:38 -07:00
Jason Sykes
afb34b4f2f adding a space in call to completionHandler to kill latest Xcode parse errors 2014-10-02 12:20:17 -04:00
Lloyd
1734ac2e18 Update deprecated method calls
1. Update specs to inherit via `with Matchers`
2. Update `URLEncoder.encode` to pass "UTF-8" as charset
2014-10-02 10:49:20 +09:00
James Ebentier
72bef1fb68 fixing the java comments above the api calls to allow for multiline comments in the swagger docs 2014-09-29 17:53:53 -07:00
Tony Tam
ec99bef893 Merge pull request #266 from FindTheBest/pull_request
Python binding generation pull request
2014-09-20 13:39:07 -07:00
Tony Tam
2fd29d74f2 Merge pull request #263 from wordnik/basic-auth
Adds Basic auth as an authentication mechanism
2014-09-20 08:43:30 -07:00
Tony Tam
033a9a4b97 Merge pull request #262 from xhh/patch-1
Fixes #260 convert form parameters to string for Java client
2014-09-20 08:41:33 -07:00
Tony Tam
885e463bcb added compatibility table 2014-09-19 11:50:20 -07:00
James Ebentier
b8f3201dba fixing a minor generation issue in api.mustashe to make sure that python scripts are as clean as possible for apis 2014-09-19 10:53:03 -07:00
James Ebentier
983edbd85b Adding in the ability to post forms using swagger codegen generate bindings for python 2014-09-19 10:52:57 -07:00
Ivan Porto Carrero
86d56b978a also work on java 7 2014-09-16 20:52:07 -07:00
Ivan Porto Carrero
ed86bfb79b adds basic auth support 2014-09-16 20:41:32 -07:00
Ivan Porto Carrero
44a73c32fa more lenient Version.scala 2014-09-16 20:15:09 -07:00
Xu Hui Hui
39662e45b1 Fixes #260 convert form parameters to string for Java client 2014-09-16 18:58:17 +08:00
webron
998bf633d8 Merge pull request #261 from czenker/patch-1
Fix typo in README.md
2014-09-12 15:48:22 +03:00
Christian Zenker
b927ffbd53 Fix typo in README.md 2014-09-12 14:26:15 +02:00
Tony Tam
1ff47393ed Merge pull request #255 from martoe/master
Issue 244 - checkout on windows fails due to special chars
2014-09-07 23:59:01 -07:00
isf
a6ecc7a65b Issue 244 - checkout on windows fails due to special chars 2014-09-08 08:50:35 +02:00
Tony Tam
dbf04a9563 updated scripts 2014-08-27 01:09:28 -07:00
Tony Tam
d1603ba25e updated scalatest 2014-08-27 01:04:02 -07:00
Tony Tam
d4ce57bd15 added bigdecimal support 2014-08-27 01:03:49 -07:00
Tony Tam
5e56346dc9 updated scripts to use only assembly 2014-08-27 01:03:32 -07:00
Tony Tam
05db83a067 set to petstore 2014-08-27 00:17:45 -07:00
Tony Tam
707ee1c85b set version to 2.10.4 2014-08-27 00:17:33 -07:00
Tony Tam
a54adb925f added big decimal support 2014-08-27 00:16:12 -07:00
Tony Tam
8c53837802 updated scripts for assembly 2014-08-27 00:15:26 -07:00
Tony Tam
3625b89a15 updated to snapshot build 2014-08-26 16:53:52 -07:00
Tony Tam
2ed68c2df8 version 2.0.17 2014-08-26 16:52:26 -07:00
Tony Tam
db1915ec89 Merge pull request #252 from earldouglas/path-not-optional
Drop the 'optional' param for path params
2014-08-26 14:40:14 -07:00
James Earl Douglas
77e9ce5ede Drop the 'optional' param for path params 2014-08-26 14:38:27 -07:00
Tony Tam
013c19eb36 Merge pull request #251 from earldouglas/not-so-required
Set param as 'required' iff required, else set as 'optional'
2014-08-26 14:33:00 -07:00
James Earl Douglas
61c04ddaf1 Set param as 'required' iff required, else set as 'optional' 2014-08-26 14:31:45 -07:00
Tony Tam
b4d361130c Merge pull request #247 from xoom/issues/java_pom
Issues/java pom - remove scala dependencies from Java pom files
2014-08-25 23:05:04 -07:00
Tony Tam
8e7571c34f Merge pull request #248 from xhh/patch-1
Fixes #242 - Ruby model syntax error
2014-08-25 23:03:45 -07:00
xhh
1ba42ef6cc Fixes #242 - Ruby model syntax error 2014-08-26 09:18:54 +08:00
Rob Blair
fc77521d49 Simplify java sample poms.
* remove scala references from the java client pom template files.
* regenerate the petstore sample pom.xml, verify they can build properly.
2014-08-25 17:37:36 -07:00
Rob Blair
1522069281 Regenerate the java code before modifying templates 2014-08-25 17:35:44 -07:00
Tony Tam
a13f46e781 Merge pull request #245 from ganeshs/master
Added import mappings for java.util.Set and java.sql.Timestamp
2014-08-20 23:43:05 -07:00
Ganesh Subramanian
3ad1ecf153 Added import mapping for Timestamp 2014-08-21 12:11:19 +05:30
Ganesh Subramanian
6087181634 Added import mapping for Timestamp 2014-08-21 12:10:14 +05:30
Ganesh Subramanian
c09adc4539 Fix for issue #226 2014-08-21 12:01:44 +05:30
Tony Tam
a626dea181 Update api.mustache 2014-08-11 08:58:45 -07:00
Tony Tam
454ec4b438 fix for #235 2014-08-08 16:38:38 -04:00
Gerard Solé
4a64d602a0 Add plugin to build a jar with dependencies 2014-08-07 12:17:05 -07:00
Gerard Solé
f294656073 Edit line 76 to place pom.xml correctly 2014-08-07 11:28:08 -07:00
Ivan Porto Carrero
c7da910e68 remove sample files again 2014-08-05 10:56:20 -07:00
Ivan Porto Carrero
40d33693cf add typesafe releases resolver, fixes #232 2014-08-05 10:43:28 -07:00
Tony Tam
13eaf2bf63 Merge branch 'master' of github.com:wordnik/swagger-codegen 2014-08-03 09:19:01 -07:00
Tony Tam
d4508ed112 updated resolvers 2014-08-03 09:16:30 -07:00
Tony Tam
c252e9f7c6 added sonatype as resolver 2014-08-03 09:12:16 -07:00
Tony Tam
6690b80b29 Update .travis.yml 2014-08-02 16:32:10 -07:00
Tony Tam
19bb97a725 updated travis to 2.10.4 2014-08-02 16:09:00 -07:00
Tony Tam
62ee62ebd3 Merge branch 'master' of github.com:wordnik/swagger-codegen 2014-08-02 16:04:55 -07:00
Tony Tam
87083034ee Merge pull request #215 from JDiPierro/fix_java_generator_lists
Use config.processResponseClass to determine type of returnContainer
2014-07-24 11:48:19 -07:00
Tony Tam
d9de57da6f Merge pull request #223 from darkcube/master
CSharp: Multipart form submission
2014-07-23 08:43:37 -04:00
Timothy Lusk
d0b0323925 CSharp: Implement multipart form submission 2014-07-22 17:17:54 -04:00
Tony Tam
f592414409 Merge branch 'master' of github.com:wordnik/swagger-codegen 2014-07-18 09:52:57 -06:00
Tony Tam
e1c8f58d28 added 2.10.4 2014-07-18 09:52:53 -06:00
Tony Tam
4870ed7e51 Merge pull request #220 from darkcube/master
CSharp Changes
2014-07-16 16:30:15 -06:00
Timothy Lusk
bbe48814b4 CSharp: Add optional api constructor argument to set the basePath 2014-07-15 15:41:57 -04:00
Timothy Lusk
3b6ffa4a1f CSharp: Close the WebResponse if we throw an ApiException 2014-07-15 15:41:56 -04:00
Tony Tam
527c40b996 Merge pull request #211 from wcandillon/patch-1
Link back to the swagger-js-codegen project
2014-07-13 07:21:22 -07:00
Justin DiPierro
3aa2c86991 Output the resourcePath when no models are found rather than the basePath 2014-07-10 10:14:22 -04:00
Justin DiPierro
e2a20447df Fixed comment in test 2014-07-10 10:02:18 -04:00
Tony Tam
5d42c8cc5f moved to petstore 2014-07-04 10:19:48 -07:00
Tony Tam
256485ec5b updated template 2014-07-04 10:19:28 -07:00
Tony Tam
7ab0394e76 added node.js instead of jetty 2014-07-04 10:19:09 -07:00
Tony Tam
89b04b2e10 formatting 2014-07-04 10:18:44 -07:00
Tony Tam
a019a438e0 changed to petstore sample 2014-07-04 10:08:54 -07:00
Justin DiPierro
9834059786 Fixed BasicScalaGeneratorTest to expect Some(List) 2014-07-03 11:32:37 -04:00
Justin DiPierro
550fade9e0 Codegen.apiToMap should use config.processResponseClass when setting the returnContainer property. Test passes now 2014-07-03 11:24:05 -04:00
Justin DiPierro
aa1b4fc0fb Wrote failing test for Codegen 2014-07-03 11:23:07 -04:00
Tony Tam
5a659803a8 Merge pull request #212 from darkcube/master
Various csharp codegen fixes
2014-06-29 13:59:21 -07:00
Timothy Lusk
7bc7789e81 CSharp: Invoker should handle WebException and rethrow ApiException 2014-06-27 17:55:10 -04:00
Timothy Lusk
cf0721da73 CSharp: Use nullable primitive types to allow optional parameters 2014-06-27 16:10:45 -04:00
Timothy Lusk
dcbf4d1bfd CSharp: Use the correct model package name 2014-06-27 16:01:24 -04:00
William Candillon
017b578502 Link back to the swagger-js-codegen project 2014-06-26 15:05:33 +02:00
Tony Tam
58bade3b01 Update README.md 2014-06-19 09:33:41 -07:00
Tony Tam
02631e674a Merge pull request #207 from emmekappa/master
Fixing extensions and namespaces for csharp common files.
2014-06-17 10:53:17 -07:00
Michele Cantelli
5f5e534d05 CSharp: renaming the "packages" to follow the .NET style. 2014-06-17 16:22:04 +02:00
Michele Cantelli
51deeb478d Fixing extensions for csharp common files. 2014-06-17 15:18:58 +02:00
Tony Tam
acff8229b3 Merge pull request #206 from xoom/issue/modelsFromStatus
Issue/models from status - utilize the responseModel, if present
2014-06-16 17:03:17 -07:00
Rob Blair
233555790a Regenerate sample java files with example response status codes
* none of existing examples use the responseMessage.responseModel feature, but I have tested it.
* Didn't want to muck with sample json
* update the scripts used to generate both java versions.
* see https://github.com/wordnik/swagger-spec/blob/master/versions/1.2.md#525-response-message-object
2014-06-16 12:59:53 -07:00
Rob Blair
d5ddac8e7e Update java mustache to show error status codes and models in generated API, in comments.
* I wonder if there is some clever way to make exceptions based on the model thrown, and automatically fill them in with the parsed error models?
* Until then, it's comments, and roll your own.
2014-06-16 12:51:35 -07:00
Rob Blair
e8210cd5e3 allow list of models to be returned in errors
* for example, a list of validation errors with an exceptional status
2014-06-16 12:40:44 -07:00
Rob Blair
2dc6b485e0 Generate classes from the models declared in 'responseModel'
* ResponseMessage has new constructor parameter, an optional string for responseModel
* Make sure we add it to list of models
* make sure the responseModel is part of the error list available to mustache
2014-06-16 12:34:44 -07:00
Tony Tam
11bede2b7d improved validation messages 2014-06-12 00:45:27 -07:00
Tony Tam
ed51dd9dea added files 2014-06-11 06:41:59 -07:00
Tony Tam
218f514005 updated node sample 2014-06-11 06:41:31 -07:00
Tony Tam
209e8e066c Merge pull request #201 from xoom/issue/JavaSafeApiName
coerce API names for classesand files to valid Java names
2014-06-11 06:12:55 -07:00
Tony Tam
7d05b01a56 Merge pull request #202 from gonimar/patch-1
Unused local variable 'json_data'.
2014-06-11 06:12:36 -07:00
Tony Tam
64f6bedc37 Merge branch 'repackage' 2014-06-11 06:12:15 -07:00
Tony Tam
4ae4aa98bb formatting 2014-06-11 06:11:45 -07:00
Tony Tam
db8bda087b made nickname optional 2014-06-11 06:11:31 -07:00
Tony Tam
06eb52118e updated to 2.3.0 release 2014-06-11 06:03:44 -07:00
Tony Tam
63be7d0069 removed println 2014-06-11 05:50:44 -07:00
Tony Tam
c7468125fa added clientName 2014-06-10 20:37:36 -07:00
Tony Tam
7b3d8bf799 added file upload support 2014-06-10 20:37:24 -07:00
Tony Tam
c4913fe583 wrapped in apiInfo 2014-06-10 20:37:08 -07:00
Tony Tam
d3339cb087 fixed string default 2014-06-10 20:36:58 -07:00
Tony Tam
ba4fda12dc added additional params 2014-06-10 20:36:29 -07:00
Tony Tam
7a6d6d27ff enabled logging 2014-06-10 20:36:10 -07:00
Tony Tam
bcabb03225 added support for nickname generation 2014-06-10 20:05:19 -07:00
Tony Tam
a404823c54 updated copyright 2014-06-10 17:23:35 -07:00
Tony Tam
96ea70e3c9 added className key 2014-06-10 17:23:20 -07:00
Tony Tam
9a01331ddd updated copyright 2014-06-10 16:58:43 -07:00
Tony Tam
3bfa468ed1 fixed filemap 2014-06-10 16:57:39 -07:00
Tony Tam
fdf8572535 updated copyright 2014-06-10 16:57:12 -07:00
Tony Tam
cff8b1552d updated copyright 2014-06-10 16:57:01 -07:00
Tony Tam
e73dd0a7c4 updated copyrights 2014-06-10 16:56:06 -07:00
Tony Tam
9c4c2dfd37 updated copyrights 2014-06-10 16:55:57 -07:00
Tony Tam
2f8355c953 regenerated client 2014-06-10 16:55:34 -07:00
Tony Tam
3f480482b6 regenerated client 2014-06-10 16:55:17 -07:00
Tony Tam
8274196999 regenerated client 2014-06-10 16:55:13 -07:00
Tony Tam
4e8c71f754 regenerated client 2014-06-10 16:54:48 -07:00
Tony Tam
57e7b41e9c regenerated client 2014-06-10 16:52:16 -07:00
Tony Tam
58d9894f1f regenerated client 2014-06-10 16:51:41 -07:00
Tony Tam
4b4d4d32cd regenerated client 2014-06-10 16:51:36 -07:00
Tony Tam
6a2ea9f614 regenerated client 2014-06-10 16:51:10 -07:00
Tony Tam
0d6754e167 regenerated client 2014-06-10 16:50:17 -07:00
Tony Tam
cb5c2a9708 regenerated client 2014-06-10 16:48:27 -07:00
Tony Tam
dc8ad7edf5 updated client 2014-06-10 16:48:05 -07:00
Tony Tam
52bc82149f file rename 2014-06-10 16:34:40 -07:00
Tony Tam
f53b5e27e0 updated scalatra version, templates for files, forms 2014-06-10 15:51:15 -07:00
Tony Tam
ce5be3452c added patch class 2014-06-10 15:50:49 -07:00
Tony Tam
ce14c225e5 added patch 2014-06-10 10:36:46 -07:00
Tony Tam
b78721826e regenerated client 2014-06-10 10:36:13 -07:00
Tony Tam
85113df113 regenerated client 2014-06-10 08:41:44 -07:00
Tony Tam
607b56cb87 removed println 2014-06-10 08:40:19 -07:00
Tony Tam
2dbf8b7d41 regenerated 2014-06-10 08:40:03 -07:00
Tony Tam
7d4c10043d updated client 2014-06-10 08:22:40 -07:00
Tony Tam
64604124c9 added array support 2014-06-10 08:22:08 -07:00
Tony Tam
50f20ad836 updated templates 2014-06-10 08:21:51 -07:00
Tony Tam
ac40283501 updated samples 2014-06-10 08:01:53 -07:00
Sergey Gonimar
e03d4fc1a5 Unused local variable 'json_data'.
The value of the variable is not used anywhere.
2014-06-10 19:25:00 +06:00
Rob Blair
05e9443db5 coerce API names of class and file valid Java names
* Swagger allows names of apis to include characters like '-' Java does not like that
* use same replace strings as used in toVarName
2014-06-09 17:04:57 -07:00
Tony Tam
1250cc758f updated version 2014-06-09 16:34:42 -07:00
Tony Tam
a18784da6c updated file maps 2014-06-09 15:05:23 -07:00
Tony Tam
c87d637edd regenerated 2014-06-06 00:27:40 -07:00
Tony Tam
bf4a4e5296 fixed imports, nesting 2014-06-06 00:27:15 -07:00
Tony Tam
4f7b80dad2 added debug, fixed headers 2014-06-05 22:49:09 -07:00
Tony Tam
8a2f9bc7bb compatibility 2014-06-05 20:08:59 -07:00
Tony Tam
b9806c183b fixed case 2014-06-05 20:08:37 -07:00
Tony Tam
5aa4c4c999 made snapshot 2014-05-31 16:04:19 -07:00
Tony Tam
424cfac80f updated config 2014-05-30 16:27:54 -07:00
Ivan Porto Carrero
715913f3b4 Update slightly add some test files 2014-05-30 15:17:53 -07:00
Tony Tam
1c2c4fdcd3 removed function override 2014-05-30 15:03:10 -07:00
Ivan Porto Carrero
2ea6c2a3a7 Merge branch 'master' of github.com:wordnik/swagger-codegen 2014-05-30 14:25:57 -07:00
Tony Tam
d91da857a0 removed unused code 2014-05-30 09:59:27 -07:00
Tony Tam
31e65969b3 removed printlns, cruft 2014-05-30 07:53:27 -07:00
Tony Tam
df250bc056 fixed model mapping, refactoring the processing of apiMap and modelMap so it's executed just once 2014-05-30 07:29:19 -07:00
Tony Tam
1569274684 fixed package 2014-05-20 00:14:01 -07:00
Tony Tam
6d8f751da4 added model package 2014-05-19 23:23:23 -07:00
Tony Tam
c2dd00a4ab fixed return type 2014-05-19 15:08:44 -07:00
Tony Tam
9e6ae6eef8 added opts for input 2014-05-15 08:51:41 -04:00
Tony Tam
58b985ba02 moved packages to address collisions with swagger-core per #145 2014-05-14 18:23:32 -04:00
Tony Tam
b4f3143c8c Merge pull request #159 from yanoosh/php-fix-sanitize
PHP - Improved/fixed serialization and deserialize.
2014-05-01 20:31:13 -07:00
Tony Tam
84ad6b5d50 rebuilt docs 2014-05-01 20:19:40 -07:00
Tony Tam
32c14af5ce added resize 2014-05-01 20:18:23 -07:00
Tony Tam
46023c47f5 Merge branch 'master' of github.com:wordnik/swagger-codegen 2014-05-01 20:17:53 -07:00
Tony Tam
71212e5f68 reverted to artifactVersion 2014-05-01 20:16:46 -07:00
Tony Tam
6d1c34048c fix for #176 2014-05-01 20:16:27 -07:00
Tony Tam
f67006057e updated version 2014-05-01 20:14:41 -07:00
Tony Tam
e1e397a7b5 Merge pull request #179 from j-unior/scala-2.10
Added scala 2.10 support in generated maven profile.
2014-05-01 18:03:22 -07:00
Tony Tam
0f35799a77 fixed start script #188 2014-04-29 09:46:49 -07:00
Tony Tam
be44221d98 Merge pull request #187 from earldouglas/return-generated-files
Return files generated from BasicGenerator#generateClientWithoutExit
2014-04-24 16:06:12 -07:00
James Earl Douglas
94ad254a58 Return files generated from BasicGenerator#generateClientWithoutExit 2014-04-24 15:14:41 -07:00
James Earl Douglas
666a4be1f2 Return files generated from Codegen#writeSupportingClasses 2014-04-24 15:12:11 -07:00
James Earl Douglas
e542fbd0a2 De-duplicate code from Codegen#writeSupportingClasses 2014-04-24 15:07:45 -07:00
Pat
f4b2d13aa4 Update README.md 2014-04-09 10:15:08 -07:00
j-unior
abcae6da96 Added scala 2.10 support in generated maven profile. You can enable it with mvn install -P scala_2.10 on generated client 2014-04-01 16:56:08 +03:00
Tony Tam
1b9b3eaa8e Merge pull request #175 from STEAMULO/master
Filename misprint for Android generation
2014-03-25 11:33:03 -07:00
aansel
0babc4f192 Filename misprint for Android generation 2014-03-25 18:44:05 +01:00
webron
e51ffb37b4 Update README.md 2014-03-23 13:16:02 +02:00
Tony Tam
2fba96713c Merge pull request #172 from giovannibotta/master
Minor change to map used when generating supporting files
2014-03-19 08:27:49 -07:00
giodude
dccf8edc25 Minor change to map used when generating supporting files. 2014-03-19 11:18:23 -04:00
webron
d98aeac818 Create LICENSE 2014-03-19 16:08:55 +02:00
webron
62bfc4ea19 Update README.md
Updated license year.
2014-03-19 16:08:38 +02:00
Tony Tam
8d74029fba Merge pull request #170 from hsanjuan/master
Issue #168: Let runscala.sh run from everywhere without breaking
2014-03-18 18:54:28 -07:00
Hector Sanjuan
809cb5cf1f Issue #168: Let runscala.sh run from everywhere without breaking and correctly
setting the classpath
2014-03-17 16:21:36 +01:00
Tony Tam
a4196609c9 added friendly error message when SSL validation fails 2014-03-06 08:29:02 -08:00
Tony Tam
e7eedcf48d removed printlns 2014-03-05 07:54:12 -08:00
Tony Tam
8bf042b153 updated sample with form param support 2014-03-05 07:54:03 -08:00
Tony Tam
8325a12faf fixed hasMore 2014-03-04 20:05:16 -08:00
Tony Tam
03abccd8e8 fix for #154 2014-03-04 19:48:13 -08:00
Janusz Jablonski
19e79fedb2 Added backslash before DateTime object. 2014-03-03 00:40:45 +01:00
Tony Tam
71eacaa3b1 Merge pull request #160 from yanoosh/php-removed-escape
PHP - Removed escapeReservedWord method.
2014-03-02 13:30:08 -08:00
Janusz Jablonski
7cfa46d838 Removed escapeReservedWord method. 2014-03-02 18:31:35 +01:00
Janusz Jablonski
7989e78460 Improved/fixed serialization and deserialize. 2014-03-02 14:44:46 +01:00
Tony Tam
08466f615f Merge branch 'master' of github.com:wordnik/swagger-codegen 2014-02-25 12:54:12 -08:00
Tony Tam
880d14990f added patch support 2014-02-25 12:53:11 -08:00
Tony Tam
39ac8f6d46 added patch support 2014-02-25 12:52:49 -08:00
Tony Tam
685fc7066f Update README.md 2014-02-22 07:21:13 -08:00
Tony Tam
127600e728 Update README.md 2014-02-21 17:29:22 -08:00
Tony Tam
d764328026 updated readme 2014-02-21 17:22:48 -08:00
Tony Tam
cae8296999 updated readme 2014-02-21 17:21:56 -08:00
Tony Tam
86efb71124 updated readme 2014-02-21 17:21:50 -08:00
Tony Tam
0899b08b8c Merge branch 'master' of github.com:wordnik/swagger-codegen 2014-02-21 17:20:16 -08:00
Tony Tam
a770db9d3e added readme 2014-02-21 17:20:06 -08:00
Tony Tam
87b5c43166 Merge pull request #158 from mkantor/objc-safe-var-names
Prevent ObjC generator from producing invalid var names.
2014-02-21 13:41:26 -08:00
Matt Kantor
d14ab2aeff Prevent ObjC generator from producing invalid var names. 2014-02-21 13:35:13 -08:00
Tony Tam
5e95362542 added files 2014-02-20 21:09:48 -08:00
Tony Tam
e92d4e6258 updated sample 2014-02-19 16:46:11 -08:00
Tony Tam
641aada8a8 updated templates 2014-02-19 15:08:06 -08:00
Tony Tam
c8c59fe93a manual merge of https://github.com/wordnik/swagger-codegen/pull/135 2014-02-19 14:30:49 -08:00
Tony Tam
450746f94d updated jodatime version, added groupId and artifactId params 2014-02-19 14:30:20 -08:00
Tony Tam
827f03f272 Merge pull request #157 from df-jsykes/master
fix for broken links when using file system to browse
2014-02-19 12:40:03 -08:00
Jason Sykes
de6f949c64 fix for broken links when using file system to browse 2014-02-19 15:37:07 -05:00
Tony Tam
82cdec7197 Merge pull request #107 from SimonKaluza/patch-1
Update Objective-C's run-time type-check in SWGApiClient to allow NSArrays
2014-02-19 12:30:32 -08:00
Tony Tam
ab7e152877 Merge pull request #139 from cb372/pass-version-to-mustache
Add the API version to the Mustache model when generating supporting files
2014-02-19 12:24:09 -08:00
Tony Tam
0ec694940e fixed target directory 2014-02-19 12:16:31 -08:00
Tony Tam
5a4af29f0e fix for #156 2014-02-19 12:15:50 -08:00
Tony Tam
d72578e492 removed .yml suffix 2014-02-19 12:13:51 -08:00
Tony Tam
405e8b1786 Merge pull request #151 from yanoosh/accepts-header
Added consumes and produces to php templates.
2014-02-11 22:32:29 -08:00
Janusz Jabłoński
8909bd4ba1 Added consumes and produces to php templates. 2014-02-11 12:42:30 +01:00
Tony Tam
e9af56eb87 Update README.md 2014-02-06 18:14:17 -08:00
Tony Tam
ee361e9ae2 Merge pull request #150 from msolujic/master
Added 'char' and 'short' to alowed special words for Java generator.
2014-02-06 18:07:22 -08:00
msolujic
a580c38fed Added 'char' and 'short' to alowed special words for Java generator. 2014-02-07 02:53:09 +01:00
Tony Tam
668059a2c4 added travis build file 2014-02-05 09:08:14 -08:00
Tony Tam
31a53d5842 fix for #147 2014-02-05 08:59:28 -08:00
Tony Tam
e4e768062a Merge pull request #142 from bkowalik/master
BasicGenerator refactoring
2014-02-03 23:16:05 -08:00
Tony Tam
3192240dc0 Merge pull request #126 from cb372/joda-time-dependency
Add joda-time support to BasicJavaGenerator
2014-02-03 22:36:39 -08:00
Tony Tam
2d9a011f82 Merge pull request #133 from giodude/master
Explicitly defined type of a few properties
2014-02-03 22:36:01 -08:00
Tony Tam
476aed7f5b Merge branch 'master' of github.com:wordnik/swagger-codegen 2014-02-03 17:31:35 -08:00
Tony Tam
09580c2d87 added publish fat jar 2014-02-03 17:31:19 -08:00
Bartosz Kowalik
48a07d031e BasicGenerator refactoring 2014-01-30 10:36:36 +01:00
Tony Tam
7414a9d56a Merge pull request #141 from radius314/master
Fix for non-GET verbs
2014-01-29 17:37:07 -08:00
Tony Tam
91e08b5524 fix for #140 2014-01-29 17:14:28 -08:00
Danny Gershman
8abb6521b4 removed line break 2014-01-29 19:45:24 -05:00
Danny Gershman
6394e5448c the verb wasn’t being set for web client, thus non GETs would probably always fail 2014-01-29 19:35:54 -05:00
Chris Birchall
2f5651d988 Add the API version to the Mustache model when generating supporting files.
This makes it easy to generate a client with version numbering in sync
with the server's advertised API version.
2014-01-28 15:44:38 +09:00
Tony Tam
a7afbd106f Merge pull request #138 from radonsky/add_getter_and_setter_to_parameters
added “getter” and “setter” to operation parameter properties
2014-01-27 14:31:48 -08:00
Marek Radonsky
d67774d90f added “getter” and “setter” to operation parameter properties 2014-01-27 13:56:28 -08:00
Tony Tam
07f36d3500 Merge pull request #137 from radonsky/clone_required_parameters
clone the parameter map when creating list of required parameters
2014-01-27 13:22:06 -08:00
Marek Radonsky
cc1bcf7989 clone the parameter map when creating list of required parameters 2014-01-27 13:11:20 -08:00
Tony Tam
096653daf7 removed old pom 2014-01-27 07:50:38 -08:00
Tony Tam
773a6b50eb fixed scala-reflect library inclusion 2014-01-27 07:50:23 -08:00
Tony Tam
bb3bd0d357 regenerated clients 2014-01-27 07:49:58 -08:00
Tony Tam
16eb944d2f Merge branch 'master' of github.com:wordnik/swagger-codegen 2014-01-27 07:48:44 -08:00
Tony Tam
74df3ab4f7 fix for csharp array response type 2014-01-27 07:48:29 -08:00
Chris Birchall
d18e75bbf1 Fixup: change spaces to tab 2014-01-26 11:34:04 +09:00
Chris Birchall
b7cffe4121 Add and register Jackson Joda-Time module 2014-01-26 11:31:08 +09:00
Tony Tam
5180b09acb Merge pull request #134 from bkowalik/master
Lack of models description bugfix
2014-01-24 10:44:45 -08:00
Bartosz Kowalik
6fad954147 Lack of models description bugfix 2014-01-24 19:33:50 +01:00
Giovanni Botta
3b1eac0e50 Explicitly defined type of a few properties
As per [this issue](https://github.com/wordnik/swagger-codegen/issues/130) this change makes the signature of those three properties consistent with their superclass so that traits assuming that signature can be mixed in.
2014-01-24 09:37:03 -05:00
Tony Tam
7715dbf0f2 Merge pull request #132 from gyeh/master
Fix docs to point to correct swagger spec URL
2014-01-22 13:45:48 -08:00
gyeh
bbb682c13d Fix docs to point to correct swagger spec URL 2014-01-22 12:01:44 -08:00
Tony Tam
42a8514c22 updated to scalatra 2.3 2014-01-21 09:40:42 -08:00
Tony Tam
ffca1e2969 updated listings 2014-01-21 09:39:30 -08:00
Tony Tam
1aa65bc14b Merge pull request #131 from cb372/fix-auth-deser
Fix deserialization of "authorizations" fields
2014-01-21 09:36:56 -08:00
Chris Birchall
1f46819b61 Fix deserialization of "authorizations" fields
Deserializer should expect a Map[String, AuthorizationType], not a
List[String].
2014-01-21 20:17:34 +09:00
Tony Tam
5892fdb2bb manual merge of #125 2014-01-16 20:34:26 -08:00
Tony Tam
32d792de01 Merge pull request #122 from vaelen/android-ignore-ssl-certificates
Update android target to work with self signed certificates if needed.
2014-01-16 20:30:19 -08:00
Tony Tam
82646f34ca Merge pull request #108 from backstop/generate-client-without-exit
Extract actual work from generateClient so that we can call it without killing the JVM.
2014-01-16 20:29:27 -08:00
Tony Tam
4f25ea7e6b Merge pull request #127 from cb372/fix-pom-fields
Improve groupId, artifactId, name in generated pom.xml
2014-01-16 20:19:25 -08:00
Chris Birchall
146f5c4c2a Improve groupId, artifactId, name in generated pom.xml
1. Replace hardcoded groupId (`com.wordnik`) with `package` variable.

2. artifactId and name were using non-existent variable `artifactId`.
This results in an empty artifactId, which makes Maven puke.
Replaced them with a sensible hardcoded value, "api-client".
2014-01-17 11:39:22 +09:00
Chris Birchall
6b9cba1411 Add joda-time support to BasicJavaGenerator
* Add joda-time as a dependency in pom.xml
* Add import mappings for commonly used joda-time classes
2014-01-17 10:34:19 +09:00
Tony Tam
a413efc3ca Merge pull request #121 from vaelen/fix-android-param-names
Fixes a bug where the wrong name was being used for header parameters in the Android code generator.
2014-01-16 13:36:57 -08:00
Tony Tam
6c8aed5dcc Merge pull request #112 from vaelen/fix-no-content
Updated Java client to handle the case of a NO_CONTENT response.
2014-01-16 13:36:06 -08:00
Andrew Young
52905fd6de Adds http scheme back in. 2014-01-08 16:32:30 -08:00
Andrew Young
f8807c7440 Code cleanup. 2014-01-08 16:32:13 -08:00
Andrew Young
755591f9e5 Updates the android target to use a version of HttpClient that is closer
to the version shipped with Android.  Also adds support for skipping SSL
certificate verifcation.  This allows the client to be used with self
signed certificates.

Conflicts:
	src/main/resources/android-java/apiInvoker.mustache
2014-01-08 16:31:50 -08:00
Andrew Young
896d0d4b54 [#61769706] Fixes a bug where the wrong name was being used for header
parameters in the Android code generator.
2014-01-06 22:54:42 -08:00
Tony Tam
cf95d4e59e added android sample 2014-01-06 12:27:57 -08:00
Tony Tam
b503994577 added android sample 2014-01-06 12:27:31 -08:00
Tony Tam
569f77b512 added yml2swagger 2013-12-20 16:42:59 -08:00
Tony Tam
773fb89acb Merge pull request #111 from RobBlairInq/issues/67
Issues/67 - generate expected exceptions in java templates when parameters are missing
2013-12-04 23:32:11 -08:00
Tony Tam
890b1ee3c2 updated package 2013-12-03 12:15:20 -08:00
Andrew Young
bfb5b721c5 Merge remote-tracking branch 'upstream/master' into fix-no-content
Conflicts:
	samples/client/petstore/java/src/main/java/com/wordnik/client/ApiInvoker.java
2013-12-02 13:42:15 -08:00
Robert Blair
9b6995f28c Merge branch 'master' into issues/67 2013-11-29 10:49:48 -08:00
Tony Tam
1b8bb4a0a6 rebuilt client 2013-11-28 13:28:26 -10:00
Tony Tam
7f35b875a4 Merge branch 'issues/91' of git://github.com/RobBlairInq/swagger-codegen into RobBlairInq-issues/91 2013-11-28 10:56:36 -10:00
Tony Tam
b5d2ed0322 Merge pull request #113 from RobBlairInq/issues/rebuildall
add script to run all the sample build scripts
2013-11-28 11:01:37 -08:00
Robert Blair
a7b78a6210 add script to run all the sample build scripts 2013-11-27 20:30:31 -08:00
Robert Blair
90c14fd116 issue/91 - and also check in the generated fils 2013-11-27 20:04:57 -08:00
Robert Blair
830ad87fcb issues/91 - enum in model commented out by default 2013-11-27 18:03:57 -08:00
Rob Blair
3a8928f869 issues/91 - regenerate petstore java files 2013-11-27 14:19:56 -08:00
Rob Blair
f883c5e77c issues/91 - allow enum and min/max to be used in templates
* parse numeric min / max values, include in parameters
* pass along the allowable values in the model used by templates
* ensure ‘hasMore’ is set for more parameter lists used by templates
* java model now includes min / max in comment, and allowed enum values as model children
* note: enums in spec can contain non-java characters, so the User.java in examples does not compile presently.
2013-11-27 14:18:35 -08:00
Andrew Young
8cc83d180d Fixed spacing issue. 2013-11-27 12:58:58 -08:00
Andrew Young
65cc529ec6 Updated to handle the case of a NO_CONTENT response. 2013-11-27 12:52:38 -08:00
Andrew Young
9686ceed2d Updated sample code to reflect changes. 2013-11-27 12:52:38 -08:00
Robert Blair
2c73efa536 And rebuild the samples for android-java 2013-11-27 08:02:42 -08:00
Robert Blair
800312361f Also android-java templates:
Rebuild wording sample ApiInvoker from latest.To throw expected ApiException instead of NullPointerException, check required parameters before use
2013-11-27 08:02:03 -08:00
Robert Blair
59897c19a9 Rebuild wording sample ApiInvoker from latest. 2013-11-27 01:16:58 -08:00
Robert Blair
08a3e9e881 Rebuild generated java samples with ApiException checking properly located 2013-11-27 01:16:21 -08:00
Robert Blair
1e2f7cb1f8 To throw expected ApiException instead of NullPointerException, check required parameters before use 2013-11-27 01:13:51 -08:00
Robert Blair
17c38115e6 rebuild java files before changes to template 2013-11-27 01:05:13 -08:00
Robert Blair
0ee6531fcd Version mapping for scala 2.10.* should be consistent. 2013-11-27 01:02:04 -08:00
George Shakhnazaryan
87c12c155d Extract actual work from generateClient so that we can call it without killing the JVM. 2013-11-19 15:55:06 -06:00
SimonKaluza
b373e4312e Fixed SWGApiClient.m's run-type type checking to allow NSArrays to be passed (for Swagger-generated methods that rely on List parameters in the HTTP body) 2013-11-12 23:26:09 -05:00
Ivan Porto Carrero
b39a609226 Merge branch 'master' of github.com:wordnik/swagger-codegen 2013-11-09 12:18:42 -08:00
Ivan Porto Carrero
d25f64cca0 change to return transpor client in async scala client 2013-11-09 12:18:20 -08:00
Tony Tam
0d40a53e06 Merge pull request #101 from joeltgf/master
Change "success" response status code in Java ApiInvoker to all 2xx responses vs. just 200.
2013-11-04 09:57:09 -08:00
Joel Caplin
c779905163 Rationalize response status code check. Ensure that all bona fide 2xx responses are treated in the same way that "200 OK" is.
Previously, was explicitly checking for response code 200 (ClientResponse.Status.OK).

Now, checks the family of the response to make sure it is successful (Family.SUCCESSFUL). This enables us to POST to resources that return 201 created - without having to handle a checked ApiException.
2013-10-31 18:23:44 -07:00
Tony Tam
59da358eb5 Merge branch 'master' of github.com:wordnik/swagger-codegen 2013-10-22 12:08:56 -07:00
Tony Tam
b815ffa403 formatting 2013-10-22 12:08:43 -07:00
Tony Tam
27a8be2381 upped version for release 2013-10-22 12:08:31 -07:00
Tony Tam
d5b53a1778 updated templates 2013-10-22 02:24:37 -07:00
Tony Tam
01b745c366 added hack to support writing json models in 1.1 format 2013-10-22 02:23:50 -07:00
Russell Horton
af96f33e6f regenerated python, python3 and php clients 2013-10-18 16:24:08 -07:00
Tony Tam
2dda926cb6 added path to spec files 2013-10-18 16:05:50 -07:00
Tony Tam
8fb6fc847c fix for #81 2013-10-18 15:26:20 -07:00
Tony Tam
11d1b8fcd4 Merge branch 'master' of github.com:wordnik/swagger-codegen 2013-10-18 14:46:21 -07:00
Tony Tam
5076d76a74 updated scripts to detect scala version and use appropriate library if possible 2013-10-18 14:46:03 -07:00
Tony Tam
044621b325 fixed import issue for objc 2013-10-18 14:45:45 -07:00
Tony Tam
5a3426dee6 renamed to use SWG as default prefix 2013-10-18 14:45:29 -07:00
Tony Tam
b6b28bb1a2 added version checking to avoid runtime scala incompatibilities 2013-10-18 14:45:05 -07:00
Tony Tam
189569518d updated to use afnetworking, cocoapods 2013-10-18 14:44:44 -07:00
Tony Tam
731fddbc30 regenerated client 2013-10-18 14:44:02 -07:00
Tony Tam
c4990b773d regenerated client 2013-10-18 14:43:26 -07:00
Tony Tam
d56c5e3b44 regenerated client 2013-10-18 14:42:57 -07:00
Tony Tam
6f1a4a2f82 Merge pull request #70 from sibblegp/fix_python_obj_type
Only check in lists and dictionaries
2013-10-18 08:25:10 -07:00
Tony Tam
a96d49f045 Merge pull request #100 from JanxSpirit/master
more descriptive exception message than MatchError
2013-10-16 20:21:11 -07:00
Gregg Carrier
ee19dfadf1 more descriptive exception message than MatchError 2013-10-16 22:11:15 -04:00
Tony Tam
2c5524476e Merge pull request #98 from markac/master
Fix Java Generator to always generate valid Java variable names
2013-10-07 22:10:28 -07:00
Mark Crowther
7bde2ffd6e Fix Java Generator to always generate valid Java variable names 2013-10-03 15:59:40 +01:00
Ivan Porto Carrero
f17654cd96 adds bodyParamRequired 2013-10-01 20:17:11 -07:00
Tony Tam
0a47fc23a3 Merge pull request #96 from df-jsykes/master
Fix for sidebar never scrolling in static docs, preventing the user from seeing all operations.
2013-09-30 15:04:06 -07:00
Jason Sykes
13eb435138 removed trigger 2013-09-30 17:56:39 -04:00
Jason Sykes
329f2817c2 Fix to scroll left side of sample docs 2013-09-30 17:50:36 -04:00
Tony Tam
609cef0b65 added android client 2013-09-20 12:34:12 -07:00
Tony Tam
cfa1f1a3c1 formatting 2013-09-19 08:13:50 -07:00
Tony Tam
e851262875 Merge pull request #95 from canadaduane/http_lc
Add an 'httpMethodLowerCase' property
2013-09-18 15:02:43 -07:00
Duane Johnson
7956ccc979 Add an 'httpMethodLowerCase' property
Some libraries use lower case httpMethod names for method calls. For
example, Ruby's Faraday library uses 'get', 'put', 'post', 'delete'.

Rather than this unweildy Ruby code produced by a mustache template:
  self.send("GET".downcase, path, request_opts)

This patch would allow for a more tidy output such as:
  get(path, request_opts)
2013-09-18 15:47:41 -06:00
Tony Tam
13bc111bd6 added some logging for fatal container issues 2013-09-18 12:55:12 -07:00
Tony Tam
cc0a30edf8 added header support, suppressed println 2013-09-18 11:55:45 -07:00
Tony Tam
0ffc6cb7a0 added header passing for codegen 2013-09-17 13:44:45 -07:00
Tony Tam
6a2f53f07d added type modification 2013-09-16 17:35:15 -07:00
Tony Tam
930b1ea0ea updated java example 2013-09-16 17:35:01 -07:00
Tony Tam
8e8e5308b6 added validation error if response not specified 2013-09-16 16:25:19 -07:00
Tony Tam
8f71d3fc50 added form params 2013-09-16 16:25:00 -07:00
Tony Tam
a123d8f066 added set mapping 2013-09-16 16:24:44 -07:00
Tony Tam
ea15cad8d5 fixes for position, and null arg removal 2013-09-16 16:24:24 -07:00
Tony Tam
e4a4f25f22 updated test to match changes in petstore as deployed 2013-09-16 16:23:56 -07:00
Tony Tam
93677742d3 Merge pull request #93 from canadaduane/swagger_config
Fix Ruby Request class: no access to inject_format on Class object
2013-09-12 17:33:26 -07:00
Duane Johnson
389765c113 Fix Ruby Request class: no access to inject_format on Class object 2013-09-12 16:05:59 -06:00
Tony Tam
5ef5fa7296 fixed container type translation 2013-09-12 13:57:03 -07:00
Tony Tam
4e408e6d80 Merge branch 'master' of github.com:wordnik/swagger-codegen 2013-09-12 13:42:01 -07:00
Tony Tam
a140ea2b9d fixed response type with array of simple types 2013-09-12 13:41:53 -07:00
Ivan Porto Carrero
b920881490 allow api level config of default imports in async scala 2013-09-09 18:51:04 -07:00
Tony Tam
56d5167a27 Merge branch 'master' of github.com:wordnik/swagger-codegen 2013-09-09 17:53:11 -07:00
Tony Tam
ddf81948a8 fixed bug where inner simple types were not being processed 2013-09-09 17:52:49 -07:00
Tony Tam
6652028d71 fixed bug where inner simple types were not being processed 2013-09-09 17:52:30 -07:00
Tony Tam
c9fccc5c75 removed lc array 2013-09-09 17:52:06 -07:00
Tony Tam
f766937ac7 added set support 2013-09-09 17:51:48 -07:00
Tony Tam
54f0823ec4 Update README.md 2013-09-09 15:25:38 -07:00
Tony Tam
5f61d20610 fixed build error 2013-09-09 13:59:55 -07:00
Ivan Porto Carrero
7ed2df2722 one more qualified type 2013-09-07 10:15:28 -07:00
Ivan Porto Carrero
a8a2a41315 Fill out qualified type when it's provided in the json 2013-09-06 22:14:48 -07:00
Ivan Porto Carrero
676283875b add the ability to exclude packages for models in the async scala codegen 2013-09-06 20:52:14 -07:00
Ivan Porto Carrero
4f95550977 fix set generation in async client 2013-09-05 21:58:24 -07:00
Ivan Porto Carrero
7056081605 fix Array[long] to List[Long] 2013-09-05 21:45:19 -07:00
Tony Tam
c90083855f added set test 2013-09-05 17:15:36 -07:00
Tony Tam
2f997e6b29 added fix for set 2013-09-05 17:15:10 -07:00
Tony Tam
8ad07d069c Merge pull request #87 from canadaduane/rubyclean
Change ruby generation to be a little more ruby-esque
2013-09-02 21:17:15 -07:00
Tony Tam
51e29cdfaf Merge pull request #88 from silentdth/master
documentation for compiling on Windows
2013-09-02 21:05:20 -07:00
Ivan Porto Carrero
811425a15f Revert "use position property in json to preserve ordering across generations"
This reverts commit 9ee361df5b.
2013-08-31 19:57:54 -07:00
Ivan Porto Carrero
9ee361df5b use position property in json to preserve ordering across generations 2013-08-31 19:46:14 -07:00
Benjamin Dodd
c1df192f09 documentation for compiling on Windows 2013-08-31 19:58:04 +12:00
Duane Johnson
7d6660d56c Change ruby generation to be a little more ruby-esque
Cleaned up some very long lines, added indentation, and shortened
the repetitive parts of the model mustache template.
2013-08-30 17:07:11 -06:00
Tony Tam
450b3c7ed5 fixed array with simple types, added test 2013-08-28 17:28:52 -07:00
Ivan Porto Carrero
e1e95fc1d2 remove redundant brace 2013-08-27 20:22:22 -07:00
Mike O'Connor
8365270134 bump version 2013-08-27 20:22:34 -04:00
Mike O'Connor
33163cd253 options should be unwrapped 2013-08-27 17:04:09 -04:00
Ivan Porto Carrero
2b04a5a127 Fix using the typeMappings 2013-08-26 17:55:28 -07:00
Ivan Porto Carrero
baa0a45537 add array type mapping 2013-08-26 02:05:39 -07:00
Ivan Porto Carrero
6747e3eb0b update to sbt 0.13.0 2013-08-25 18:20:23 -07:00
Ivan Porto Carrero
bad8d7c4b3 build.sbt edit 2013-08-24 19:42:51 -07:00
Ivan Porto Carrero
2610ac7fc3 update async scala client to use type classes for serializing and deserializing 2013-08-24 19:36:43 -07:00
Ivan Porto Carrero
e2730ae34e fix async scala client generator 2013-08-22 15:31:42 -07:00
Tony Tam
beeeb133e6 Merge branch 'master' of github.com:wordnik/swagger-codegen 2013-08-22 13:18:13 -07:00
Tony Tam
01dc29d789 fix for jsonschema format in model property with array 2013-08-22 13:18:03 -07:00
Ivan Porto Carrero
21085b472a bump version 2013-08-22 10:09:22 -07:00
Tony Tam
5483ba5ae7 fix for type 2013-08-20 22:53:13 -07:00
Tony Tam
4a50bb3183 updated to 1.2 spec support 2013-08-17 10:10:37 -07:00
Tony Tam
daeb964bfc updated import 2013-08-16 21:22:14 -07:00
Tony Tam
ad4bf57535 updated prefix 2013-08-16 21:22:06 -07:00
Tony Tam
83ff341e5e fix for #83 2013-08-16 17:53:03 -07:00
Tony Tam
701d4c15a9 updated to 1.2 2013-08-16 17:43:02 -07:00
Tony Tam
01ff7be020 updated to 1.2 2013-08-16 17:22:02 -07:00
Tony Tam
a7bf8b6314 fixes for inner types, spec 1.2 conversion 2013-08-16 17:16:20 -07:00
Tony Tam
c386edb2e4 fixes for inner types, spec 1.2 conversion 2013-08-16 17:16:04 -07:00
Cody Allen
9e12191a64 Fix wrapping default values in an Option for optional params 2013-08-16 09:26:33 -07:00
Ivan Porto Carrero
feb6c188d3 Fix isNotRequired/required on models 2013-08-14 23:16:50 -07:00
Tony Tam
1e245583c9 updated docs 2013-08-14 17:56:08 -07:00
Tony Tam
0e03509cbc added checking 2013-08-14 17:56:03 -07:00
Tony Tam
3bf486e49d updated script 2013-08-14 17:19:20 -07:00
Tony Tam
2497e3a8cf fix for serializer 2013-08-14 17:19:03 -07:00
Tony Tam
d798725d9e added file 2013-08-14 14:49:10 -07:00
Tony Tam
f0517880e7 updated converter args, serializer 2013-08-14 14:43:13 -07:00
Tony Tam
dd68c31fb4 fixed tests 2013-08-14 14:41:35 -07:00
Tony Tam
f6622fbb59 added spec converter 2013-08-14 13:52:19 -07:00
Tony Tam
aa1fbb680b updates for response class to 1.2 spec 2013-08-11 15:36:16 -07:00
Tony Tam
93067a0ce0 updated 1.2 tests 2013-08-11 09:42:53 -07:00
Tony Tam
5a064d6bad updated 1.2 tests 2013-08-11 09:26:32 -07:00
Tony Tam
feb5a2ff3b updated to 1.2 spec 2013-08-10 09:55:30 -07:00
Tony Tam
73a70a65ff added 1.2 spec tests 2013-08-10 09:54:37 -07:00
Tony Tam
3b81d81143 added 1.2 spec tests 2013-08-10 09:54:14 -07:00
Tony Tam
74543f75f9 merged pom + invoker changes, added correct mapping for list 2013-08-08 16:18:57 -07:00
Tony Tam
d9d6cc1e76 fixed filePath 2013-08-08 16:18:33 -07:00
Tony Tam
a3f5c0c688 fixed content type for java client 2013-08-08 16:05:05 -07:00
Tony Tam
17b63b2be8 more refactoring to support 1.2 spec 2013-08-08 15:32:37 -07:00
Tony Tam
558a9cbf64 updated support for relative base paths 2013-08-08 13:53:14 -07:00
Tony Tam
021f269d9d prep for swagger-1.2 support 2013-08-08 12:13:27 -07:00
Tony Tam
7f73007ec4 prep for swagger-1.2 support 2013-08-08 12:13:08 -07:00
Tony Tam
1a1bfd2c7c added logger per #273 2013-08-01 18:21:19 -07:00
Tony Tam
90b34333f5 changed response code 2013-07-31 20:43:29 -07:00
Tony Tam
fa59f168a7 Merge branch 'master' of github.com:wordnik/swagger-codegen 2013-07-30 23:55:57 -07:00
Tony Tam
9102a333e3 moved files to version-specific 2013-07-30 23:55:43 -07:00
Tony Tam
43bc3f5be2 formatting 2013-07-30 23:55:19 -07:00
Tony Tam
fbc09aa77b renamed to separate spec versions 2013-07-30 23:55:05 -07:00
Russell Horton
03619b19a1 in PHP client, add query params for all methods, not just GET 2013-07-23 17:50:07 -07:00
Tony Tam
422e79dd01 Update README.md 2013-07-21 10:07:14 -07:00
Tony Tam
b9a60649a8 Merge branch 'master' of github.com:wordnik/swagger-codegen 2013-07-20 23:13:23 -07:00
Tony Tam
a06dd72989 added exit to quit template engine 2013-07-20 23:13:12 -07:00
Tony Tam
932dc843f9 updated urls per #75 2013-07-20 23:12:58 -07:00
Tony Tam
c45c8d251a Merge pull request #73 from victorgit/master
Code that generates a groovy plugin based on the swagger resources
2013-07-18 07:41:08 -07:00
Victor Trakhtenberg
ea6a9305be Groovy client generation 2013-07-18 14:31:47 +03:00
Victor Trakhtenberg
c82a5c8aaa Groovy client generation 2013-07-18 13:30:16 +03:00
Victor Trakhtenberg
8135cd65dc Groovy client generation 2013-07-18 13:27:22 +03:00
Tony Tam
db68a3acbd Merge pull request #63 from geoffreys/master
C# template compiler error for non-string parameters
2013-07-16 21:50:16 -07:00
George Sibble
0628c63b15 Check for None Type
Signed-off-by: George Sibble <gsibble@gmail.com>
2013-07-16 14:32:17 -07:00
George Sibble
4d05b5d81f Only check in lists and dictionaries
The "in" operator also works on strings which can cause problems with this line if the attribute and the object are named the same thing.

Signed-off-by: George Sibble <gsibble@gmail.com>
2013-07-16 14:20:49 -07:00
Tony Tam
24af6a00c6 added 2.9.1 launcher support 2013-07-09 16:01:34 -07:00
Tony Tam
fd72c1b9f1 fix for #69, fixed test output 2013-07-03 13:48:35 -07:00
Tony Tam
885cd36165 added support for swagger 1.2 spec 2013-06-30 21:36:52 -07:00
Ivan Porto Carrero
a31780e08f Make the launcher scripts use the assembly generated jar 2013-06-25 20:10:48 -07:00
Ivan Porto Carrero
dc3a4b4eb5 allow adding typeMappings and includes through config 2013-06-23 18:35:48 -07:00
Tony Tam
c1e018947d changed to staging repo 2013-06-23 08:55:47 -07:00
Ivan Porto Carrero
4a3321f253 use sonatype repos for publishing 2013-06-22 22:34:47 -07:00
Ivan Porto Carrero
c9614ab795 force maven style publishing 2013-06-22 22:34:21 -07:00
Ivan Porto Carrero
500262bd03 allow using Map[String, List[String]] 2013-06-22 22:01:43 -07:00
Ivan Porto Carrero
4467fe66c6 Merge branch 'master' of github.com:wordnik/swagger-codegen 2013-06-22 17:45:02 -07:00
Geoff Steffens
981ce3d990 Support non-string parameters in querystring 2013-06-19 14:47:40 +10:00
Tony Tam
936387d1df fix for #61 2013-06-17 21:33:40 -07:00
Tony Tam
d14f74b82c removed primitives from reserved words 2013-06-17 20:58:06 -07:00
Tony Tam
85b1fb71c2 Merge pull request #60 from radius314/feature/code-comments
Feature/code comments
2013-06-05 08:53:19 -07:00
Tony Tam
9e8f817a6b Merge pull request #59 from radius314/feature/escaping-forward-slash-windows
fixing replaceAll bug on windows with escaping paths, changed replaceAll...
2013-06-05 08:18:19 -07:00
Tony Tam
697f6dc7c7 updated names 2013-06-04 11:08:34 -07:00
Danny Gershman
d038ef4799 needed to update the compile file for documentation 2013-06-04 01:15:47 -04:00
Danny Gershman
3a2d7adc35 code comment templating added 2013-06-03 19:02:09 -04:00
Ivan Porto Carrero
0e8274ff3b use latest swagger async http client 2013-06-02 18:28:10 -07:00
Tony Tam
a335fe008d added groupId 2013-06-01 12:15:23 -07:00
Tony Tam
251384bb47 added groupId 2013-06-01 12:15:14 -07:00
Tony Tam
54ec7f2bb2 added artifact id 2013-06-01 12:11:59 -07:00
Tony Tam
2199d08e72 added support for artifact id 2013-06-01 12:11:12 -07:00
Danny Gershman
e9fa4434f2 fixing replaceAll bug on windows with escaping paths, changed replaceAll() to replace() 2013-05-30 15:35:47 -04:00
Tony Tam
154b2fdeca Merge pull request #56 from radius314/feature/csharp-templates
created CSharp codegen templating
2013-05-28 11:50:54 -07:00
Danny Gershman
cf05602924 removed property name cleanup due to naming conflicts 2013-05-28 14:42:28 -04:00
Danny Gershman
9a73eb8994 created CSharp codegen templating 2013-05-28 14:17:41 -04:00
Tony Tam
181e7a8b55 Update README.md 2013-05-20 14:26:09 -06:00
Tony Tam
6635616826 Merge branch 'master' of github.com:wordnik/swagger-codegen 2013-05-20 13:24:30 -07:00
Tony Tam
71426e58a3 added screenshot 2013-05-20 13:24:22 -07:00
Tony Tam
00d279ccd5 Merge pull request #54 from sibblegp/master
Make injection of .format in Ruby optional
2013-05-18 15:02:29 -07:00
Mike
a4cd839c1e Make the injection of '.{format}' into the root path component optional 2013-05-18 20:25:55 +00:00
George Sibble
4354002bce Merge branch 'master' of git://github.com/wordnik/swagger-codegen 2013-05-18 16:10:37 -04:00
George Sibble
106e2b7cb9 Merge branch 'master' of github.com:sibblegp/swagger-codegen 2013-05-18 16:09:42 -04:00
George Sibble
8443e7a749 Remove "Content-Type" Header from requests with no request body 2013-05-18 16:09:28 -04:00
Tony Tam
3f3471997e removed swagger-core deps 2013-05-18 16:09:28 -04:00
Tony Tam
90fbbec405 removed swagger-core deps 2013-05-18 16:09:28 -04:00
David M. Lee
384ac98295 Display an error when an API fails to parse. 2013-05-18 16:09:28 -04:00
David M. Lee
53f1394c25 Corrected typo in statis HTML API docs 2013-05-18 16:09:28 -04:00
Tony Tam
5eff3fd976 added CORS filter 2013-05-18 16:09:28 -04:00
Tony Tam
f4c859aede removed unused files 2013-05-18 16:09:28 -04:00
Tony Tam
65f2ec1f79 updated links 2013-05-18 16:09:28 -04:00
Tony Tam
c3cb548fb3 updated links 2013-05-18 16:09:28 -04:00
Tony Tam
996e605008 fixed typo 2013-05-18 16:09:28 -04:00
Tony Tam
92ac02e6c6 added java sample 2013-05-18 16:09:27 -04:00
Tony Tam
ffc6a2fc9e updated to snapshot 2013-05-18 16:09:27 -04:00
Tony Tam
36bf178947 updated readme 2013-05-18 16:09:27 -04:00
Tony Tam
a757416a0e removed commented out block 2013-05-18 16:09:27 -04:00
Tony Tam
f167959a38 updated example 2013-05-18 16:09:27 -04:00
Tony Tam
e8e8c18c8f added field 2013-05-18 16:09:27 -04:00
Tony Tam
e91df944cc formatting 2013-05-18 16:09:27 -04:00
Tony Tam
cc4fecb217 formatting 2013-05-18 16:09:27 -04:00
Tony Tam
2443d3d91b updated readme 2013-05-18 16:09:27 -04:00
Tony Tam
f2f33b98f7 updated to scalatra 2.2.0 2013-05-18 16:09:27 -04:00
Tony Tam
184a9d0d5c added README 2013-05-18 16:09:27 -04:00
Eugen Anghel
90aa2ab4eb made Models optional 2013-05-18 16:09:27 -04:00
Tony Tam
2fab0b46c8 added files 2013-05-18 16:09:27 -04:00
Tony Tam
bff8736889 added file upload support 2013-05-18 16:09:27 -04:00
Tony Tam
37e5571965 added file upload support 2013-05-18 16:09:27 -04:00
Tony Tam
6c3935f7ea added file support 2013-05-18 16:09:27 -04:00
Tony Tam
dbf42de407 added file upload support 2013-05-18 16:09:26 -04:00
Tony Tam
900fbe6e75 removed files 2013-05-15 15:21:50 -07:00
Tony Tam
fe4af50fb0 added more logic for static files 2013-05-15 15:21:11 -07:00
Ivan Porto Carrero
81c103b12d use async http client with service locator 2013-05-12 20:13:58 -07:00
Ivan Porto Carrero
023013b6fe have an empty body param for setting a different value for write requests 2013-05-12 17:18:15 -07:00
Ivan Porto Carrero
dfdd8cac94 fixes #52: running the validator now uses the sbt-assembly generated jar 2013-05-09 20:43:55 -06:00
Tony Tam
d30441dd27 Merge pull request #51 from spatex/master
fixes for error messages in Java/JaxRS generated code
2013-05-06 12:46:18 -07:00
Ivan Porto Carrero
bd565be660 update logback in generated client and use package as organization 2013-05-05 22:38:59 -07:00
Ivan Porto Carrero
ad81434310 integrate with sbt assembly generated jar 2013-05-05 22:06:59 -07:00
Ivan Porto Carrero
965df0bc2a Adds shell script for generating async scala client 2013-05-05 21:57:24 -07:00
Tony Tam
cb1c36721c added files 2013-05-05 15:31:21 -07:00
Tony Tam
fede9e97e4 updated templates 2013-05-05 15:29:40 -07:00
Tony Tam
617baa29cd updated docs 2013-05-05 15:29:01 -07:00
Tara Neier
645109111e adding handling for api error messages in java-jaxrs template 2013-05-04 20:30:01 -07:00
Tony Tam
24aa603230 regenerated client 2013-04-22 09:50:02 -07:00
Tony Tam
8b8a956155 regenerated sample 2013-04-22 09:49:45 -07:00
Tony Tam
5e801dd1d7 updated repos, removed scala runtime 2013-04-22 09:49:15 -07:00
Ivan Porto Carrero
98200e6b39 add logger 2013-04-10 18:39:41 +02:00
Ivan Porto Carrero
f3405bcf29 really fix stackoverflow 2013-04-09 19:33:22 +02:00
Ivan Porto Carrero
1724c9328e Make recurseModel method tail-recursive, fix stack overflow error 2013-04-09 17:20:08 +02:00
Ivan Porto Carrero
025502efad Adds async scala client generation 2013-04-09 16:28:47 +02:00
George Sibble
397ebd4bdb Remove "Content-Type" Header from requests with no request body 2013-04-06 13:54:59 -07:00
Tony Tam
6adf368c08 Merge branch 'master' of github.com:wordnik/swagger-codegen 2013-04-04 22:18:03 -07:00
Tony Tam
871e0e30f1 removed swagger-core deps 2013-04-04 22:17:25 -07:00
Tony Tam
07ab7d98a6 removed swagger-core deps 2013-04-04 22:16:52 -07:00
Tony Tam
69d4c2a27b Merge pull request #47 from leedm777/parse-failures
Display an error when an API fails to parse.
2013-04-03 13:26:59 -07:00
David M. Lee
0b4fa11486 Display an error when an API fails to parse. 2013-04-03 15:12:57 -05:00
Tony Tam
7929dbfee1 Merge pull request #46 from leedm777/static-docs-typo
Corrected typo in statis HTML API docs
2013-04-03 12:52:03 -07:00
David M. Lee
73b234fd23 Corrected typo in statis HTML API docs 2013-04-03 14:44:49 -05:00
Tony Tam
df333fdfb5 added CORS filter 2013-04-03 00:27:51 -07:00
Tony Tam
99c292a7ad removed unused files 2013-04-03 00:27:41 -07:00
Tony Tam
8cd540e2e1 updated links 2013-04-03 00:22:33 -07:00
Tony Tam
9bef2a8ac6 updated links 2013-04-03 00:20:32 -07:00
Tony Tam
e3ac63da93 fixed typo 2013-04-03 00:19:27 -07:00
Tony Tam
958206c469 added java sample 2013-04-03 00:19:21 -07:00
Tony Tam
98f1941b30 updated to snapshot 2013-03-22 11:03:21 -07:00
Tony Tam
812dc0f528 updated readme 2013-03-21 21:50:42 -07:00
Tony Tam
9fa5737f54 removed commented out block 2013-03-21 21:47:01 -07:00
Tony Tam
0188c719d0 updated example 2013-03-21 21:44:19 -07:00
Tony Tam
45ac101779 added field 2013-03-21 21:43:53 -07:00
Tony Tam
a75a406e05 formatting 2013-03-20 22:27:03 -07:00
Tony Tam
80b031710e formatting 2013-03-20 22:26:24 -07:00
Tony Tam
87b1d71f72 updated readme 2013-03-20 21:38:23 -07:00
Tony Tam
9a86b1df8b updated to scalatra 2.2.0 2013-03-20 21:35:41 -07:00
Tony Tam
b86eb53256 Merge branch 'master' of github.com:wordnik/swagger-codegen 2013-03-20 16:17:15 -07:00
Tony Tam
9f5be1cf5a added README 2013-03-20 16:17:04 -07:00
Tony Tam
a1da95c9a5 Merge pull request #40 from eugen/make-models-optional
made Models optional
2013-03-20 07:18:48 -07:00
Eugen Anghel
cb422950f8 made Models optional 2013-03-20 09:49:56 +02:00
Tony Tam
af5f8909a6 added files 2013-03-13 23:47:05 -07:00
Tony Tam
0a7e606650 added file upload support 2013-03-13 23:45:26 -07:00
Tony Tam
c47e553425 added file upload support 2013-03-13 23:45:10 -07:00
Tony Tam
7659ab5a47 added file support 2013-03-13 20:06:48 -07:00
Tony Tam
a31ae97ea0 added file upload support 2013-03-13 19:59:15 -07:00
Ivan Porto Carrero
3cbf2abc5c Merge branch 'master' of github.com:wordnik/swagger-codegen 2013-03-08 23:02:03 +01:00
mrjf
d92294695d Merge pull request #37 from sibblegp/master
Fix Object Type Detection
2013-03-07 12:53:29 -08:00
George Sibble
d7e93cbda9 Fix Object Type Detection to Not Incorrectly Convert Booleans and 0 Integers to None
Prior to this patch, zero integers and False booleans were being converted to None since both evaluate the origin if statement (it not obj) to True.

Signed-off-by: George Sibble <gsibble@gmail.com>
2013-03-07 12:43:46 -06:00
mrjf
a9e0635d31 Merge pull request #34 from sibblegp/master
Add URL query parameters to all calls, not just GET
2013-03-06 22:35:28 -08:00
mrjf
f22dbc510d Merge pull request #36 from mrjf/master
in Swagger.php, use dirname instead of grepping for slash, which could be / or \
2013-03-06 10:08:13 -08:00
Russell Horton
16aa731867 in Swagger.php, use dirname instead of grepping for slash, which could be / or \ 2013-03-06 10:06:35 -08:00
Tony Tam
e1f295398e added files per #35 2013-03-05 17:44:21 -08:00
George Sibble
d00c5d0ad8 Fix typo in python template 2013-03-04 20:05:11 -06:00
George Sibble
29a132496e Fix My Own Mistake (GET Triggered an error)
Signed-off-by: George Sibble <gsibble@gmail.com>
2013-03-04 19:58:59 -06:00
George Sibble
c032b3c2d4 Move URL Query Parameters into All HTTP Verbs
HTTP Spec states that URL query parameters can be in all verbs.  Should probably check all languages to make sure that query parameters are always passed even if it is not a GET call.

Signed-off-by: George Sibble <gsibble@gmail.com>
2013-03-04 19:30:24 -06:00
Tony Tam
68ce5d78f9 added test to verify nested List objects are recursed 2013-03-01 14:37:28 -08:00
Tony Tam
70fef15f81 name clean-up 2013-02-28 20:22:02 -08:00
Tony Tam
7b651dedcd removed null guards 2013-02-28 20:19:04 -08:00
Tony Tam
a6af380833 removed println 2013-02-28 17:28:15 -08:00
Tony Tam
b0993379ee added model test 2013-02-28 17:27:56 -08:00
Tony Tam
7e7005abe2 Merge pull request #33 from sibblegp/master
Bug Fix:  Null JSON value breaks integer conversion
2013-02-28 17:27:06 -08:00
George Sibble
55cf01d9f7 Also for Python 3 2013-02-28 15:06:59 -08:00
George Sibble
7354d6722f Include TypeError Detection
Check for NoneType in Python
2013-02-28 15:04:35 -08:00
Ivan Porto Carrero
8e7c3b7164 update sbt script 2013-02-25 10:27:31 +01:00
Tony Tam
c33358d48f updated docs 2013-02-22 19:15:17 -08:00
Tony Tam
ea541a6cf7 updated docs 2013-02-22 19:12:35 -08:00
Tony Tam
9a067c7821 added sample output docs 2013-02-22 19:04:01 -08:00
Tony Tam
67d48e4e35 fixed data type 2013-02-22 19:03:43 -08:00
Tony Tam
1b89879a47 updated output path 2013-02-22 19:03:32 -08:00
Tony Tam
79c4a09181 changed to use java 2013-02-22 19:03:22 -08:00
Tony Tam
ea35f2cf0e disabled parallel tests 2013-02-22 18:55:13 -08:00
Tony Tam
828607c67b added static doc script 2013-02-22 18:23:27 -08:00
Tony Tam
64ffd7be36 removed fail on warning 2013-02-22 18:19:01 -08:00
Tony Tam
4003a0d61c turned model into map 2013-02-22 18:18:17 -08:00
Tony Tam
631b44fee2 updated path 2013-02-22 18:16:59 -08:00
Tony Tam
c2c1bbc417 Merge pull request #23 from mrjf/master
wordnik.com api clients for python, python3 and php
2013-02-21 11:07:02 -08:00
Tony Tam
10c5a8346f Merge pull request #31 from ceraslabs/master
Fixed compilation error
2013-02-21 11:03:57 -08:00
Hongbin Lu
c0c2f0bebc Fixed an error that escaping a non-string object 2013-02-21 17:33:37 +00:00
Hongbin Lu
85e8ead0cf Fixed a ArrayList cannot be resolved error 2013-02-21 17:19:16 +00:00
Tony Tam
2e0ac79f0c Merge branch 'master' of github.com:wordnik/swagger-codegen 2013-02-21 00:24:32 -05:00
Tony Tam
b7dae2a846 cleaned up compiler warnings 2013-02-21 00:24:20 -05:00
Ivan Porto Carrero
cf470009ba update to sbt 0.12.2 2013-02-20 18:26:11 +01:00
Russell Horton
434102550f update php wordnik sample app 2013-02-10 13:24:39 -08:00
Russell Horton
00ac23c462 separate PHP query, header and path param serialization and encoding 2013-02-10 13:24:01 -08:00
Tony Tam
402266e65b removed optional name field for models 2013-02-06 17:03:30 -08:00
Tony Tam
852eb0bf49 added error handling 2013-02-06 17:03:19 -08:00
Tony Tam
84e17c7707 made public 2013-02-06 16:39:44 -08:00
Tony Tam
fb4a6c968c better error messages 2013-02-06 16:39:31 -08:00
Tony Tam
b3076d95b2 began adding friendly validation messages 2013-02-05 17:52:17 -08:00
Tony Tam
a2bff39427 added credentials for publish 2013-01-14 14:22:15 -08:00
Tony Tam
0d82786715 fixed scalate deps for mvn build 2013-01-14 13:49:16 -08:00
Tony Tam
17a433fb59 Merge pull request #24 from wordnik/sbtify
use sbt for building, only use json4s-jackson
2013-01-14 13:41:23 -08:00
Ivan Porto Carrero
55ce19a233 also build for 2.10 2013-01-14 01:56:19 +01:00
Ivan Porto Carrero
59d74a83af use sbt for building, only use json4s-jackson 2013-01-14 01:06:19 +01:00
Tony Tam
dea4b746b7 Merge branch 'master' of github.com:wordnik/swagger-codegen 2013-01-04 11:08:49 -08:00
Tony Tam
61f5031f8a updated with npm-managed swagger package 2013-01-04 11:08:20 -08:00
Tony Tam
5d60632aa6 updated with npm-managed swagger package 2013-01-04 11:07:12 -08:00
ramesh
fe30ed3580 Fixed issue in configuring output path for supporting files. 2013-01-03 14:27:43 -08:00
Tony Tam
7370354535 fixed repo 2012-12-26 21:22:50 -08:00
Tony Tam
b2890a00a3 removed println 2012-12-26 20:06:29 -08:00
Tony Tam
f329b94625 fixed string bug 2012-12-26 20:02:03 -08:00
Russell Horton
62352a126e removing unneeded capitalized data types 2012-12-21 11:27:48 -08:00
Russell Horton
16be3a7f54 added sample readmes 2012-12-20 15:32:05 -08:00
Russell Horton
1de97d204d updated env var documentation 2012-12-20 14:53:51 -08:00
Russell Horton
2bc8cc01a5 tests for python3 wordnik.com api client 2012-12-20 14:38:15 -08:00
Russell Horton
6266a94857 generated python3 client for wordnik.com api 2012-12-20 14:35:48 -08:00
Russell Horton
bd19ef489c python3 wordnik.com api client generation 2012-12-20 14:35:27 -08:00
Russell Horton
a7b9a930e5 tests for python wordnik.com api client 2012-12-20 14:35:10 -08:00
Russell Horton
39659d8c36 generated python wordnik.com api client 2012-12-20 14:34:33 -08:00
Russell Horton
22ebb85c35 python wordnik.com api generation 2012-12-20 14:34:01 -08:00
Russell Horton
30109204d9 generated php client for wordnik.com api 2012-12-20 14:33:45 -08:00
Russell Horton
3cd48e17d2 php tests for wordnik.com api client 2012-12-20 14:32:51 -08:00
Russell Horton
da5c7a77c3 php wordnik.com api client generation 2012-12-20 14:32:29 -08:00
Russell Horton
43708f6395 map lower case type names as well as upper 2012-12-20 14:26:19 -08:00
Russell Horton
29cec989b2 better escaping for path parameters 2012-12-20 14:25:47 -08:00
Russell Horton
93c0134da9 better url escaping for path values 2012-12-20 14:25:14 -08:00
Russell Horton
5840120124 added Scrabble score method and model 2012-12-20 14:24:42 -08:00
Tony Tam
9d014e89bc added distro target 2012-12-18 23:25:27 -08:00
Tony Tam
15a3e15f2f Merge branch 'master' of github.com:wordnik/swagger-codegen 2012-12-18 22:54:12 -08:00
Tony Tam
95d77807c2 cleaned up toApiName to strip bad chars 2012-12-18 22:53:46 -08:00
Tony Tam
28221b5f5a added more lenient int extraction, optional basepath 2012-12-18 22:53:25 -08:00
Tony Tam
c9397ce1e7 changed to use paramName instead of baseName to support the toParamName method 2012-12-18 22:53:03 -08:00
Tony Tam
a1f8bcd0ae Update README.md 2012-12-08 21:16:40 -08:00
Tony Tam
f1f466b69f made extracter smarter with bool, int, string 2012-12-08 12:52:03 -08:00
Tony Tam
df48f4d8a9 added models to map 2012-12-05 07:38:10 -08:00
Tony Tam
4c6cea87f1 [maven-release-plugin] prepare for next development iteration 2012-12-04 17:55:57 -08:00
915 changed files with 77498 additions and 18995 deletions

6
.gitignore vendored
View File

@@ -23,3 +23,9 @@ 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
View File

@@ -0,0 +1,3 @@
language: scala
scala:
- 2.10.0

11
LICENSE Normal file
View File

@@ -0,0 +1,11 @@
Copyright 2014 Reverb Technologies, 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 [apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)
Unless required by applicable law or agreed to in writing, software
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.

129
README.md
View File

@@ -1,27 +1,57 @@
# Swagger Code Generator
[![Build Status](https://travis-ci.org/swagger-api/swagger-codegen.png)](https://travis-ci.org/swagger-api/swagger-codegen)
## Overview
This is the swagger codegen project, which allows generation of client libraries automatically from a
Swagger-compliant server. You can find out more about both the spec and the framework at
http://swagger.wordnik.com. For more information about Wordnik's APIs, please visit http://developer.wordnik.com.
Swagger-compliant server.
## What's Swagger?
The goal of Swagger™ is to define a standard, language-agnostic interface to REST APIs which allows both humans and computers to discover and understand the capabilities of the service without access to source code, documentation, or through network traffic inspection. When properly defined via Swagger, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interfaces have done for lower-level programming, Swagger removes the guesswork in calling the service.
Check out [Swagger-Spec](https://github.com/swagger-api/swagger-spec) for additional information about the Swagger project, including additional libraries with support for other languages and more.
## Compatibility
The Swagger Specification has undergone 3 revisions since initial creation in 2010. Compatibility between swagger-codegen and the Swagger specification is as follows:
Swagger Codegen Version | Release Date | Swagger Spec compatibility | Notes
----------------------- | ------------ | -------------------------- | -----
2.1.0 (in development) | n/a | 1.0, 1.1, 1.2, 2.0 | [branch develop_2.0](https://github.com/swagger-api/swagger-codegen/tree/develop_2.0)
2.0.17 | 2014-08-22 | 1.1, 1.2 | [tag v2.0.17](https://github.com/swagger-api/swagger-codegen/tree/2.0.17)
1.0.4 | 2012-04-12 | 1.0, 1.1 | [tag v1.0.4](https://github.com/swagger-api/swagger-codegen/tree/swagger-codegen_2.9.1-1.1)
### 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.10.4](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:
```
mvn package
./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:
@@ -29,7 +59,7 @@ You can build a client against Wordnik's [petstore](http://petstore.swagger.word
./bin/scala-petstore.sh
```
This will run the script in [samples/client/petstore/ScalaPetstoreCodegen.scala](https://github.com/wordnik/swagger-codegen/blob/master/samples/client/petstore/scala/ScalaPetstoreCodegen.scala) and create the client. You can then
This will run the script in [samples/client/petstore/ScalaPetstoreCodegen.scala](https://github.com/swagger-api/swagger-codegen/blob/master/samples/client/petstore/scala/ScalaPetstoreCodegen.scala) and create the client. You can then
compile and run the client, as well as unit tests against it:
```
@@ -52,13 +82,13 @@ 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`.
You will probably want to override some of the defaults--like packages, etc. For doing this, just create a scala
script with the overrides you want. Follow [ScalaPetstoreCodegen](https://github.com/wordnik/swagger-codegen/blob/master/samples/client/petstore/scala/ScalaPetstoreCodegen.scala) as an example:
script with the overrides you want. Follow [ScalaPetstoreCodegen](https://github.com/swagger-api/swagger-codegen/blob/master/samples/client/petstore/scala/ScalaPetstoreCodegen.scala) as an example:
For example, create `src/main/scala/MyCodegen.scala` with these contents:
@@ -108,15 +138,17 @@ You can look at `src/main/resources/${your-language}` for examples. To make you
and override the `templateDir` in your script to point to the right place. It actually is that easy.
### Where is Javascript???
See our [javascript library](http://github.com/wordnik/swagger.js)--it's completely dynamic and doesn't require
See our [javascript library](http://github.com/swagger-api/swagger-js)--it's completely dynamic and doesn't require
static code generation.
There is a third-party component called [swagger-js-codegen](https://github.com/wcandillon/swagger-js-codegen) that can generate angularjs or nodejs source code from a swagger specification.
#### Generating a client from flat files (i.e. no remote server calls)
If you don't want to call your server, you can save the swagger spec files into a directory and pass an argument
to the code generator like this:
```
-DfileMap=/path/to/files
-DfileMap=/path/to/resource-listing
```
Or for example:
@@ -129,42 +161,89 @@ ci server... or while coding on an airplane.
### Validating your swagger spec
You can use the validation tool to see that your server is creating a proper spec file. If you want to learn
more about the spec file and format, please see [swagger-core](https://github.com/wordnik/swagger-core/wiki). This
more about the spec file and format, please see [swagger-spec](https://github.com/swagger-api/swagger-spec). This
tool will read the server and generate a report of any violations of the spec. If there are violations, the
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
```
### 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.
```
./bin/static-docs.sh
```
Will produce the output here:
```
https://github.com/swagger-api/swagger-codegen/tree/master/samples/swagger-static-docs/docs
```
which is based on these templates:
```
https://github.com/swagger-api/swagger-codegen/tree/master/src/main/resources/swagger-static
```
and looks like this
![Image](https://raw.github.com/swagger-api/swagger-codegen/master/samples/docs/swagger-static-docs/static-docs.png)
### To build a server stub
You can also use the codegen to generate a server for a couple different frameworks. Take a look here:
* [javascript node.js Server generator](https://github.com/swagger-api/swagger-codegen/tree/master/samples/server-generator/node)
* [ruby sinatra generator](https://github.com/swagger-api/swagger-codegen/tree/master/samples/server-generator/sinatra)
* [scala scalatra generator](https://github.com/swagger-api/swagger-codegen/tree/master/samples/server-generator/scalatra)
* [java jax-rs generator](https://github.com/swagger-api/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/swagger-api/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.
```
mvn package
./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!
### To build a server stub
You can also use the codegen to generate a server for a couple different frameworks. Take a look here:
* [javascript node.js Server generator](https://github.com/wordnik/swagger-codegen/tree/master/samples/server-generator/node)
* [ruby sinatra generator](https://github.com/wordnik/swagger-codegen/tree/master/samples/server-generator/sinatra)
* [scala scalatra generator](https://github.com/wordnik/swagger-codegen/tree/master/samples/server-generator/scalatra)
License
-------
Copyright 2012 Wordnik, Inc.
Copyright 2014 Reverb Technologies, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

6
bin/Version.scala Normal file
View File

@@ -0,0 +1,6 @@
val version = scala.util.Properties.scalaPropOrElse("version.number", "unknown").toString match {
case s if s startsWith "2.10" => "2.10"
case s if s startsWith "2.11" => "2.11"
case e: String => e
}
println(version)

37
bin/all-petstore.sh Executable file
View 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
View File

@@ -0,0 +1,32 @@
#!/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
SCALA_RUNNER_VERSION=$(scala ./bin/Version.scala)
# 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/*assembly*.jar ]; then
scala -cp $APP_DIR/target/scala-$SCALA_RUNNER_VERSION/*assembly*.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
View 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/*assembly*.jar ]; then
scala -cp target/scala-$SCALA_RUNNER_VERSION/*assembly*.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
View 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/*assembly*.jar ]; then
scala -cp target/scala-$SCALA_RUNNER_VERSION/*assembly*.jar $ags
else
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
fi

View File

@@ -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} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
JAVA_OPTS=$JAVA_OPTS scala -cp $CLASSPATH "$@" samples/client/petstore/flash/FlashPetstoreCodegen.scala http://petstore.swagger.wordnik.com/api/api-docs.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/*assembly*.jar ]; then
scala -cp target/scala-$SCALA_RUNNER_VERSION/*assembly*.jar $ags
else
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
fi

View File

@@ -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} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
JAVA_OPTS=$JAVA_OPTS scala -cp $CLASSPATH "$@" samples/client/petstore/java/JavaPetstoreCodegen.scala http://petstore.swagger.wordnik.com/api/api-docs.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.2/api-docs -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/*assembly*.jar ]; then
scala -cp target/scala-$SCALA_RUNNER_VERSION/*assembly*.jar $ags
else
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
fi

View File

@@ -1,6 +1,32 @@
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
#!/bin/sh
export CLASSPATH="$DIR/../target/lib/*:$DIR/../target/*"
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"
JAVA_OPTS=$JAVA_OPTS scala -cp $CLASSPATH "$@" samples/client/petstore/java/JavaPetstoreCodegen.scala http://petstore.swagger.wordnik.com/api/api-docs.json special-key
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/*assembly*.jar ]; then
scala -cp $APP_DIR/target/scala-$SCALA_RUNNER_VERSION/*assembly*.jar $ags
else
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
fi

View File

@@ -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} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties -DfileMap=samples/client/wordnik-api/spec-files"
JAVA_OPTS=$JAVA_OPTS scala -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/*assembly*.jar ]; then
scala -cp target/scala-$SCALA_RUNNER_VERSION/*assembly*.jar $ags
else
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
fi

View File

@@ -1,6 +1,34 @@
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
#!/bin/sh
export CLASSPATH="$DIR/../target/*:$DIR/../target/lib/*"
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"
JAVA_OPTS=$JAVA_OPTS scala -cp $CLASSPATH "$@" samples/client/petstore/objc/ObjcPetstoreCodegen.scala http://petstore.swagger.wordnik.com/api/api-docs.json special-key
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/*assembly*.jar ]; then
scala -cp target/scala-$SCALA_RUNNER_VERSION/*assembly*.jar $ags
else
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
fi

View File

@@ -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} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties -DfileMap=samples/client/wordnik-api/spec-files"
JAVA_OPTS=$JAVA_OPTS scala -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/resources.json"
ags="$@ samples/client/wordnik-api/objc/ObjcWordnikApiCodegen.scala http://api.wordnik.com/v4/resources.json"
if [ -f $APP_DIR/target/scala-$SCALA_RUNNER_VERSION/*assembly*.jar ]; then
scala -cp target/scala-$SCALA_RUNNER_VERSION/*assembly*.jar $ags
else
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
fi

View File

@@ -1,6 +1,32 @@
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
#!/bin/sh
export CLASSPATH="$DIR/../target/lib/*:$DIR/../target/*"
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"
JAVA_OPTS=$JAVA_OPTS scala -cp $CLASSPATH "$@" samples/client/petstore/php/PHPPetstoreCodegen.scala http://petstore.swagger.wordnik.com/api/api-docs.json special-key
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/*assembly*.jar ]; then
scala -cp target/scala-$SCALA_RUNNER_VERSION/*assembly*.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
View 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/*assembly*.jar ]; then
scala -cp target/scala-$SCALA_RUNNER_VERSION/*assembly*.jar $ags
else
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
fi

View File

@@ -1,6 +1,32 @@
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
#!/bin/sh
export CLASSPATH="$DIR/../target/lib/*:$DIR/../target/*"
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"
JAVA_OPTS=$JAVA_OPTS scala -cp $CLASSPATH "$@" samples/client/petstore/python/PythonPetstoreCodegen.scala http://petstore.swagger.wordnik.com/api/api-docs.json special-key
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/*assembly*.jar ]; then
scala -cp target/scala-$SCALA_RUNNER_VERSION/*assembly*.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
View 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/*assembly*.jar ]; then
scala -cp target/scala-$SCALA_RUNNER_VERSION/*assembly*.jar $ags
else
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
fi

View File

@@ -1,6 +1,32 @@
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
#!/bin/sh
export CLASSPATH="$DIR/../target/lib/*:$DIR/../target/*"
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"
JAVA_OPTS=$JAVA_OPTS scala -cp $CLASSPATH "$@" samples/client/petstore/python3/Python3PetstoreCodegen.scala http://petstore.swagger.wordnik.com/api/api-docs.json special-key
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/*assembly*.jar ]; then
scala -cp target/scala-$SCALA_RUNNER_VERSION/*assembly*.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
View 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/*assembly*.jar ]; then
scala -cp target/scala-$SCALA_RUNNER_VERSION/*assembly*.jar $ags
else
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
fi

View File

@@ -1,6 +1,32 @@
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
#!/bin/sh
export CLASSPATH="$DIR/../target/lib/*:$DIR/../target/*"
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"
JAVA_OPTS=$JAVA_OPTS scala -cp $CLASSPATH "$@" samples/client/petstore/ruby/RubyPetstoreCodegen.scala http://petstore.swagger.wordnik.com/api/api-docs.json special-key
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/*assembly*.jar ]; then
scala -cp target/scala-$SCALA_RUNNER_VERSION/*assembly*.jar $ags
else
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
fi

View File

@@ -1,7 +1,32 @@
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
#!/bin/sh
export CLASSPATH="$DIR/../target/lib/*:$DIR/../target/*"
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
SCALA_RUNNER_VERSION=$(scala ./bin/Version.scala)
# 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"
JAVA_OPTS=$JAVA_OPTS scala -cp $CLASSPATH "$@"
ags="$@"
if [ -f $APP_DIR/target/scala-$SCALA_RUNNER_VERSION/*assembly*.jar ]; then
scala -cp $APP_DIR/target/scala-$SCALA_RUNNER_VERSION/*assembly*.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
View File

@@ -0,0 +1,31 @@
#!/bin/sh
SCRIPT="$0"
SCALA_RUNNER_VERSION=2.10 #$(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/*assembly*.jar ]; then
java -cp target/scala-$SCALA_RUNNER_VERSION/*assembly*.jar $ags
else
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
fi

View File

@@ -1,6 +1,32 @@
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
#!/bin/sh
export CLASSPATH="$DIR/../target/lib/*:$DIR/../target/*"
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"
JAVA_OPTS=$JAVA_OPTS scala -cp $CLASSPATH "$@" samples/client/petstore/scala/ScalaPetstoreCodegen.scala http://petstore.swagger.wordnik.com/api/api-docs.json special-key
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/*assembly*.jar ]; then
scala -cp target/scala-$SCALA_RUNNER_VERSION/*assembly*.jar $ags
else
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
fi

View File

@@ -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} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties -DfileMap=samples/client/wordnik-api/spec-files"
JAVA_OPTS=$JAVA_OPTS scala -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/*assembly*.jar ]; then
scala -cp target/scala-$SCALA_RUNNER_VERSION/*assembly*.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
View 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="$@ com.wordnik.swagger.codegen.SwaggerDocGenerator http://petstore.swagger.wordnik.com/api/api-docs"
if [ -f $APP_DIR/target/scala-$SCALA_RUNNER_VERSION/*assembly*.jar ]; then
scala -cp target/scala-$SCALA_RUNNER_VERSION/*assembly*.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
View 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/*assembly*.jar ]; then
scala -cp target/scala-$SCALA_RUNNER_VERSION/*assembly*.jar $ags
else
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
fi

View File

@@ -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} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
JAVA_OPTS=$JAVA_OPTS scala -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/*assembly*.jar ]; then
scala -cp target/scala-$SCALA_RUNNER_VERSION/*assembly*.jar $ags
else
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
fi

56
bin/yml2swagger.js Normal file
View 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);
}
}
});
}

137
build.sbt Normal file
View File

@@ -0,0 +1,137 @@
import xml.Group
import AssemblyKeys._
organization := "com.wordnik"
name := "swagger-codegen"
version := "2.0.18-SNAPSHOT"
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.10.4", "2.11.0", "2.11.1")
scalaVersion := "2.10.4"
libraryDependencies ++= Seq(
"org.json4s" %% "json4s-jackson" % "3.2.10",
"io.backchat.inflector" %% "scala-inflector" % "1.3.5",
"commons-io" % "commons-io" % "2.3",
"net.iharder" % "base64" % "2.3.8",
"ch.qos.logback" % "logback-classic" % "1.0.13" % "provided",
"org.rogach" %% "scallop" % "0.9.5",
"junit" % "junit" % "4.11" % "test",
"org.scalatest" %% "scalatest" % "2.1.7" % "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.scalatra.scalate" %% "scalate-core" % "1.7.0"
case v if v.startsWith("2.11") =>
"org.scalatra.scalate" %% "scalate-core" % "1.7.0"
}
libraryDependencies ++= {
scalaVersion.toString match {
case v if v.startsWith("2.10") || v.startsWith("2.11") => Seq("org.scala-lang" % "scala-reflect" % v)
case _ => Seq()
}
}
resolvers += "Typesafe releases" at "http://repo.typesafe.com/typesafe/releases"
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
View 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>

View 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
View 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
View File

@@ -0,0 +1 @@
sbt.version=0.13.5

5
project/plugins.sbt Normal file
View File

@@ -0,0 +1,5 @@
addSbtPlugin("com.typesafe.sbt" % "sbt-pgp" % "0.8.2")
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.9.1")
resolvers += "Sonatype OSS Releases" at "https://oss.sonatype.org/content/repositories/releases"

View File

@@ -0,0 +1,50 @@
/**
* Copyright 2014 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"),
("httpPatch.mustache", destinationDir + java.io.File.separator + invokerPackage.get.replace(".", java.io.File.separator) + java.io.File.separator, "HttpPatch.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")
)
}

View File

@@ -0,0 +1,170 @@
<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-petstore</artifactId>
<packaging>jar</packaging>
<name>swagger-petstore</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>
<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>
<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>
</plugins>
</build>
<dependencies>
<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>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>${httpclient-version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>${httpclient-version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
<version>${httpclient-version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>4.1.1.4</version>
<scope>compile</scope>
</dependency>
<!-- test dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit-version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<properties>
<jackson-version>2.1.4</jackson-version>
<junit-version>4.8.1</junit-version>
<maven-plugin-version>1.0.0</maven-plugin-version>
<junit-version>4.8.1</junit-version>
<httpclient-version>4.3</httpclient-version>
</properties>
</project>

View File

@@ -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;
}
}

View File

@@ -0,0 +1,312 @@
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.conn.*;
import org.apache.http.conn.scheme.*;
import org.apache.http.conn.ssl.*;
import org.apache.http.entity.mime.*;
import org.apache.http.entity.StringEntity;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.impl.client.*;
import org.apache.http.impl.conn.*;
import org.apache.http.params.*;
import org.apache.http.util.EntityUtils;
import java.io.File;
import java.net.Socket;
import java.net.UnknownHostException;
import java.net.URLEncoder;
import java.util.Map;
import java.util.HashMap;
import java.util.List;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.security.GeneralSecurityException;
import java.security.KeyManagementException;
import java.security.KeyStore;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import java.security.cert.*;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Random;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import javax.net.ssl.SSLContext;
import javax.net.ssl.TrustManager;
import javax.net.ssl.X509TrustManager;
public class ApiInvoker {
private static ApiInvoker INSTANCE = new ApiInvoker();
private Map<String, String> defaultHeaderMap = new HashMap<String, String>();
private HttpClient client = null;
private boolean ignoreSSLCertificates = false;
private ClientConnectionManager ignoreSSLConnectionManager;
public ApiInvoker() {
initConnectionManager();
}
public static ApiInvoker getInstance() {
return INSTANCE;
}
public void ignoreSSLCertificates(boolean ignoreSSLCertificates) {
this.ignoreSSLCertificates = ignoreSSLCertificates;
}
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);
if (body != null) {
if("application/x-www-form-urlencoded".equals(contentType)) {
post.setHeader("Content-Type", contentType);
post.setEntity(new UrlEncodedFormEntity((List<NameValuePair>)body));
}
else if("multipart/form-data".equals(contentType)) {
String boundary = "-------------" + System.currentTimeMillis();
post.setHeader("Content-type", "multipart/form-data; boundary="+boundary);
MultipartEntityBuilder builder = (MultipartEntityBuilder)body;
builder.setBoundary(boundary);
post.setEntity(builder.build());
}
else {
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) {
if("application/x-www-form-urlencoded".equals(contentType)) {
put.setHeader("Content-Type", contentType);
put.setEntity(new UrlEncodedFormEntity((List<NameValuePair>)body));
}
else if("multipart/form-data".equals(contentType)) {
String boundary = "-------------" + System.currentTimeMillis();
put.setHeader("Content-type", "multipart/form-data; boundary="+boundary);
MultipartEntityBuilder builder = (MultipartEntityBuilder)body;
builder.setBoundary(boundary);
put.setEntity(builder.build());
}
else {
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);
}
else if ("PATCH".equals(method)) {
HttpPatch patch = new HttpPatch(url);
if (body != null) {
patch.setHeader("Content-Type", contentType);
patch.setEntity(new StringEntity(serialize(body), "UTF-8"));
}
for(String key : headers.keySet()) {
patch.setHeader(key, headers.get(key));
}
response = client.execute(patch);
}
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) {
if (ignoreSSLCertificates && ignoreSSLConnectionManager != null) {
// Trust self signed certificates
client = new DefaultHttpClient(ignoreSSLConnectionManager, new BasicHttpParams());
} else {
client = new DefaultHttpClient();
}
}
return client;
}
private void initConnectionManager() {
try {
final SSLContext sslContext = SSLContext.getInstance("SSL");
// set up a TrustManager that trusts everything
TrustManager[] trustManagers = new TrustManager[] {
new X509TrustManager() {
public X509Certificate[] getAcceptedIssuers() {
return null;
}
public void checkClientTrusted(X509Certificate[] certs, String authType) {}
public void checkServerTrusted(X509Certificate[] certs, String authType) {}
}};
sslContext.init(null, trustManagers, new SecureRandom());
SSLSocketFactory sf = new SSLSocketFactory((KeyStore)null) {
private javax.net.ssl.SSLSocketFactory sslFactory = sslContext.getSocketFactory();
public Socket createSocket(Socket socket, String host, int port, boolean autoClose)
throws IOException, UnknownHostException {
return sslFactory.createSocket(socket, host, port, autoClose);
}
public Socket createSocket() throws IOException {
return sslFactory.createSocket();
}
};
sf.setHostnameVerifier(SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);
Scheme httpsScheme = new Scheme("https", sf, 443);
SchemeRegistry schemeRegistry = new SchemeRegistry();
schemeRegistry.register(httpsScheme);
schemeRegistry.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80));
ignoreSSLConnectionManager = new SingleClientConnManager(new BasicHttpParams(), schemeRegistry);
} catch (NoSuchAlgorithmException e) {
// This will only be thrown if SSL isn't available for some reason.
} catch (KeyManagementException e) {
// This might be thrown when passing a key into init(), but no key is being passed.
} catch (GeneralSecurityException e) {
// This catches anything else that might go wrong.
// If anything goes wrong we default to the standard connection manager.
}
}
}

View File

@@ -0,0 +1,16 @@
package com.wordnik.client;
import org.apache.http.client.methods.*;
public class HttpPatch extends HttpPost {
public static final String METHOD_PATCH = "PATCH";
public HttpPatch(final String url) {
super(url);
}
@Override
public String getMethod() {
return METHOD_PATCH;
}
}

View File

@@ -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;
}
}

View File

@@ -0,0 +1,538 @@
package com.wordnik.petstore.api;
import com.wordnik.client.ApiException;
import com.wordnik.client.ApiInvoker;
import com.wordnik.petstore.model.Pet;
import java.util.*;
import java.io.File;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.entity.mime.*;
import org.apache.http.entity.mime.content.*;
import org.apache.http.entity.ContentType;
import android.webkit.MimeTypeMap;
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;
}
private static String getMimeType(File file) {
MimeTypeMap mime = MimeTypeMap.getSingleton();
int index = file.getName().lastIndexOf('.')+1;
String ext = file.getName().substring(index).toLowerCase();
return mime.getMimeTypeFromExtension(ext);
}
//error info- code: 400 reason: "Invalid ID supplied" model: <none>
//error info- code: 404 reason: "Pet not found" model: <none>
//error info- code: 405 reason: "Validation exception" model: <none>
public void updatePet (Pet body) throws ApiException {
Object postBody = body;
// 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[] contentTypes = {
"application/json"};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if(contentType.startsWith("application/x-www-form-urlencoded")) {
boolean hasFields = false;
List<NameValuePair> mp = new ArrayList<NameValuePair>();
if(hasFields)
postBody = mp;
}
else if(contentType.startsWith("multipart/form-data")) {
boolean hasFields = false;
MultipartEntityBuilder builder = MultipartEntityBuilder.create();
builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);
if(hasFields)
postBody = builder;
}
else {
postBody = body;
}
try {
String response = apiInvoker.invokeAPI(basePath, path, "PUT", queryParams, postBody, headerParams, contentType);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return ;
}
else {
throw ex;
}
}
}
//error info- code: 405 reason: "Invalid input" model: <none>
public void addPet (Pet body) throws ApiException {
Object postBody = body;
// 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[] contentTypes = {
"application/json","application/xml"};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if(contentType.startsWith("application/x-www-form-urlencoded")) {
boolean hasFields = false;
List<NameValuePair> mp = new ArrayList<NameValuePair>();
if(hasFields)
postBody = mp;
}
else if(contentType.startsWith("multipart/form-data")) {
boolean hasFields = false;
MultipartEntityBuilder builder = MultipartEntityBuilder.create();
builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);
if(hasFields)
postBody = builder;
}
else {
postBody = body;
}
try {
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, contentType);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return ;
}
else {
throw ex;
}
}
}
//error info- code: 400 reason: "Invalid status value" model: <none>
public List<Pet> findPetsByStatus (String status) throws ApiException {
Object postBody = null;
// 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[] contentTypes = {
"application/json"};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if(contentType.startsWith("application/x-www-form-urlencoded")) {
boolean hasFields = false;
List<NameValuePair> mp = new ArrayList<NameValuePair>();
if(hasFields)
postBody = mp;
}
else if(contentType.startsWith("multipart/form-data")) {
boolean hasFields = false;
MultipartEntityBuilder builder = MultipartEntityBuilder.create();
builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);
if(hasFields)
postBody = builder;
}
else {
postBody = null;
}
try {
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, contentType);
if(response != null){
return (List<Pet>) ApiInvoker.deserialize(response, "List", Pet.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
//error info- code: 400 reason: "Invalid tag value" model: <none>
public List<Pet> findPetsByTags (String tags) throws ApiException {
Object postBody = null;
// 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[] contentTypes = {
"application/json"};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if(contentType.startsWith("application/x-www-form-urlencoded")) {
boolean hasFields = false;
List<NameValuePair> mp = new ArrayList<NameValuePair>();
if(hasFields)
postBody = mp;
}
else if(contentType.startsWith("multipart/form-data")) {
boolean hasFields = false;
MultipartEntityBuilder builder = MultipartEntityBuilder.create();
builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);
if(hasFields)
postBody = builder;
}
else {
postBody = null;
}
try {
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, contentType);
if(response != null){
return (List<Pet>) ApiInvoker.deserialize(response, "List", Pet.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
//error info- code: 405 reason: "Invalid input" model: <none>
public void updatePetWithForm (String petId, String name, String status) throws ApiException {
Object postBody = null;
// 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[] contentTypes = {
"application/x-www-form-urlencoded"};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if(contentType.startsWith("application/x-www-form-urlencoded")) {
boolean hasFields = false;
List<NameValuePair> mp = new ArrayList<NameValuePair>();
hasFields = true;
mp.add(new BasicNameValuePair("name", name));
hasFields = true;
mp.add(new BasicNameValuePair("status", status));
if(hasFields)
postBody = mp;
}
else if(contentType.startsWith("multipart/form-data")) {
boolean hasFields = false;
MultipartEntityBuilder builder = MultipartEntityBuilder.create();
builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);
hasFields = true;
builder.addTextBody("name", name.toString());
hasFields = true;
builder.addTextBody("status", status.toString());
if(hasFields)
postBody = builder;
}
else {
postBody = null;
}
try {
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, contentType);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return ;
}
else {
throw ex;
}
}
}
//error info- code: 400 reason: "Invalid ID supplied" model: <none>
//error info- code: 404 reason: "Pet not found" model: <none>
public Pet getPetById (Long petId) throws ApiException {
Object postBody = null;
// 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[] contentTypes = {
"application/json"};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if(contentType.startsWith("application/x-www-form-urlencoded")) {
boolean hasFields = false;
List<NameValuePair> mp = new ArrayList<NameValuePair>();
if(hasFields)
postBody = mp;
}
else if(contentType.startsWith("multipart/form-data")) {
boolean hasFields = false;
MultipartEntityBuilder builder = MultipartEntityBuilder.create();
builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);
if(hasFields)
postBody = builder;
}
else {
postBody = null;
}
try {
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, 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;
}
}
}
//error info- code: 400 reason: "Invalid pet value" model: <none>
public void deletePet (String petId) throws ApiException {
Object postBody = null;
// 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[] contentTypes = {
"application/json"};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if(contentType.startsWith("application/x-www-form-urlencoded")) {
boolean hasFields = false;
List<NameValuePair> mp = new ArrayList<NameValuePair>();
if(hasFields)
postBody = mp;
}
else if(contentType.startsWith("multipart/form-data")) {
boolean hasFields = false;
MultipartEntityBuilder builder = MultipartEntityBuilder.create();
builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);
if(hasFields)
postBody = builder;
}
else {
postBody = null;
}
try {
String response = apiInvoker.invokeAPI(basePath, path, "DELETE", queryParams, postBody, headerParams, contentType);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return ;
}
else {
throw ex;
}
}
}
//error info- code: 400 reason: "Invalid tag value" model: <none>
public List<Pet> partialUpdate (String petId, Pet body) throws ApiException {
Object postBody = body;
// 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[] contentTypes = {
"application/json","application/xml"};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if(contentType.startsWith("application/x-www-form-urlencoded")) {
boolean hasFields = false;
List<NameValuePair> mp = new ArrayList<NameValuePair>();
if(hasFields)
postBody = mp;
}
else if(contentType.startsWith("multipart/form-data")) {
boolean hasFields = false;
MultipartEntityBuilder builder = MultipartEntityBuilder.create();
builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);
if(hasFields)
postBody = builder;
}
else {
postBody = body;
}
try {
String response = apiInvoker.invokeAPI(basePath, path, "PATCH", queryParams, postBody, headerParams, contentType);
if(response != null){
return (List<Pet>) ApiInvoker.deserialize(response, "List", Pet.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public void uploadFile (String additionalMetadata, File file) throws ApiException {
Object postBody = null;
// 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[] contentTypes = {
"multipart/form-data"};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if(contentType.startsWith("application/x-www-form-urlencoded")) {
boolean hasFields = false;
List<NameValuePair> mp = new ArrayList<NameValuePair>();
hasFields = true;
mp.add(new BasicNameValuePair("additionalMetadata", additionalMetadata));
if(hasFields)
postBody = mp;
}
else if(contentType.startsWith("multipart/form-data")) {
boolean hasFields = false;
MultipartEntityBuilder builder = MultipartEntityBuilder.create();
builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);
hasFields = true;
builder.addTextBody("additionalMetadata", additionalMetadata.toString());
hasFields = true;
builder.addBinaryBody("file", file, ContentType.create(getMimeType(file)), file.getName());
if(hasFields)
postBody = builder;
}
else {
postBody = null;
}
try {
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, contentType);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return ;
}
else {
throw ex;
}
}
}
}

View File

@@ -0,0 +1,206 @@
package com.wordnik.petstore.api;
import com.wordnik.client.ApiException;
import com.wordnik.client.ApiInvoker;
import com.wordnik.petstore.model.Order;
import java.util.*;
import java.io.File;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.entity.mime.*;
import org.apache.http.entity.mime.content.*;
import org.apache.http.entity.ContentType;
import android.webkit.MimeTypeMap;
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;
}
private static String getMimeType(File file) {
MimeTypeMap mime = MimeTypeMap.getSingleton();
int index = file.getName().lastIndexOf('.')+1;
String ext = file.getName().substring(index).toLowerCase();
return mime.getMimeTypeFromExtension(ext);
}
//error info- code: 400 reason: "Invalid order" model: <none>
public void placeOrder (Order body) throws ApiException {
Object postBody = body;
// 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[] contentTypes = {
"application/json"};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if(contentType.startsWith("application/x-www-form-urlencoded")) {
boolean hasFields = false;
List<NameValuePair> mp = new ArrayList<NameValuePair>();
if(hasFields)
postBody = mp;
}
else if(contentType.startsWith("multipart/form-data")) {
boolean hasFields = false;
MultipartEntityBuilder builder = MultipartEntityBuilder.create();
builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);
if(hasFields)
postBody = builder;
}
else {
postBody = body;
}
try {
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, contentType);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return ;
}
else {
throw ex;
}
}
}
//error info- code: 400 reason: "Invalid ID supplied" model: <none>
//error info- code: 404 reason: "Order not found" model: <none>
public void deleteOrder (String orderId) throws ApiException {
Object postBody = null;
// 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[] contentTypes = {
"application/json"};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if(contentType.startsWith("application/x-www-form-urlencoded")) {
boolean hasFields = false;
List<NameValuePair> mp = new ArrayList<NameValuePair>();
if(hasFields)
postBody = mp;
}
else if(contentType.startsWith("multipart/form-data")) {
boolean hasFields = false;
MultipartEntityBuilder builder = MultipartEntityBuilder.create();
builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);
if(hasFields)
postBody = builder;
}
else {
postBody = null;
}
try {
String response = apiInvoker.invokeAPI(basePath, path, "DELETE", queryParams, postBody, headerParams, contentType);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return ;
}
else {
throw ex;
}
}
}
//error info- code: 400 reason: "Invalid ID supplied" model: <none>
//error info- code: 404 reason: "Order not found" model: <none>
public Order getOrderById (String orderId) throws ApiException {
Object postBody = null;
// 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[] contentTypes = {
"application/json"};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if(contentType.startsWith("application/x-www-form-urlencoded")) {
boolean hasFields = false;
List<NameValuePair> mp = new ArrayList<NameValuePair>();
if(hasFields)
postBody = mp;
}
else if(contentType.startsWith("multipart/form-data")) {
boolean hasFields = false;
MultipartEntityBuilder builder = MultipartEntityBuilder.create();
builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);
if(hasFields)
postBody = builder;
}
else {
postBody = null;
}
try {
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, 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;
}
}
}
}

View File

@@ -0,0 +1,468 @@
package com.wordnik.petstore.api;
import com.wordnik.client.ApiException;
import com.wordnik.client.ApiInvoker;
import com.wordnik.petstore.model.User;
import java.util.*;
import java.io.File;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.entity.mime.*;
import org.apache.http.entity.mime.content.*;
import org.apache.http.entity.ContentType;
import android.webkit.MimeTypeMap;
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;
}
private static String getMimeType(File file) {
MimeTypeMap mime = MimeTypeMap.getSingleton();
int index = file.getName().lastIndexOf('.')+1;
String ext = file.getName().substring(index).toLowerCase();
return mime.getMimeTypeFromExtension(ext);
}
public void createUsersWithArrayInput (List<User> body) throws ApiException {
Object postBody = body;
// 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[] contentTypes = {
"application/json"};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if(contentType.startsWith("application/x-www-form-urlencoded")) {
boolean hasFields = false;
List<NameValuePair> mp = new ArrayList<NameValuePair>();
if(hasFields)
postBody = mp;
}
else if(contentType.startsWith("multipart/form-data")) {
boolean hasFields = false;
MultipartEntityBuilder builder = MultipartEntityBuilder.create();
builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);
if(hasFields)
postBody = builder;
}
else {
postBody = body;
}
try {
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, 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 {
Object postBody = body;
// 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[] contentTypes = {
"application/json"};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if(contentType.startsWith("application/x-www-form-urlencoded")) {
boolean hasFields = false;
List<NameValuePair> mp = new ArrayList<NameValuePair>();
if(hasFields)
postBody = mp;
}
else if(contentType.startsWith("multipart/form-data")) {
boolean hasFields = false;
MultipartEntityBuilder builder = MultipartEntityBuilder.create();
builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);
if(hasFields)
postBody = builder;
}
else {
postBody = body;
}
try {
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, contentType);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return ;
}
else {
throw ex;
}
}
}
//error info- code: 400 reason: "Invalid username supplied" model: <none>
//error info- code: 404 reason: "User not found" model: <none>
public void updateUser (String username, User body) throws ApiException {
Object postBody = body;
// 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[] contentTypes = {
"application/json"};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if(contentType.startsWith("application/x-www-form-urlencoded")) {
boolean hasFields = false;
List<NameValuePair> mp = new ArrayList<NameValuePair>();
if(hasFields)
postBody = mp;
}
else if(contentType.startsWith("multipart/form-data")) {
boolean hasFields = false;
MultipartEntityBuilder builder = MultipartEntityBuilder.create();
builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);
if(hasFields)
postBody = builder;
}
else {
postBody = body;
}
try {
String response = apiInvoker.invokeAPI(basePath, path, "PUT", queryParams, postBody, headerParams, contentType);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return ;
}
else {
throw ex;
}
}
}
//error info- code: 400 reason: "Invalid username supplied" model: <none>
//error info- code: 404 reason: "User not found" model: <none>
public void deleteUser (String username) throws ApiException {
Object postBody = null;
// 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[] contentTypes = {
"application/json"};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if(contentType.startsWith("application/x-www-form-urlencoded")) {
boolean hasFields = false;
List<NameValuePair> mp = new ArrayList<NameValuePair>();
if(hasFields)
postBody = mp;
}
else if(contentType.startsWith("multipart/form-data")) {
boolean hasFields = false;
MultipartEntityBuilder builder = MultipartEntityBuilder.create();
builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);
if(hasFields)
postBody = builder;
}
else {
postBody = null;
}
try {
String response = apiInvoker.invokeAPI(basePath, path, "DELETE", queryParams, postBody, headerParams, contentType);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return ;
}
else {
throw ex;
}
}
}
//error info- code: 400 reason: "Invalid username supplied" model: <none>
//error info- code: 404 reason: "User not found" model: <none>
public User getUserByName (String username) throws ApiException {
Object postBody = null;
// 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[] contentTypes = {
"application/json"};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if(contentType.startsWith("application/x-www-form-urlencoded")) {
boolean hasFields = false;
List<NameValuePair> mp = new ArrayList<NameValuePair>();
if(hasFields)
postBody = mp;
}
else if(contentType.startsWith("multipart/form-data")) {
boolean hasFields = false;
MultipartEntityBuilder builder = MultipartEntityBuilder.create();
builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);
if(hasFields)
postBody = builder;
}
else {
postBody = null;
}
try {
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, 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;
}
}
}
//error info- code: 400 reason: "Invalid username and password combination" model: <none>
public String loginUser (String username, String password) throws ApiException {
Object postBody = null;
// 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[] contentTypes = {
"application/json"};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if(contentType.startsWith("application/x-www-form-urlencoded")) {
boolean hasFields = false;
List<NameValuePair> mp = new ArrayList<NameValuePair>();
if(hasFields)
postBody = mp;
}
else if(contentType.startsWith("multipart/form-data")) {
boolean hasFields = false;
MultipartEntityBuilder builder = MultipartEntityBuilder.create();
builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);
if(hasFields)
postBody = builder;
}
else {
postBody = null;
}
try {
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, 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 {
Object postBody = null;
// 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[] contentTypes = {
"application/json"};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if(contentType.startsWith("application/x-www-form-urlencoded")) {
boolean hasFields = false;
List<NameValuePair> mp = new ArrayList<NameValuePair>();
if(hasFields)
postBody = mp;
}
else if(contentType.startsWith("multipart/form-data")) {
boolean hasFields = false;
MultipartEntityBuilder builder = MultipartEntityBuilder.create();
builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);
if(hasFields)
postBody = builder;
}
else {
postBody = null;
}
try {
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, 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 {
Object postBody = body;
// 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[] contentTypes = {
"application/json"};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if(contentType.startsWith("application/x-www-form-urlencoded")) {
boolean hasFields = false;
List<NameValuePair> mp = new ArrayList<NameValuePair>();
if(hasFields)
postBody = mp;
}
else if(contentType.startsWith("multipart/form-data")) {
boolean hasFields = false;
MultipartEntityBuilder builder = MultipartEntityBuilder.create();
builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);
if(hasFields)
postBody = builder;
}
else {
postBody = body;
}
try {
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, contentType);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return ;
}
else {
throw ex;
}
}
}
}

View File

@@ -0,0 +1,34 @@
package com.wordnik.petstore.model;
import com.fasterxml.jackson.annotation.JsonProperty;
public class Category {
@JsonProperty("id")
private Long id = null;
@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();
}
}

View File

@@ -0,0 +1,66 @@
package com.wordnik.petstore.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Date;
public class Order {
@JsonProperty("id")
private Long id = null;
@JsonProperty("petId")
private Long petId = null;
@JsonProperty("quantity")
private Integer quantity = null;
/* Order Status */
@JsonProperty("status")
private String status = null;
@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();
}
}

View File

@@ -0,0 +1,78 @@
package com.wordnik.petstore.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.*;
import com.wordnik.petstore.model.Category;
public class Pet {
/* unique identifier for the pet */
@JsonProperty("id")
private Long id = null;
@JsonProperty("category")
private Category category = null;
@JsonProperty("name")
private String name = null;
@JsonProperty("photoUrls")
private List<String> photoUrls = new ArrayList<String>();
@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();
}
}

View File

@@ -0,0 +1,34 @@
package com.wordnik.petstore.model;
import com.fasterxml.jackson.annotation.JsonProperty;
public class Tag {
@JsonProperty("id")
private Long id = null;
@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();
}
}

View File

@@ -0,0 +1,95 @@
package com.wordnik.petstore.model;
import com.fasterxml.jackson.annotation.JsonProperty;
public class User {
@JsonProperty("id")
private Long id = null;
@JsonProperty("firstName")
private String firstName = null;
@JsonProperty("username")
private String username = null;
@JsonProperty("lastName")
private String lastName = null;
@JsonProperty("email")
private String email = null;
@JsonProperty("password")
private String password = null;
@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 getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
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;
}
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(" 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();
}
}

View File

@@ -0,0 +1,45 @@
/**
* Copyright 2014 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"))
}

Binary file not shown.

View 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

View File

@@ -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>
/// 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>
/// 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>
/// 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;
}
}
}
}
}

View File

@@ -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>
/// Find purchase order by ID For valid response try integer IDs with value &lt;= 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>
/// Delete purchase order by ID For valid response try integer IDs with value &lt; 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>
/// 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;
}
}
}
}
}

View File

@@ -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>
/// 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>
/// 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>
/// 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;
}
}
}
}
}

View File

@@ -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;
}
}
}

View File

@@ -0,0 +1,100 @@
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";
client.Method = method;
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;
}
}
}

View File

@@ -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();
}
}
}

View File

@@ -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();
}
}
}

View File

@@ -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();
}
}
}

View File

@@ -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();
}
}
}

View File

@@ -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();
}
}
}

View File

@@ -1,5 +1,5 @@
/**
* Copyright 2012 Wordnik, Inc.
* Copyright 2014 Wordnik, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@@ -63,7 +63,7 @@
<arg line="-source-path ${sourcepath}"/>
<arg line="-footer 'Copyright Wordnik'"/>
<arg line="-package com.wordnik.swagger.api 'Contains the apis which are used by clients to make calls to the services deployed'"/>
<arg line="-package com.wordnik.swagger.model 'Contains common classes which encapsulate data elements required'"/>
<arg line="-package com.wordnik.swagger.codegen.model 'Contains common classes which encapsulate data elements required'"/>
<arg line="-package com.wordnik.swagger.common 'Contains classes which are used by the api classes to invoke the deployed api like SwaggerApi - a base class, ApiUserCredentials, etc.'"/>
<arg line="-package com.wordnik.swagger.event 'Results of calls made to Wordnik are returned via dispatched events. This package contains such event classes. Right now thats just ApiClientEvent and Response.'"/>
<arg line="-package com.wordnik.swagger.exception 'Contains classes that encapsulate the errors generated'"/>

View File

@@ -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;
}

View File

@@ -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();

View File

@@ -22,94 +22,19 @@ 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_createUsersWithListInput: String = "createUsersWithListInput";
public static const event_updateUser: String = "updateUser";
public static const event_deleteUser: String = "deleteUser";
public static const event_getUserByName: String = "getUserByName";
public static const event_loginUser: String = "loginUser";
public static const event_logoutUser: String = "logoutUser";
public static const event_createUser: String = "createUser";
public static const event_createUsersWithArrayInput: String = "createUsersWithArrayInput";
public static const event_createUsersWithListInput: String = "createUsersWithListInput";
/*
* 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");
// 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 = "createUser";
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");
// 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 = "createUsersWithListInput";
token.returnType = null ;
return requestId;
}
/*
* 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 +59,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 +84,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 +109,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 +138,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();
@@ -229,6 +154,81 @@ public static const event_logoutUser: String = "logoutUser";
token.returnType = null ;
return requestId;
}
/*
* Returns void */
public function createUser (body: User): String {
// create path and map variables
var path: String = "/user".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 = "createUser";
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/createWithList".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 = "createUsersWithListInput";
token.returnType = null ;
return requestId;
}
}
}

View File

@@ -8,13 +8,13 @@ package com.wordnik.client.model {
[XmlElement(name="petId")]
public var petId: Number = 0.0;
[XmlElement(name="quantity")]
public var quantity: Number = 0.0;
/* Order Status */
[XmlElement(name="status")]
public var status: String = null;
[XmlElement(name="quantity")]
public var quantity: Number = 0.0;
[XmlElement(name="shipDate")]
public var shipDate: Date = null;
@@ -22,8 +22,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;
}

View File

@@ -4,22 +4,13 @@ import com.wordnik.client.model.Category;
import com.wordnik.client.model.Tag;
[XmlRootNode(name="Pet")]
public class 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();
/* unique identifier for the pet */
[XmlElement(name="id")]
public var id: Number = 0.0;
[XmlElement(name="category")]
public var category: Category = null;
/* pet status in the store */
[XmlElement(name="status")]
public var status: String = null;
[XmlElement(name="name")]
public var name: String = null;
@@ -29,14 +20,24 @@ import com.wordnik.client.model.Tag;
[XmlElements(name="photoUrl", type="com.wordnik.client.model.String")]
public var photoUrls: Array = new Array();
// 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 += " (tags: " + tags + ")";
str += " (id: " + id + ")";
str += " (category: " + category + ")";
str += " (status: " + status + ")";
str += " (name: " + name + ")";
str += " (photoUrls: " + photoUrls + ")";
str += " (tags: " + tags + ")";
str += " (status: " + status + ")";
return str;
}

View File

@@ -5,38 +5,38 @@ package com.wordnik.client.model {
[XmlElement(name="id")]
public var id: Number = 0.0;
[XmlElement(name="lastName")]
public var lastName: String = null;
[XmlElement(name="phone")]
public var phone: String = null;
[XmlElement(name="firstName")]
public var firstName: String = null;
[XmlElement(name="username")]
public var username: String = null;
[XmlElement(name="lastName")]
public var lastName: String = null;
[XmlElement(name="email")]
public var email: String = null;
[XmlElement(name="password")]
public var password: String = null;
[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 += " (phone: " + phone + ")";
str += " (username: " + username + ")";
str += " (email: " + email + ")";
str += " (userStatus: " + userStatus + ")";
str += " (firstName: " + firstName + ")";
str += " (username: " + username + ")";
str += " (lastName: " + lastName + ")";
str += " (email: " + email + ")";
str += " (password: " + password + ")";
str += " (phone: " + phone + ")";
str += " (userStatus: " + userStatus + ")";
return str;
}

View File

@@ -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")){

View File

@@ -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);
}

View File

@@ -1,5 +1,5 @@
/**
* Copyright 2012 Wordnik, Inc.
* Copyright 2014 Wordnik, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,7 +20,7 @@ object JavaPetstoreCodegen extends BasicJavaGenerator {
def main(args: Array[String]) = generateClient(args)
// location of templates
override def templateDir = "Java"
override def templateDir = "src/main/resources/Java"
// where to write generated code
override def destinationDir = "samples/client/petstore/java/src/main/java"
@@ -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"))
}

View File

@@ -1,225 +1,170 @@
<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</groupId>
<artifactId>swagger-petstore</artifactId>
<packaging>jar</packaging>
<name>swagger-petstore</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>
</plugins>
</build>
<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.sun.jersey.contribs</groupId>
<artifactId>jersey-multipart</artifactId>
<version>${jersey-version}</version>
<scope>compile</scope>
</dependency>
<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>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-joda</artifactId>
<version>2.1.5</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>${jodatime-version}</version>
<scope>compile</scope>
</dependency>
<properties>
<!-- test dependencies -->
<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>
<jodatime-version>2.3</jodatime-version>
<junit-version>4.8.1</junit-version>
<maven-plugin-version>1.0.0</maven-plugin-version>
<junit-version>4.8.1</junit-version>
</properties>
</project>

View File

@@ -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.*;
@@ -13,29 +11,43 @@ import com.sun.jersey.api.client.config.ClientConfig;
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 com.sun.jersey.multipart.FormDataMultiPart;
import javax.ws.rs.core.Response.Status.Family;
import javax.ws.rs.core.MediaType;
import java.util.Map;
import java.util.HashMap;
import java.util.List;
import java.io.IOException;
import java.net.URLEncoder;
import java.io.UnsupportedEncodingException;
public class ApiInvoker {
private static ApiInvoker INSTANCE = new ApiInvoker();
private Map<String, Client> hostMap = new HashMap<String, Client>();
private Map<String, String> defaultHeaderMap = new HashMap<String, String>();
private boolean isDebug = false;
public void enableDebug() {
isDebug = true;
}
public static ApiInvoker getInstance() {
return INSTANCE;
}
public void addDefaultHeader(String key, String value) {
defaultHeaderMap.put(key, value);
}
public String escapeString(String str) {
return str;
try{
return URLEncoder.encode(str, "utf8").replaceAll("\\+", "%20");
}
catch(UnsupportedEncodingException e) {
return str;
}
}
public static Object deserialize(String json, String containerType, Class cls) throws ApiException {
@@ -46,10 +58,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 +74,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, Map<String, String> formParams, 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 +117,72 @@ public class ApiInvoker {
response = (ClientResponse) builder.get(ClientResponse.class);
}
else if ("POST".equals(method)) {
response = builder.post(ClientResponse.class, serialize(body));
if(body == null)
response = builder.post(ClientResponse.class, null);
else if(body instanceof FormDataMultiPart) {
response = builder.type(contentType).post(ClientResponse.class, body);
}
else
response = builder.type(contentType).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 {
if("application/x-www-form-urlencoded".equals(contentType)) {
StringBuilder formParamBuilder = new StringBuilder();
// encode the form params
for(String key : formParams.keySet()) {
String value = formParams.get(key);
if(value != null && !"".equals(value.trim())) {
if(formParamBuilder.length() > 0) {
formParamBuilder.append("&");
}
try {
formParamBuilder.append(URLEncoder.encode(key, "utf8")).append("=").append(URLEncoder.encode(value, "utf8"));
}
catch (Exception e) {
// move on to next
}
}
}
response = builder.type(contentType).put(ClientResponse.class, formParamBuilder.toString());
}
else
response = builder.type(contentType).put(ClientResponse.class, serialize(body));
}
}
else if ("DELETE".equals(method)) {
if(body == null)
response = builder.delete(ClientResponse.class, serialize(body));
else
response = builder.type(contentType).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();
if(isDebug)
client.addFilter(new LoggingFilter());
hostMap.put(host, client);
}
return hostMap.get(host);
}
}

View File

@@ -0,0 +1,24 @@
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;
import com.fasterxml.jackson.datatype.joda.*;
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);
mapper.registerModule(new JodaModule());
}
public static ObjectMapper getJsonMapper() {
return mapper;
}
}

View File

@@ -2,7 +2,13 @@ package com.wordnik.petstore.api;
import com.wordnik.client.ApiException;
import com.wordnik.client.ApiInvoker;
import com.wordnik.petstore.model.Pet;
import com.sun.jersey.multipart.FormDataMultiPart;
import javax.ws.rs.core.MediaType;
import java.io.File;
import java.util.*;
public class PetApi {
@@ -21,20 +27,38 @@ public class PetApi {
return basePath;
}
public Pet getPetById (String petId) throws ApiException {
// create path and map variables
String path = "/pet.{format}/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId));
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
//error info- code: 400 reason: "Invalid ID supplied" model: <none>
//error info- code: 404 reason: "Pet not found" model: <none>
public Pet getPetById (Long petId) throws ApiException {
Object postBody = null;
// 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>();
Map<String, String> formParams = new HashMap<String, String>();
String[] contentTypes = {
"application/json"};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if(contentType.startsWith("multipart/form-data")) {
boolean hasFields = false;
FormDataMultiPart mp = new FormDataMultiPart();
if(hasFields)
postBody = mp;
}
else {
}
try {
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams);
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType);
if(response != null){
return (Pet) ApiInvoker.deserialize(response, "", Pet.class);
}
@@ -50,20 +74,179 @@ public class PetApi {
}
}
}
//error info- code: 405 reason: "Invalid input" model: <none>
public void updatePetWithForm (String petId, String name, String status) throws ApiException {
Object postBody = null;
// 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>();
Map<String, String> formParams = new HashMap<String, String>();
String[] contentTypes = {
"application/x-www-form-urlencoded"};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if(contentType.startsWith("multipart/form-data")) {
boolean hasFields = false;
FormDataMultiPart mp = new FormDataMultiPart();
hasFields = true;
mp.field("name", name, MediaType.MULTIPART_FORM_DATA_TYPE);
hasFields = true;
mp.field("status", status, MediaType.MULTIPART_FORM_DATA_TYPE);
if(hasFields)
postBody = mp;
}
else {
formParams.put("name", name);formParams.put("status", status);}
try {
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return ;
}
else {
throw ex;
}
}
}
//error info- code: 400 reason: "Invalid pet value" model: <none>
public void deletePet (String petId) throws ApiException {
Object postBody = null;
// 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>();
Map<String, String> formParams = new HashMap<String, String>();
String[] contentTypes = {
"application/json"};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if(contentType.startsWith("multipart/form-data")) {
boolean hasFields = false;
FormDataMultiPart mp = new FormDataMultiPart();
if(hasFields)
postBody = mp;
}
else {
}
try {
String response = apiInvoker.invokeAPI(basePath, path, "DELETE", queryParams, postBody, headerParams, formParams, contentType);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return ;
}
else {
throw ex;
}
}
}
//error info- code: 400 reason: "Invalid tag value" model: <none>
public List<Pet> partialUpdate (String petId, Pet body) throws ApiException {
Object postBody = body;
// 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>();
Map<String, String> formParams = new HashMap<String, String>();
String[] contentTypes = {
"application/json","application/xml"};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if(contentType.startsWith("multipart/form-data")) {
boolean hasFields = false;
FormDataMultiPart mp = new FormDataMultiPart();
if(hasFields)
postBody = mp;
}
else {
}
try {
String response = apiInvoker.invokeAPI(basePath, path, "PATCH", queryParams, postBody, headerParams, formParams, contentType);
if(response != null){
return (List<Pet>) ApiInvoker.deserialize(response, "List", Pet.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
//error info- code: 405 reason: "Invalid input" model: <none>
public void addPet (Pet body) throws ApiException {
// create path and map variables
String path = "/pet.{format}".replaceAll("\\{format\\}","json");
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
Object postBody = body;
// 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>();
Map<String, String> formParams = new HashMap<String, String>();
String[] contentTypes = {
"application/json","application/xml"};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if(contentType.startsWith("multipart/form-data")) {
boolean hasFields = false;
FormDataMultiPart mp = new FormDataMultiPart();
if(hasFields)
postBody = mp;
}
else {
}
try {
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, body, headerParams);
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType);
if(response != null){
return ;
}
@@ -79,20 +262,39 @@ public class PetApi {
}
}
}
//error info- code: 400 reason: "Invalid ID supplied" model: <none>
//error info- code: 404 reason: "Pet not found" model: <none>
//error info- code: 405 reason: "Validation exception" model: <none>
public void updatePet (Pet body) throws ApiException {
// create path and map variables
String path = "/pet.{format}".replaceAll("\\{format\\}","json");
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
Object postBody = body;
// 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>();
Map<String, String> formParams = new HashMap<String, String>();
String[] contentTypes = {
"application/json"};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if(contentType.startsWith("multipart/form-data")) {
boolean hasFields = false;
FormDataMultiPart mp = new FormDataMultiPart();
if(hasFields)
postBody = mp;
}
else {
}
try {
String response = apiInvoker.invokeAPI(basePath, path, "PUT", queryParams, body, headerParams);
String response = apiInvoker.invokeAPI(basePath, path, "PUT", queryParams, postBody, headerParams, formParams, contentType);
if(response != null){
return ;
}
@@ -108,53 +310,39 @@ public class PetApi {
}
}
}
//error info- code: 400 reason: "Invalid status value" model: <none>
public List<Pet> findPetsByStatus (String status) throws ApiException {
// create path and map variables
String path = "/pet.{format}/findByStatus".replaceAll("\\{format\\}","json");
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
Object postBody = null;
// 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));
try {
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams);
if(response != null){
return (List<Pet>) ApiInvoker.deserialize(response, "List", 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 {
// create path and map variables
String path = "/pet.{format}/findByTags".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>();
Map<String, String> formParams = new HashMap<String, String>();
// verify required params are set
if(tags == null ) {
throw new ApiException(400, "missing required params");
if(!"null".equals(String.valueOf(status)))
queryParams.put("status", String.valueOf(status));
String[] contentTypes = {
"application/json"};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if(contentType.startsWith("multipart/form-data")) {
boolean hasFields = false;
FormDataMultiPart mp = new FormDataMultiPart();
if(hasFields)
postBody = mp;
}
if(!"null".equals(String.valueOf(tags)))
queryParams.put("tags", String.valueOf(tags));
else {
}
try {
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams);
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType);
if(response != null){
return (List<Pet>) ApiInvoker.deserialize(response, "List", Pet.class);
}
@@ -170,5 +358,98 @@ public class PetApi {
}
}
}
//error info- code: 400 reason: "Invalid tag value" model: <none>
public List<Pet> findPetsByTags (String tags) throws ApiException {
Object postBody = null;
// 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>();
Map<String, String> formParams = new HashMap<String, String>();
if(!"null".equals(String.valueOf(tags)))
queryParams.put("tags", String.valueOf(tags));
String[] contentTypes = {
"application/json"};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if(contentType.startsWith("multipart/form-data")) {
boolean hasFields = false;
FormDataMultiPart mp = new FormDataMultiPart();
if(hasFields)
postBody = mp;
}
else {
}
try {
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType);
if(response != null){
return (List<Pet>) ApiInvoker.deserialize(response, "List", Pet.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public void uploadFile (String additionalMetadata, File file) throws ApiException {
Object postBody = null;
// 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>();
Map<String, String> formParams = new HashMap<String, String>();
String[] contentTypes = {
"multipart/form-data"};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if(contentType.startsWith("multipart/form-data")) {
boolean hasFields = false;
FormDataMultiPart mp = new FormDataMultiPart();
hasFields = true;
mp.field("additionalMetadata", additionalMetadata, MediaType.MULTIPART_FORM_DATA_TYPE);
hasFields = true;
mp.field("file", file, MediaType.MULTIPART_FORM_DATA_TYPE);
if(hasFields)
postBody = mp;
}
else {
formParams.put("additionalMetadata", additionalMetadata);}
try {
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return ;
}
else {
throw ex;
}
}
}
}

View File

@@ -2,7 +2,13 @@ package com.wordnik.petstore.api;
import com.wordnik.client.ApiException;
import com.wordnik.client.ApiInvoker;
import com.wordnik.petstore.model.Order;
import com.sun.jersey.multipart.FormDataMultiPart;
import javax.ws.rs.core.MediaType;
import java.io.File;
import java.util.*;
public class StoreApi {
@@ -21,20 +27,131 @@ public class StoreApi {
return basePath;
}
public Order getOrderById (String orderId) throws ApiException {
//error info- code: 400 reason: "Invalid order" model: <none>
public void placeOrder (Order body) throws ApiException {
Object postBody = body;
// verify required params are set
if(body == 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".replaceAll("\\{format\\}","json");
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
Map<String, String> formParams = new HashMap<String, String>();
String[] contentTypes = {
"application/json"};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if(contentType.startsWith("multipart/form-data")) {
boolean hasFields = false;
FormDataMultiPart mp = new FormDataMultiPart();
if(hasFields)
postBody = mp;
}
else {
}
try {
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return ;
}
else {
throw ex;
}
}
}
//error info- code: 400 reason: "Invalid ID supplied" model: <none>
//error info- code: 404 reason: "Order not found" model: <none>
public void deleteOrder (String orderId) throws ApiException {
Object postBody = null;
// 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>();
Map<String, String> formParams = new HashMap<String, String>();
String[] contentTypes = {
"application/json"};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if(contentType.startsWith("multipart/form-data")) {
boolean hasFields = false;
FormDataMultiPart mp = new FormDataMultiPart();
if(hasFields)
postBody = mp;
}
else {
}
try {
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams);
String response = apiInvoker.invokeAPI(basePath, path, "DELETE", queryParams, postBody, headerParams, formParams, contentType);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return ;
}
else {
throw ex;
}
}
}
//error info- code: 400 reason: "Invalid ID supplied" model: <none>
//error info- code: 404 reason: "Order not found" model: <none>
public Order getOrderById (String orderId) throws ApiException {
Object postBody = null;
// 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>();
Map<String, String> formParams = new HashMap<String, String>();
String[] contentTypes = {
"application/json"};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if(contentType.startsWith("multipart/form-data")) {
boolean hasFields = false;
FormDataMultiPart mp = new FormDataMultiPart();
if(hasFields)
postBody = mp;
}
else {
}
try {
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType);
if(response != null){
return (Order) ApiInvoker.deserialize(response, "", Order.class);
}
@@ -50,63 +167,5 @@ 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");
}
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;
}
}
}
}

View File

@@ -2,7 +2,13 @@ package com.wordnik.petstore.api;
import com.wordnik.client.ApiException;
import com.wordnik.client.ApiInvoker;
import com.wordnik.petstore.model.User;
import com.sun.jersey.multipart.FormDataMultiPart;
import javax.ws.rs.core.MediaType;
import java.io.File;
import java.util.*;
public class UserApi {
@@ -21,107 +27,38 @@ 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;
}
}
}
//error info- code: 400 reason: "Invalid username supplied" model: <none>
//error info- code: 404 reason: "User not found" model: <none>
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>();
Object postBody = body;
// 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>();
Map<String, String> formParams = new HashMap<String, String>();
String[] contentTypes = {
"application/json"};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if(contentType.startsWith("multipart/form-data")) {
boolean hasFields = false;
FormDataMultiPart mp = new FormDataMultiPart();
if(hasFields)
postBody = mp;
}
else {
}
try {
String response = apiInvoker.invokeAPI(basePath, path, "PUT", queryParams, body, headerParams);
String response = apiInvoker.invokeAPI(basePath, path, "PUT", queryParams, postBody, headerParams, formParams, contentType);
if(response != null){
return ;
}
@@ -137,20 +74,38 @@ public class UserApi {
}
}
}
//error info- code: 400 reason: "Invalid username supplied" model: <none>
//error info- code: 404 reason: "User not found" model: <none>
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>();
Object postBody = null;
// 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>();
Map<String, String> formParams = new HashMap<String, String>();
String[] contentTypes = {
"application/json"};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if(contentType.startsWith("multipart/form-data")) {
boolean hasFields = false;
FormDataMultiPart mp = new FormDataMultiPart();
if(hasFields)
postBody = mp;
}
else {
}
try {
String response = apiInvoker.invokeAPI(basePath, path, "DELETE", queryParams, null, headerParams);
String response = apiInvoker.invokeAPI(basePath, path, "DELETE", queryParams, postBody, headerParams, formParams, contentType);
if(response != null){
return ;
}
@@ -166,20 +121,38 @@ public class UserApi {
}
}
}
//error info- code: 400 reason: "Invalid username supplied" model: <none>
//error info- code: 404 reason: "User not found" model: <none>
public User getUserByName (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>();
Object postBody = null;
// 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>();
Map<String, String> formParams = new HashMap<String, String>();
String[] contentTypes = {
"application/json"};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if(contentType.startsWith("multipart/form-data")) {
boolean hasFields = false;
FormDataMultiPart mp = new FormDataMultiPart();
if(hasFields)
postBody = mp;
}
else {
}
try {
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams);
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType);
if(response != null){
return (User) ApiInvoker.deserialize(response, "", User.class);
}
@@ -195,24 +168,41 @@ public class UserApi {
}
}
}
//error info- code: 400 reason: "Invalid username and password combination" model: <none>
public String loginUser (String username, String password) throws ApiException {
// create path and map variables
String path = "/user.{format}/login".replaceAll("\\{format\\}","json");
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
Object postBody = null;
// 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>();
Map<String, String> formParams = 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[] contentTypes = {
"application/json"};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if(contentType.startsWith("multipart/form-data")) {
boolean hasFields = false;
FormDataMultiPart mp = new FormDataMultiPart();
if(hasFields)
postBody = mp;
}
else {
}
try {
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams);
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType);
if(response != null){
return (String) ApiInvoker.deserialize(response, "", String.class);
}
@@ -229,15 +219,166 @@ public class UserApi {
}
}
public void logoutUser () throws ApiException {
Object postBody = null;
// 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>();
Map<String, String> formParams = new HashMap<String, String>();
String[] contentTypes = {
"application/json"};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if(contentType.startsWith("multipart/form-data")) {
boolean hasFields = false;
FormDataMultiPart mp = new FormDataMultiPart();
if(hasFields)
postBody = mp;
}
else {
}
try {
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams);
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, 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 {
Object postBody = body;
// 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>();
Map<String, String> formParams = new HashMap<String, String>();
String[] contentTypes = {
"application/json"};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if(contentType.startsWith("multipart/form-data")) {
boolean hasFields = false;
FormDataMultiPart mp = new FormDataMultiPart();
if(hasFields)
postBody = mp;
}
else {
}
try {
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, 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 {
Object postBody = body;
// 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>();
Map<String, String> formParams = new HashMap<String, String>();
String[] contentTypes = {
"application/json"};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if(contentType.startsWith("multipart/form-data")) {
boolean hasFields = false;
FormDataMultiPart mp = new FormDataMultiPart();
if(hasFields)
postBody = mp;
}
else {
}
try {
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, 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 {
Object postBody = body;
// 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>();
Map<String, String> formParams = new HashMap<String, String>();
String[] contentTypes = {
"application/json"};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if(contentType.startsWith("multipart/form-data")) {
boolean hasFields = false;
FormDataMultiPart mp = new FormDataMultiPart();
if(hasFields)
postBody = mp;
}
else {
}
try {
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType);
if(response != null){
return ;
}

View File

@@ -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();

View File

@@ -4,20 +4,15 @@ import java.util.*;
import com.wordnik.petstore.model.Category;
import com.wordnik.petstore.model.Tag;
public class Pet {
private List<Tag> tags = new ArrayList<Tag>();
/* unique identifier for the pet */
private Long id = null;
private Category category = null;
/* pet status in the store */
private String status = null;
private String name = null;
private List<String> photoUrls = new ArrayList<String>();
public List<Tag> getTags() {
return tags;
}
public void setTags(List<Tag> tags) {
this.tags = tags;
}
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;
}
@@ -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(" tags: ").append(tags).append("\n");
sb.append(" id: ").append(id).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();
}

View File

@@ -2,14 +2,15 @@ package com.wordnik.petstore.model;
public class User {
private Long id = null;
private String lastName = null;
private String phone = null;
private String firstName = null;
private String username = 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 getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
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(" phone: ").append(phone).append("\n");
sb.append(" username: ").append(username).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();
}

View File

@@ -1,5 +1,5 @@
/**
* Copyright 2012 Wordnik, Inc.
* Copyright 2014 Wordnik, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,18 +20,24 @@ 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")
)
}

View 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>

View File

@@ -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>

View File

@@ -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 */;
}

View File

@@ -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>

View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "1"
version = "1.0">
</Bucket>

View File

@@ -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>

View File

@@ -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/>

View File

@@ -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

View File

@@ -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

View File

@@ -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>

View File

@@ -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>

View File

@@ -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"
}
}

View File

@@ -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"
}
}

Some files were not shown because too many files have changed in this diff Show More