Compare commits

...

414 Commits

Author SHA1 Message Date
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
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
730 changed files with 67113 additions and 8662 deletions

5
.gitignore vendored
View File

@@ -23,3 +23,8 @@ samples/server-generator/node/output/node_modules
samples/server-generator/scalatra/target
samples/server-generator/scalatra/output/.history
target
.idea
.lib
atlassian-ide-plugin.xml
.DS_Store

3
.travis.yml Normal file
View File

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

View File

@@ -1,5 +1,7 @@
# Swagger Code Generator
[![Build Status](https://travis-ci.org/wordnik/swagger-codegen.png)](https://travis-ci.org/wordnik/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
@@ -8,20 +10,31 @@ http://swagger.wordnik.com. For more information about Wordnik's APIs, please v
### Prerequisites
You need the following installed and available in your $PATH:
* [Java 1.6](http://java.oracle.com)
* [Java 1.7](http://java.oracle.com)
Note! Some folks have had issues with OOM errors with java version "1.6.0_51". It's strongly suggested that you upgrade to 1.7!
* [Apache maven 3.0.3 or greater](http://maven.apache.org/)
* [Scala](http://www.scala-lang.org)
* [Scala 2.9.1](http://www.scala-lang.org)
* [sbt (only download if you're building on Windows)](http://www.scala-sbt.org/)
You also need to add the scala binary to your PATH.
After cloning the project, you need to build it from source with this command:
```
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:
@@ -52,7 +65,7 @@ Other languages have petstore samples, too:
It's just as easy--you can either run the default generators:
```
./bin/runscala.sh com.wordnik.swagger.codegen.BasicScalaGenerator http://petstore.swagger.wordnik.com/api/resources.json special-key
./bin/runscala.sh com.wordnik.swagger.codegen.BasicScalaGenerator http://petstore.swagger.wordnik.com/api/api-docs special-key
```
Replace `Scala` with `Flash`, `Java`, `Objc`, `PHP`, `Python`, `Python3`, `Ruby`.
@@ -136,20 +149,31 @@ client codegen and ui may not work correctly.
To validate an api and write output to ./swagger-errors.html:
```
./bin/validate.sh http://petstore.swagger.wordnik.com/api/resources.json "" ./swagger-errors.html
./bin/validate.sh http://petstore.swagger.wordnik.com/api/api-docs "specia-key" ./swagger-errors.html
```
### To build the codegen library
This will create the swagger-codegen library from source.
### Generating static api documentation
If you need to make static pages or don't want the sandbox of the swagger-ui, you can use the codegen to build them. Remember, the engine is just using mustache templates--the output format is your call.
```
mvn package
./bin/static-docs.sh
```
Note! The templates are included in the library generated. If you want to modify the templates, you'll need to
either repackage the library OR modify your codegen script to use a file path!
Will produce the output here:
```
https://github.com/wordnik/swagger-codegen/tree/master/samples/docs/swagger-static-docs
```
which is based on these templates:
```
https://github.com/wordnik/swagger-codegen/tree/master/src/main/resources/swagger-static
```
and looks like this
![Image](https://raw.github.com/wordnik/swagger-codegen/master/samples/docs/swagger-static-docs/static-docs.png)
### To build a server stub
@@ -161,10 +185,46 @@ You can also use the codegen to generate a server for a couple different framewo
* [scala scalatra generator](https://github.com/wordnik/swagger-codegen/tree/master/samples/server-generator/scalatra)
* [java jax-rs generator](https://github.com/wordnik/swagger-codegen/tree/master/samples/server-generator/java-jaxrs)
### Migrating from Swagger 1.1 to 1.2 format
If you've spent time hand-crafting your swagger spec files, you can use the [SpecConverter](https://github.com/wordnik/swagger-codegen/blob/master/src/main/scala/com/wordnik/swagger/codegen/SpecConverter.scala) to do the dirty work. For example:
```bash
$ ./bin/update-spec.sh http://developer.wordnik.com/v4/resources.json wordnik-developer
writing file wordnik-developer/api-docs
calling: http://developer.wordnik.com/v4/account.json
calling: http://developer.wordnik.com/v4/word.json
calling: http://developer.wordnik.com/v4/words.json
calling: http://developer.wordnik.com/v4/wordList.json
calling: http://developer.wordnik.com/v4/wordLists.json
writing file wordnik-developer/account
writing file wordnik-developer/word
writing file wordnik-developer/words
writing file wordnik-developer/wordList
writing file wordnik-developer/wordLists
```
Will read the 1.1 spec from wordnik developer and write it into the folder called `wordnik-developer`.
### To build the codegen library
This will create the swagger-codegen library from source.
```
./sbt assembly
```
Note! The templates are included in the library generated. If you want to modify the templates, you'll need to
either repackage the library OR modify your codegen script to use a file path!
License
-------
Copyright 2012 Wordnik, Inc.
Copyright 2013 Wordnik, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

7
bin/Version.scala Normal file
View File

@@ -0,0 +1,7 @@
val version = scala.util.Properties.scalaPropOrElse("version.number", "unknown").toString match {
case "2.10.0" => "2.10"
case "2.10.2" => "2.10"
case "2.10.3" => "2.10"
case e: String => e
}
println(version)

37
bin/all-petstore.sh Executable file
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"
SCALA_RUNNER_VERSION=$(scala ./bin/Version.scala)
while [ -h "$SCRIPT" ] ; do
ls=`ls -ld "$SCRIPT"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
SCRIPT="$link"
else
SCRIPT=`dirname "$SCRIPT"`/"$link"
fi
done
if [ ! -d "${APP_DIR}" ]; then
APP_DIR=`dirname "$SCRIPT"`/..
APP_DIR=`cd "${APP_DIR}"; pwd`
fi
cd $APP_DIR
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="$@ samples/client/petstore/android-java/AndroidJavaPetstoreCodegen.scala http://petstore.swagger.wordnik.com/api/api-docs special-key"
if [ -f $APP_DIR/target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar ]; then
scala -cp target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar $ags
else
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
fi

32
bin/android-java-wordnik-api.sh Executable file
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/swagger-codegen.jar ]; then
scala -cp target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar $ags
else
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
fi

32
bin/csharp-petstore.sh Executable file
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/swagger-codegen.jar ]; then
scala -cp target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar $ags
else
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
fi

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/swagger-codegen.jar ]; then
scala -cp target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar $ags
else
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
fi

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.1/resources.json -DloggerPath=conf/log4j.properties"
ags="$@ samples/client/petstore/java/JavaPetstoreCodegen.scala http://petstore.swagger.wordnik.com/api/api-docs special-key"
if [ -f $APP_DIR/target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar ]; then
scala -cp target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar $ags
else
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
fi

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/swagger-codegen.jar ]; then
scala -cp target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar $ags
else
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
fi

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/swagger-codegen.jar ]; then
scala -cp target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar $ags
else
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
fi

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/swagger-codegen.jar ]; then
scala -cp target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar $ags
else
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
fi

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 -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
ags="$@ samples/client/wordnik-api/objc/ObjcWordnikApiCodegen.scala http://api.wordnik.com/v4/resources.json"
if [ -f $APP_DIR/target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar ]; then
scala -cp target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar $ags
else
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
fi

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/swagger-codegen.jar ]; then
scala -cp target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar $ags
else
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
fi

32
bin/php-wordnik-api.sh Executable file
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/swagger-codegen.jar ]; then
scala -cp target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar $ags
else
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
fi

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/swagger-codegen.jar ]; then
scala -cp target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar $ags
else
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
fi

32
bin/python-wordnik-api.sh Executable file
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/swagger-codegen.jar ]; then
scala -cp target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar $ags
else
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
fi

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/swagger-codegen.jar ]; then
scala -cp target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar $ags
else
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
fi

32
bin/python3-wordnik-api.sh Executable file
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/swagger-codegen.jar ]; then
scala -cp target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar $ags
else
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
fi

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/swagger-codegen.jar ]; then
scala -cp target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar $ags
else
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
fi

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"
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 "$@"
ags="$@"
if [ -f $APP_DIR/target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar ]; then
scala -cp target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar $ags
else
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
fi

31
bin/scala-async.sh Executable file
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.ScalaAsyncClientGenerator $@"
if [ -f $APP_DIR/target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar ]; then
scala -cp target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar $ags
else
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
fi

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/swagger-codegen.jar ]; then
scala -cp target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar $ags
else
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
fi

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/swagger-codegen.jar ]; then
scala -cp target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar $ags
else
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
fi

32
bin/static-docs.sh Executable file
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"
ags="$@ SwaggerDocGenerator http://developer.wordnik.com/v4/resources.json"
if [ -f $APP_DIR/target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar ]; then
scala -cp target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar $ags
else
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
fi

31
bin/update-spec.sh Executable file
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/swagger-codegen.jar ]; then
scala -cp target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar $ags
else
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
fi

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/swagger-codegen.jar ]; then
scala -cp target/scala-$SCALA_RUNNER_VERSION/swagger-codegen.jar $ags
else
echo "Please set scalaVersion := \"$SCALA_RUNNER_VERSION\" in build.sbt and run ./sbt assembly"
fi

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

133
build.sbt Normal file
View File

@@ -0,0 +1,133 @@
import xml.Group
import AssemblyKeys._
organization := "com.wordnik"
name := "swagger-codegen"
version := "2.0.13"
scalaVersion := "2.10.1"
crossVersion := CrossVersion.full
javacOptions ++= Seq("-target", "1.6", "-source", "1.6", "-Xlint:unchecked", "-Xlint:deprecation")
scalacOptions ++= Seq("-optimize", "-unchecked", "-deprecation", "-Xcheckinit", "-encoding", "utf8")
crossScalaVersions := Seq("2.9.0", "2.9.0-1", "2.9.1", "2.9.1-1", "2.9.2", "2.9.3", "2.10.0", "2.10.1", "2.10.2")
libraryDependencies ++= Seq(
"org.json4s" %% "json4s-jackson" % "3.2.5",
"io.backchat.inflector" %% "scala-inflector" % "1.3.5",
"commons-io" % "commons-io" % "2.3",
"ch.qos.logback" % "logback-classic" % "1.0.13" % "provided",
"org.rogach" %% "scallop" % "0.8.1",
"junit" % "junit" % "4.11" % "test",
"org.scalatest" %% "scalatest" % "1.9.1" % "test"
)
libraryDependencies <+= scalaVersion {
case v if v.startsWith("2.9") =>
"org.fusesource.scalate" % "scalate-core_2.9" % "1.6.1"
case v if v.startsWith("2.10") => {
"org.fusesource.scalate" %% "scalate-core" % "1.6.1"
}
}
libraryDependencies ++= {
scalaVersion.toString match {
case v if v.startsWith("2.10") => Seq("org.scala-lang" % "scala-reflect" % v)
case _ => Seq()
}
}
packageOptions <+= (name, version, organization) map {
(title, version, vendor) =>
Package.ManifestAttributes(
"Created-By" -> "Simple Build Tool",
"Built-By" -> System.getProperty("user.name"),
"Build-Jdk" -> System.getProperty("java.version"),
"Specification-Title" -> title,
"Specification-Version" -> version,
"Specification-Vendor" -> vendor,
"Implementation-Title" -> title,
"Implementation-Version" -> version,
"Implementation-Vendor-Id" -> vendor,
"Implementation-Vendor" -> vendor
)
}
publishTo <<= (version) { version: String =>
if (version.trim.endsWith("SNAPSHOT"))
Some("Sonatype Nexus Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots")
else
Some("Sonatype Nexus Releases" at "https://oss.sonatype.org/service/local/staging/deploy/maven2")
}
//publishTo := Some(Resolver.file("file", new File(Path.userHome.absolutePath+"/.m2/repository")))
artifact in (Compile, assembly) ~= { art =>
art.copy(`classifier` = Some("assembly"))
}
addArtifact(artifact in (Compile, assembly), assembly)
publishMavenStyle := true
publishArtifact in Test := false
pomIncludeRepository := { x => false }
credentials += Credentials(Path.userHome / ".ivy2" / ".credentials")
homepage := Some(new URL("https://github.com/wordnik/swagger-codegen"))
parallelExecution in Test := false
startYear := Some(2009)
licenses := Seq(("Apache License 2.0", new URL("http://www.apache.org/licenses/LICENSE-2.0.html")))
pomExtra <<= (pomExtra, name, description) {(pom, name, desc) => pom ++ Group(
<scm>
<connection>scm:git:git@github.com:wordnik/swagger-codegen.git</connection>
<developerConnection>scm:git:git@github.com:wordnik/swagger-codegen.git</developerConnection>
<url>https://github.com/wordnik/swagger-codegen</url>
</scm>
<issueManagement>
<system>github</system>
<url>https://github.com/wordnik/swagger-codegen/issues</url>
</issueManagement>
<developers>
<developer>
<id>rpidikiti</id>
<name>Ramesh Pidikiti</name>
<email>ramesh@wordnik.com</email>
</developer>
<developer>
<id>ayush</id>
<name>Ayush Gupta</name>
<email>ayush@glugbot.com</email>
</developer>
<developer>
<id>fehguy</id>
<name>Tony Tam</name>
<email>fehguy@gmail.com</email>
</developer>
<developer>
<id>casualjim</id>
<name>Ivan Porto Carrero</name>
<url>http://flanders.co.nz/</url>
</developer>
<developer>
<id>radius314</id>
<name>Danny Gershman</name>
<email>danny.gershman@gmail.com</email>
</developer>
</developers>
)}
assemblySettings
jarName in assembly := "swagger-codegen.jar"

124
distro/pom.xml.disabled Normal file
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.0

2
project/plugins.sbt Normal file
View File

@@ -0,0 +1,2 @@
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.9.1")

View File

@@ -0,0 +1,49 @@
/**
* Copyright 2013 Wordnik, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import com.wordnik.swagger.codegen.BasicAndroidJavaGenerator
object AndroidJavaPetstoreCodegen extends BasicAndroidJavaGenerator {
def main(args: Array[String]) = generateClient(args)
// location of templates
override def templateDir = "src/main/resources/android-java"
// where to write generated code
override def destinationDir = "samples/client/petstore/android-java/src/main/java"
// package for api invoker, error files
override def invokerPackage = Some("com.wordnik.client")
// package for models
override def modelPackage = Some("com.wordnik.petstore.model")
// package for api classes
override def apiPackage = Some("com.wordnik.petstore.api")
additionalParams ++= Map(
"artifactId" -> "swagger-petstore",
"artifactVersion" -> "1.0.0",
"groupId" -> "com.wordnik")
// supporting classes
override def supportingFiles = List(
("apiInvoker.mustache", destinationDir + java.io.File.separator + invokerPackage.get.replace(".", java.io.File.separator) + java.io.File.separator, "ApiInvoker.java"),
("jsonUtil.mustache", destinationDir + java.io.File.separator + invokerPackage.get.replace(".", java.io.File.separator) + java.io.File.separator, "JsonUtil.java"),
("apiException.mustache", destinationDir + java.io.File.separator + invokerPackage.get.replace(".", java.io.File.separator) + java.io.File.separator, "ApiException.java"),
("pom.mustache", "samples/client/petstore/android-java", "pom.xml")
)
}

View File

@@ -1,51 +1,20 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>5</version>
</parent>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.wordnik</groupId>
<artifactId>swagger-codegen_2.9.1</artifactId>
<artifactId>swagger-petstore</artifactId>
<packaging>jar</packaging>
<name>swagger-codegen</name>
<version>2.0.1</version>
<name>swagger-petstore</name>
<version>1.0.0</version>
<scm>
<connection>scm:git:git@github.com:wordnik/swagger-codegen.git</connection>
<connection>scm:git:git@github.com:wordnik/swagger-mustache.git</connection>
<developerConnection>scm:git:git@github.com:wordnik/swagger-codegen.git</developerConnection>
<url>https://github.com/wordnik/swagger-codegen</url>
</scm>
<prerequisites>
<maven>2.2.0</maven>
</prerequisites>
<developers>
<developer>
<id>rpidikiti</id>
<name>Ramesh Pidikiti</name>
<email>ramesh@wordnik.com</email>
</developer>
<developer>
<id>ayush</id>
<name>Ayush Gupts</name>
<email>ayush@glugbot.com</email>
</developer>
<developer>
<id>fehguy</id>
<name>Tony Tam</name>
<email>fehguy@gmail.com</email>
</developer>
</developers>
<issueManagement>
<system>github</system>
<url>https://github.com/wordnik/swagger-codegen/issues</url>
</issueManagement>
<licenses>
<license>
<name>Apache License 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
<distribution>repo</distribution>
</license>
</licenses>
<build>
<plugins>
<plugin>
@@ -78,6 +47,8 @@
</execution>
</executions>
</plugin>
<!-- attach test jar -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
@@ -93,6 +64,7 @@
<configuration>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
@@ -135,72 +107,41 @@
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>3.1.0</version>
<version>${scala-maven-plugin-version}</version>
<executions>
<execution>
<id>scala-compile-first</id>
<phase>process-resources</phase>
<goals>
<goal>add-source</goal>
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>scala-test-compile</id>
<phase>process-test-resources</phase>
<goals>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
<configuration>
<configuration>
<recompileMode>incremental</recompileMode>
</configuration>
<jvmArgs>
<jvmArg>-Xms128m</jvmArg>
<jvmArg>-Xmx1500m</jvmArg>
<jvmArg>-Xmx384m</jvmArg>
</jvmArgs>
<recompileMode>incremental</recompileMode>
<args>
<arg>-target:jvm-1.5</arg>
<arg>-deprecation</arg>
</args>
<launchers>
<launcher>
<id>run-scalatest</id>
<mainClass>org.scalatest.tools.Runner</mainClass>
<args>
<arg>-p</arg>
<arg>${project.build.testOutputDirectory}</arg>
</args>
<jvmArgs>
<jvmArg>-Xmx512m</jvmArg>
</jvmArgs>
</launcher>
</launchers>
</configuration>
</plugin>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>doc-jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.0</version>
<configuration>
<reportPlugins>
<plugin>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.2</version>
</plugin>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<jvmArgs>
<jvmArg>-Xms64m</jvmArg>
<jvmArg>-Xmx1024m</jvmArg>
</jvmArgs>
</configuration>
</plugin>
</reportPlugins>
</configuration>
</plugin>
</plugins>
</build>
<reporting>
@@ -208,33 +149,42 @@
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<configuration>
<scalaVersion>${scala-version}</scalaVersion>
</configuration>
<version>${scala-maven-plugin-version}</version>
</plugin>
</plugins>
</reporting>
<dependencies>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.3</version>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${jackson-version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.fusesource.scalate</groupId>
<artifactId>scalate-wikitext</artifactId>
<version>1.5.3</version>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson-version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.fusesource.scalate</groupId>
<artifactId>scalate-page</artifactId>
<version>1.5.3</version>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson-version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>${httpclient-version}</version>
<scope>compile</scope>
</dependency>
<!-- test dependencies -->
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>${scala-version}</version>
<scope>compile</scope>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.scalatest</groupId>
@@ -248,25 +198,17 @@
<version>${junit-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.json4s</groupId>
<artifactId>json4s-jackson_2.9.1</artifactId>
<version>${json4s-version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.json4s</groupId>
<artifactId>json4s-native_2.9.1</artifactId>
<version>${json4s-version}</version>
<scope>compile</scope>
</dependency>
</dependencies>
<properties>
<swagger-core-version>1.1.1-SNAPSHOT</swagger-core-version>
<jackson-version>2.1.4</jackson-version>
<scala-version>2.9.1-1</scala-version>
<junit-version>4.8.1</junit-version>
<maven-plugin.version>1.0.0</maven-plugin.version>
<maven-plugin-version>1.0.0</maven-plugin-version>
<junit-version>4.8.1</junit-version>
<scala-test-version>1.6.1</scala-test-version>
<json4s-version>3.0.0</json4s-version>
<httpclient-version>4.2.3</httpclient-version>
<scala-maven-plugin-version>3.1.5</scala-maven-plugin-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,174 @@
package com.wordnik.client;
import com.fasterxml.jackson.core.JsonGenerator.Feature;
import com.fasterxml.jackson.databind.*;
import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import org.apache.http.*;
import org.apache.http.client.*;
import org.apache.http.client.methods.*;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.*;
import org.apache.http.util.EntityUtils;
import java.io.File;
import java.net.URLEncoder;
import java.util.Map;
import java.util.HashMap;
import java.util.List;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
public class ApiInvoker {
private static ApiInvoker INSTANCE = new ApiInvoker();
private Map<String, String> defaultHeaderMap = new HashMap<String, String>();
private HttpClient client = null;
public static ApiInvoker getInstance() {
return INSTANCE;
}
public void addDefaultHeader(String key, String value) {
defaultHeaderMap.put(key, value);
}
public String escapeString(String str) {
return str;
}
public static Object deserialize(String json, String containerType, Class cls) throws ApiException {
try{
if("List".equals(containerType)) {
JavaType typeInfo = JsonUtil.getJsonMapper().getTypeFactory().constructCollectionType(List.class, cls);
List response = (List<?>) JsonUtil.getJsonMapper().readValue(json, typeInfo);
return response;
}
else if(String.class.equals(cls)) {
if(json != null && json.startsWith("\"") && json.endsWith("\"") && json.length() > 1)
return json.substring(1, json.length() - 2);
else
return json;
}
else {
return JsonUtil.getJsonMapper().readValue(json, cls);
}
}
catch (IOException e) {
throw new ApiException(500, e.getMessage());
}
}
public static String serialize(Object obj) throws ApiException {
try {
if (obj != null)
return JsonUtil.getJsonMapper().writeValueAsString(obj);
else
return null;
}
catch (Exception e) {
throw new ApiException(500, e.getMessage());
}
}
public String invokeAPI(String host, String path, String method, Map<String, String> queryParams, Object body, Map<String, String> headerParams, String contentType) throws ApiException {
HttpClient client = getClient(host);
StringBuilder b = new StringBuilder();
for(String key : queryParams.keySet()) {
String value = queryParams.get(key);
if (value != null){
if(b.toString().length() == 0)
b.append("?");
else
b.append("&");
b.append(escapeString(key)).append("=").append(escapeString(value));
}
}
String url = host + path + b.toString();
HashMap<String, String> headers = new HashMap<String, String>();
for(String key : headerParams.keySet()) {
headers.put(key, headerParams.get(key));
}
for(String key : defaultHeaderMap.keySet()) {
if(!headerParams.containsKey(key)) {
headers.put(key, defaultHeaderMap.get(key));
}
}
headers.put("Accept", "application/json");
HttpResponse response = null;
try{
if("GET".equals(method)) {
HttpGet get = new HttpGet(url);
get.addHeader("Accept", "application/json");
for(String key : headers.keySet()) {
get.setHeader(key, headers.get(key));
}
response = client.execute(get);
}
else if ("POST".equals(method)) {
HttpPost post = new HttpPost(url);
post.setHeader("Content-Type", contentType);
post.setEntity(new StringEntity(serialize(body), "UTF-8"));
for(String key : headers.keySet()) {
post.setHeader(key, headers.get(key));
}
response = client.execute(post);
}
else if ("PUT".equals(method)) {
HttpPut put = new HttpPut(url);
if(body != null) {
put.setHeader("Content-Type", contentType);
put.setEntity(new StringEntity(serialize(body), "UTF-8"));
}
for(String key : headers.keySet()) {
put.setHeader(key, headers.get(key));
}
response = client.execute(put);
}
else if ("DELETE".equals(method)) {
HttpDelete delete = new HttpDelete(url);
for(String key : headers.keySet()) {
delete.setHeader(key, headers.get(key));
}
response = client.execute(delete);
}
int code = response.getStatusLine().getStatusCode();
String responseString = null;
if(code == 204)
responseString = "";
else if(code >= 200 && code < 300) {
if(response.getEntity() != null) {
HttpEntity resEntity = response.getEntity();
responseString = EntityUtils.toString(resEntity);
}
}
else {
if(response.getEntity() != null) {
HttpEntity resEntity = response.getEntity();
responseString = EntityUtils.toString(resEntity);
}
else
responseString = "no data";
throw new ApiException(code, responseString);
}
return responseString;
}
catch(IOException e) {
throw new ApiException(500, e.getMessage());
}
}
private HttpClient getClient(String host) {
if(client == null)
client = new DefaultHttpClient();
return client;
}
}

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,309 @@
package com.wordnik.petstore.api;
import com.wordnik.client.ApiException;
import com.wordnik.client.ApiInvoker;
import java.io.File;
import com.wordnik.petstore.model.Pet;
import java.util.*;
public class PetApi {
String basePath = "http://petstore.swagger.wordnik.com/api";
ApiInvoker apiInvoker = ApiInvoker.getInstance();
public void addHeader(String key, String value) {
getInvoker().addDefaultHeader(key, value);
}
public ApiInvoker getInvoker() {
return apiInvoker;
}
public void setBasePath(String basePath) {
this.basePath = basePath;
}
public String getBasePath() {
return basePath;
}
public Pet getPetById (Long petId) throws ApiException {
// verify required params are set
if(petId == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables
String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
String contentType = "application/json";
try {
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams, contentType);
if(response != null){
return (Pet) ApiInvoker.deserialize(response, "", Pet.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public void deletePet (String petId) throws ApiException {
// verify required params are set
if(petId == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables
String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
String contentType = "application/json";
try {
String response = apiInvoker.invokeAPI(basePath, path, "DELETE", queryParams, null, headerParams, contentType);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return ;
}
else {
throw ex;
}
}
}
public List<Pet> partialUpdate (String petId, Pet body) throws ApiException {
// verify required params are set
if(petId == null || body == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables
String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
String contentType = "application/json";
try {
String response = apiInvoker.invokeAPI(basePath, path, "PATCH", queryParams, body, headerParams, contentType);
if(response != null){
return (List<Pet>) ApiInvoker.deserialize(response, "Array", Pet.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public void updatePetWithForm (String petId, String name, String status) throws ApiException {
// verify required params are set
if(petId == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables
String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
String contentType = "application/json";
try {
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, null, headerParams, contentType);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return ;
}
else {
throw ex;
}
}
}
public void uploadFile (String additionalMetadata, File body) throws ApiException {
// create path and map variables
String path = "/pet/uploadImage".replaceAll("\\{format\\}","json");
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
String contentType = "application/json";
try {
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, body, headerParams, contentType);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return ;
}
else {
throw ex;
}
}
}
public void addPet (Pet body) throws ApiException {
// verify required params are set
if(body == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables
String path = "/pet".replaceAll("\\{format\\}","json");
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
String contentType = "application/json";
try {
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, body, headerParams, contentType);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return ;
}
else {
throw ex;
}
}
}
public void updatePet (Pet body) throws ApiException {
// verify required params are set
if(body == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables
String path = "/pet".replaceAll("\\{format\\}","json");
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
String contentType = "application/json";
try {
String response = apiInvoker.invokeAPI(basePath, path, "PUT", queryParams, body, headerParams, contentType);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return ;
}
else {
throw ex;
}
}
}
public List<Pet> findPetsByStatus (String status) throws ApiException {
// verify required params are set
if(status == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables
String path = "/pet/findByStatus".replaceAll("\\{format\\}","json");
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
if(!"null".equals(String.valueOf(status)))
queryParams.put("status", String.valueOf(status));
String contentType = "application/json";
try {
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams, contentType);
if(response != null){
return (List<Pet>) ApiInvoker.deserialize(response, "Array", Pet.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public List<Pet> findPetsByTags (String tags) throws ApiException {
// verify required params are set
if(tags == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables
String path = "/pet/findByTags".replaceAll("\\{format\\}","json");
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
if(!"null".equals(String.valueOf(tags)))
queryParams.put("tags", String.valueOf(tags));
String contentType = "application/json";
try {
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams, contentType);
if(response != null){
return (List<Pet>) ApiInvoker.deserialize(response, "Array", Pet.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
}

View File

@@ -0,0 +1,122 @@
package com.wordnik.petstore.api;
import com.wordnik.client.ApiException;
import com.wordnik.client.ApiInvoker;
import com.wordnik.petstore.model.Order;
import java.util.*;
public class StoreApi {
String basePath = "http://petstore.swagger.wordnik.com/api";
ApiInvoker apiInvoker = ApiInvoker.getInstance();
public void addHeader(String key, String value) {
getInvoker().addDefaultHeader(key, value);
}
public ApiInvoker getInvoker() {
return apiInvoker;
}
public void setBasePath(String basePath) {
this.basePath = basePath;
}
public String getBasePath() {
return basePath;
}
public Order getOrderById (String orderId) throws ApiException {
// verify required params are set
if(orderId == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables
String path = "/store/order/{orderId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "orderId" + "\\}", apiInvoker.escapeString(orderId.toString()));
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
String contentType = "application/json";
try {
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams, contentType);
if(response != null){
return (Order) ApiInvoker.deserialize(response, "", Order.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public void deleteOrder (String orderId) throws ApiException {
// verify required params are set
if(orderId == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables
String path = "/store/order/{orderId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "orderId" + "\\}", apiInvoker.escapeString(orderId.toString()));
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
String contentType = "application/json";
try {
String response = apiInvoker.invokeAPI(basePath, path, "DELETE", queryParams, null, headerParams, contentType);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return ;
}
else {
throw ex;
}
}
}
public void placeOrder (Order body) throws ApiException {
// verify required params are set
if(body == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables
String path = "/store/order".replaceAll("\\{format\\}","json");
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
String contentType = "application/json";
try {
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, body, headerParams, contentType);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return ;
}
else {
throw ex;
}
}
}
}

View File

@@ -0,0 +1,277 @@
package com.wordnik.petstore.api;
import com.wordnik.client.ApiException;
import com.wordnik.client.ApiInvoker;
import com.wordnik.petstore.model.User;
import java.util.*;
public class UserApi {
String basePath = "http://petstore.swagger.wordnik.com/api";
ApiInvoker apiInvoker = ApiInvoker.getInstance();
public void addHeader(String key, String value) {
getInvoker().addDefaultHeader(key, value);
}
public ApiInvoker getInvoker() {
return apiInvoker;
}
public void setBasePath(String basePath) {
this.basePath = basePath;
}
public String getBasePath() {
return basePath;
}
public void createUser (User body) throws ApiException {
// verify required params are set
if(body == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables
String path = "/user".replaceAll("\\{format\\}","json");
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
String contentType = "application/json";
try {
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, body, headerParams, contentType);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return ;
}
else {
throw ex;
}
}
}
public void createUsersWithArrayInput (List<User> body) throws ApiException {
// verify required params are set
if(body == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables
String path = "/user/createWithArray".replaceAll("\\{format\\}","json");
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
String contentType = "application/json";
try {
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, body, headerParams, contentType);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return ;
}
else {
throw ex;
}
}
}
public void createUsersWithListInput (List<User> body) throws ApiException {
// verify required params are set
if(body == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables
String path = "/user/createWithList".replaceAll("\\{format\\}","json");
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
String contentType = "application/json";
try {
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, body, headerParams, contentType);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return ;
}
else {
throw ex;
}
}
}
public void updateUser (String username, User body) throws ApiException {
// verify required params are set
if(username == null || body == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables
String path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString()));
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
String contentType = "application/json";
try {
String response = apiInvoker.invokeAPI(basePath, path, "PUT", queryParams, body, headerParams, contentType);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return ;
}
else {
throw ex;
}
}
}
public void deleteUser (String username) throws ApiException {
// verify required params are set
if(username == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables
String path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString()));
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
String contentType = "application/json";
try {
String response = apiInvoker.invokeAPI(basePath, path, "DELETE", queryParams, null, headerParams, contentType);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return ;
}
else {
throw ex;
}
}
}
public User getUserByName (String username) throws ApiException {
// verify required params are set
if(username == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables
String path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString()));
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
String contentType = "application/json";
try {
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams, contentType);
if(response != null){
return (User) ApiInvoker.deserialize(response, "", User.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public String loginUser (String username, String password) throws ApiException {
// verify required params are set
if(username == null || password == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables
String path = "/user/login".replaceAll("\\{format\\}","json");
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
if(!"null".equals(String.valueOf(username)))
queryParams.put("username", String.valueOf(username));
if(!"null".equals(String.valueOf(password)))
queryParams.put("password", String.valueOf(password));
String contentType = "application/json";
try {
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams, contentType);
if(response != null){
return (String) ApiInvoker.deserialize(response, "", String.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public void logoutUser () throws ApiException {
// create path and map variables
String path = "/user/logout".replaceAll("\\{format\\}","json");
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
String contentType = "application/json";
try {
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams, contentType);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return ;
}
else {
throw ex;
}
}
}
}

View File

@@ -0,0 +1,36 @@
package com.wordnik.petstore.model;
import com.fasterxml.jackson.annotation.JsonProperty;
public class Category {
/* Category unique identifier */
@JsonProperty("id")
private Long id = null;
/* Name of the category */
@JsonProperty("name")
private String name = null;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Category {\n");
sb.append(" id: ").append(id).append("\n");
sb.append(" name: ").append(name).append("\n");
sb.append("}\n");
return sb.toString();
}
}

View File

@@ -0,0 +1,70 @@
package com.wordnik.petstore.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Date;
public class Order {
/* Unique identifier for the order */
@JsonProperty("id")
private Long id = null;
/* ID of pet being ordered */
@JsonProperty("petId")
private Long petId = null;
/* Number of pets ordered */
@JsonProperty("quantity")
private Integer quantity = null;
/* Status of the order */
@JsonProperty("status")
private String status = null;
/* Date shipped, only if it has been */
@JsonProperty("shipDate")
private Date shipDate = null;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getPetId() {
return petId;
}
public void setPetId(Long petId) {
this.petId = petId;
}
public Integer getQuantity() {
return quantity;
}
public void setQuantity(Integer quantity) {
this.quantity = quantity;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public Date getShipDate() {
return shipDate;
}
public void setShipDate(Date shipDate) {
this.shipDate = shipDate;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Order {\n");
sb.append(" id: ").append(id).append("\n");
sb.append(" petId: ").append(petId).append("\n");
sb.append(" quantity: ").append(quantity).append("\n");
sb.append(" status: ").append(status).append("\n");
sb.append(" shipDate: ").append(shipDate).append("\n");
sb.append("}\n");
return sb.toString();
}
}

View File

@@ -0,0 +1,83 @@
package com.wordnik.petstore.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.*;
import com.wordnik.petstore.model.Category;
import com.wordnik.petstore.model.Tag;
public class Pet {
/* Unique identifier for the Pet */
@JsonProperty("id")
private Long id = null;
/* Category the pet is in */
@JsonProperty("category")
private Category category = null;
/* Friendly name of the pet */
@JsonProperty("name")
private String name = null;
/* Image URLs */
@JsonProperty("photoUrls")
private List<String> photoUrls = new ArrayList<String>();
/* Tags assigned to this pet */
@JsonProperty("tags")
private List<Tag> tags = new ArrayList<Tag>();
/* pet status in the store */
@JsonProperty("status")
private String status = null;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Category getCategory() {
return category;
}
public void setCategory(Category category) {
this.category = category;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public List<String> getPhotoUrls() {
return photoUrls;
}
public void setPhotoUrls(List<String> photoUrls) {
this.photoUrls = photoUrls;
}
public List<Tag> getTags() {
return tags;
}
public void setTags(List<Tag> tags) {
this.tags = tags;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Pet {\n");
sb.append(" id: ").append(id).append("\n");
sb.append(" category: ").append(category).append("\n");
sb.append(" name: ").append(name).append("\n");
sb.append(" photoUrls: ").append(photoUrls).append("\n");
sb.append(" tags: ").append(tags).append("\n");
sb.append(" status: ").append(status).append("\n");
sb.append("}\n");
return sb.toString();
}
}

View File

@@ -0,0 +1,36 @@
package com.wordnik.petstore.model;
import com.fasterxml.jackson.annotation.JsonProperty;
public class Tag {
/* Unique identifier for the tag */
@JsonProperty("id")
private Long id = null;
/* Friendly name for the tag */
@JsonProperty("name")
private String name = null;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Tag {\n");
sb.append(" id: ").append(id).append("\n");
sb.append(" name: ").append(name).append("\n");
sb.append("}\n");
return sb.toString();
}
}

View File

@@ -0,0 +1,102 @@
package com.wordnik.petstore.model;
import com.fasterxml.jackson.annotation.JsonProperty;
public class User {
/* Unique identifier for the user */
@JsonProperty("id")
private Long id = null;
/* Unique username */
@JsonProperty("username")
private String username = null;
/* First name of the user */
@JsonProperty("firstName")
private String firstName = null;
/* Last name of the user */
@JsonProperty("lastName")
private String lastName = null;
/* Email address of the user */
@JsonProperty("email")
private String email = null;
/* Password name of the user */
@JsonProperty("password")
private String password = null;
/* Phone number of the user */
@JsonProperty("phone")
private String phone = null;
/* User Status */
@JsonProperty("userStatus")
private Integer userStatus = null;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public Integer getUserStatus() {
return userStatus;
}
public void setUserStatus(Integer userStatus) {
this.userStatus = userStatus;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class User {\n");
sb.append(" id: ").append(id).append("\n");
sb.append(" username: ").append(username).append("\n");
sb.append(" firstName: ").append(firstName).append("\n");
sb.append(" lastName: ").append(lastName).append("\n");
sb.append(" email: ").append(email).append("\n");
sb.append(" password: ").append(password).append("\n");
sb.append(" phone: ").append(phone).append("\n");
sb.append(" userStatus: ").append(userStatus).append("\n");
sb.append("}\n");
return sb.toString();
}
}

View File

@@ -0,0 +1,45 @@
/**
* Copyright 2012 Wordnik, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import com.wordnik.swagger.codegen.BasicCSharpGenerator
object CSharpPetstoreCodegen extends BasicCSharpGenerator {
def main(args: Array[String]) = generateClient(args)
// location of templates
override def templateDir = "csharp"
// where to write generated code
override def destinationDir = "samples/client/petstore/csharp/src"
// package for api invoker, error files
override def invokerPackage = Some("Com.Wordnik.Petstore")
// package for models
override def modelPackage = Some("Com.Wordnik.Petstore.Model")
// package for api classes
override def apiPackage = Some("Com.Wordnik.Petstore.Api")
// supporting classes
override def supportingFiles =
List(
("apiInvoker.mustache", destinationDir + java.io.File.separator + invokerPackage.get.replace(".", java.io.File.separator) + java.io.File.separator, "ApiInvoker.cs"),
("apiException.mustache", destinationDir + java.io.File.separator + invokerPackage.get.replace(".", java.io.File.separator) + java.io.File.separator, "ApiException.cs"),
("Newtonsoft.Json.dll", "samples/client/petstore/csharp/bin", "Newtonsoft.Json.dll"),
("compile.mustache", "samples/client/petstore/csharp", "compile.bat"))
}

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>
/// uploads an image
/// </summary>
/// <param name="additionalMetadata">Additional data to pass to server</param>
/// <param name="body">file to upload</param>
/// <returns></returns>
public void uploadFile (string additionalMetadata, File body) {
// create path and map variables
var path = "/pet/uploadImage".Replace("{format}","json");
// query params
var queryParams = new Dictionary<String, String>();
var headerParams = new Dictionary<String, String>();
string paramStr = null;
try {
var response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, body, headerParams);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.ErrorCode == 404) {
return ;
}
else {
throw ex;
}
}
}
/// <summary>
/// Find pet by ID Returns a pet based on ID
/// </summary>
/// <param name="petId">ID of pet that needs to be fetched</param>
/// <returns></returns>
public Pet getPetById (long petId) {
// create path and map variables
var path = "/pet/{petId}".Replace("{format}","json").Replace("{" + "petId" + "}", apiInvoker.escapeString(petId.ToString()));
// query params
var queryParams = new Dictionary<String, String>();
var headerParams = new Dictionary<String, String>();
// verify required params are set
if (petId == null ) {
throw new ApiException(400, "missing required params");
}
string paramStr = null;
try {
var response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams);
if(response != null){
return (Pet) ApiInvoker.deserialize(response, typeof(Pet));
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.ErrorCode == 404) {
return null;
}
else {
throw ex;
}
}
}
/// <summary>
/// Deletes a pet
/// </summary>
/// <param name="petId">Pet id to delete</param>
/// <returns></returns>
public void deletePet (string petId) {
// create path and map variables
var path = "/pet/{petId}".Replace("{format}","json").Replace("{" + "petId" + "}", apiInvoker.escapeString(petId.ToString()));
// query params
var queryParams = new Dictionary<String, String>();
var headerParams = new Dictionary<String, String>();
// verify required params are set
if (petId == null ) {
throw new ApiException(400, "missing required params");
}
string paramStr = null;
try {
var response = apiInvoker.invokeAPI(basePath, path, "DELETE", queryParams, null, headerParams);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.ErrorCode == 404) {
return ;
}
else {
throw ex;
}
}
}
/// <summary>
/// partial updates to a pet
/// </summary>
/// <param name="petId">ID of pet that needs to be fetched</param>
/// <param name="body">Pet object that needs to be added to the store</param>
/// <returns></returns>
public List<Pet> partialUpdate (string petId, Pet body) {
// create path and map variables
var path = "/pet/{petId}".Replace("{format}","json").Replace("{" + "petId" + "}", apiInvoker.escapeString(petId.ToString()));
// query params
var queryParams = new Dictionary<String, String>();
var headerParams = new Dictionary<String, String>();
// verify required params are set
if (petId == null || body == null ) {
throw new ApiException(400, "missing required params");
}
string paramStr = null;
try {
var response = apiInvoker.invokeAPI(basePath, path, "PATCH", queryParams, body, headerParams);
if(response != null){
return (List<Pet>) ApiInvoker.deserialize(response, typeof(List<Pet>));
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.ErrorCode == 404) {
return null;
}
else {
throw ex;
}
}
}
/// <summary>
/// Updates a pet in the store with form data
/// </summary>
/// <param name="petId">ID of pet that needs to be updated</param>
/// <param name="name">Updated name of the pet</param>
/// <param name="status">Updated status of the pet</param>
/// <returns></returns>
public void updatePetWithForm (string petId, string name, string status) {
// create path and map variables
var path = "/pet/{petId}".Replace("{format}","json").Replace("{" + "petId" + "}", apiInvoker.escapeString(petId.ToString()));
// query params
var queryParams = new Dictionary<String, String>();
var headerParams = new Dictionary<String, String>();
// verify required params are set
if (petId == null ) {
throw new ApiException(400, "missing required params");
}
string paramStr = null;
try {
var response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, null, headerParams);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.ErrorCode == 404) {
return ;
}
else {
throw ex;
}
}
}
/// <summary>
/// Add a new pet to the store
/// </summary>
/// <param name="body">Pet object that needs to be added to the store</param>
/// <returns></returns>
public void addPet (Pet body) {
// create path and map variables
var path = "/pet".Replace("{format}","json");
// query params
var queryParams = new Dictionary<String, String>();
var headerParams = new Dictionary<String, String>();
// verify required params are set
if (body == null ) {
throw new ApiException(400, "missing required params");
}
string paramStr = null;
try {
var response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, body, headerParams);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.ErrorCode == 404) {
return ;
}
else {
throw ex;
}
}
}
/// <summary>
/// Update an existing pet
/// </summary>
/// <param name="body">Pet object that needs to be updated in the store</param>
/// <returns></returns>
public void updatePet (Pet body) {
// create path and map variables
var path = "/pet".Replace("{format}","json");
// query params
var queryParams = new Dictionary<String, String>();
var headerParams = new Dictionary<String, String>();
// verify required params are set
if (body == null ) {
throw new ApiException(400, "missing required params");
}
string paramStr = null;
try {
var response = apiInvoker.invokeAPI(basePath, path, "PUT", queryParams, body, headerParams);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.ErrorCode == 404) {
return ;
}
else {
throw ex;
}
}
}
/// <summary>
/// Finds Pets by status Multiple status values can be provided with comma seperated strings
/// </summary>
/// <param name="status">Status values that need to be considered for filter</param>
/// <returns></returns>
public List<Pet> findPetsByStatus (string status) {
// create path and map variables
var path = "/pet/findByStatus".Replace("{format}","json");
// query params
var queryParams = new Dictionary<String, String>();
var headerParams = new Dictionary<String, String>();
// verify required params are set
if (status == null ) {
throw new ApiException(400, "missing required params");
}
string paramStr = null;
if (status != null){
paramStr = (status != null && status is DateTime) ? ((DateTime)(object)status).ToString("u") : Convert.ToString(status);
queryParams.Add("status", paramStr);
}
try {
var response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams);
if(response != null){
return (List<Pet>) ApiInvoker.deserialize(response, typeof(List<Pet>));
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.ErrorCode == 404) {
return null;
}
else {
throw ex;
}
}
}
/// <summary>
/// Finds Pets by tags Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
/// </summary>
/// <param name="tags">Tags to filter by</param>
/// <returns></returns>
public List<Pet> findPetsByTags (string tags) {
// create path and map variables
var path = "/pet/findByTags".Replace("{format}","json");
// query params
var queryParams = new Dictionary<String, String>();
var headerParams = new Dictionary<String, String>();
// verify required params are set
if (tags == null ) {
throw new ApiException(400, "missing required params");
}
string paramStr = null;
if (tags != null){
paramStr = (tags != null && tags is DateTime) ? ((DateTime)(object)tags).ToString("u") : Convert.ToString(tags);
queryParams.Add("tags", paramStr);
}
try {
var response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams);
if(response != null){
return (List<Pet>) ApiInvoker.deserialize(response, typeof(List<Pet>));
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.ErrorCode == 404) {
return null;
}
else {
throw ex;
}
}
}
}
}

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>
/// 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>
/// 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>
/// 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>
/// Delete user This can only be done by the logged in user.
/// </summary>
/// <param name="username">The name that needs to be deleted</param>
/// <returns></returns>
public void deleteUser (string username) {
// create path and map variables
var path = "/user/{username}".Replace("{format}","json").Replace("{" + "username" + "}", apiInvoker.escapeString(username.ToString()));
// query params
var queryParams = new Dictionary<String, String>();
var headerParams = new Dictionary<String, String>();
// verify required params are set
if (username == null ) {
throw new ApiException(400, "missing required params");
}
string paramStr = null;
try {
var response = apiInvoker.invokeAPI(basePath, path, "DELETE", queryParams, null, headerParams);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.ErrorCode == 404) {
return ;
}
else {
throw ex;
}
}
}
/// <summary>
/// Get user by user name
/// </summary>
/// <param name="username">The name that needs to be fetched. Use user1 for testing.</param>
/// <returns></returns>
public User getUserByName (string username) {
// create path and map variables
var path = "/user/{username}".Replace("{format}","json").Replace("{" + "username" + "}", apiInvoker.escapeString(username.ToString()));
// query params
var queryParams = new Dictionary<String, String>();
var headerParams = new Dictionary<String, String>();
// verify required params are set
if (username == null ) {
throw new ApiException(400, "missing required params");
}
string paramStr = null;
try {
var response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams);
if(response != null){
return (User) ApiInvoker.deserialize(response, typeof(User));
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.ErrorCode == 404) {
return null;
}
else {
throw ex;
}
}
}
/// <summary>
/// Updated user This can only be done by the logged in user.
/// </summary>
/// <param name="username">name that need to be deleted</param>
/// <param name="body">Updated user object</param>
/// <returns></returns>
public void updateUser (string username, User body) {
// create path and map variables
var path = "/user/{username}".Replace("{format}","json").Replace("{" + "username" + "}", apiInvoker.escapeString(username.ToString()));
// query params
var queryParams = new Dictionary<String, String>();
var headerParams = new Dictionary<String, String>();
// verify required params are set
if (username == null || body == null ) {
throw new ApiException(400, "missing required params");
}
string paramStr = null;
try {
var response = apiInvoker.invokeAPI(basePath, path, "PUT", queryParams, body, headerParams);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.ErrorCode == 404) {
return ;
}
else {
throw ex;
}
}
}
/// <summary>
/// Logs user into the system
/// </summary>
/// <param name="username">The user name for login</param>
/// <param name="password">The password for login in clear text</param>
/// <returns></returns>
public string loginUser (string username, string password) {
// create path and map variables
var path = "/user/login".Replace("{format}","json");
// query params
var queryParams = new Dictionary<String, String>();
var headerParams = new Dictionary<String, String>();
// verify required params are set
if (username == null || password == null ) {
throw new ApiException(400, "missing required params");
}
string paramStr = null;
if (username != null){
paramStr = (username != null && username is DateTime) ? ((DateTime)(object)username).ToString("u") : Convert.ToString(username);
queryParams.Add("username", paramStr);
}
if (password != null){
paramStr = (password != null && password is DateTime) ? ((DateTime)(object)password).ToString("u") : Convert.ToString(password);
queryParams.Add("password", paramStr);
}
try {
var response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams);
if(response != null){
return (string) ApiInvoker.deserialize(response, typeof(string));
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.ErrorCode == 404) {
return null;
}
else {
throw ex;
}
}
}
/// <summary>
/// Logs out current logged in user session
/// </summary>
/// <returns></returns>
public void logoutUser () {
// create path and map variables
var path = "/user/logout".Replace("{format}","json");
// query params
var queryParams = new Dictionary<String, String>();
var headerParams = new Dictionary<String, String>();
string paramStr = null;
try {
var response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.ErrorCode == 404) {
return ;
}
else {
throw ex;
}
}
}
/// <summary>
/// Create user This can only be done by the logged in user.
/// </summary>
/// <param name="body">Created user object</param>
/// <returns></returns>
public void createUser (User body) {
// create path and map variables
var path = "/user".Replace("{format}","json");
// query params
var queryParams = new Dictionary<String, String>();
var headerParams = new Dictionary<String, String>();
// verify required params are set
if (body == null ) {
throw new ApiException(400, "missing required params");
}
string paramStr = null;
try {
var response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, body, headerParams);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.ErrorCode == 404) {
return ;
}
else {
throw ex;
}
}
}
/// <summary>
/// Creates list of users with given input array
/// </summary>
/// <param name="body">List of user object</param>
/// <returns></returns>
public void createUsersWithArrayInput (List<User> body) {
// create path and map variables
var path = "/user/createWithArray".Replace("{format}","json");
// query params
var queryParams = new Dictionary<String, String>();
var headerParams = new Dictionary<String, String>();
// verify required params are set
if (body == null ) {
throw new ApiException(400, "missing required params");
}
string paramStr = null;
try {
var response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, body, headerParams);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.ErrorCode == 404) {
return ;
}
else {
throw ex;
}
}
}
/// <summary>
/// Creates list of users with given list input
/// </summary>
/// <param name="body">List of user object</param>
/// <returns></returns>
public void createUsersWithListInput (List<User> body) {
// create path and map variables
var path = "/user/createWithList".Replace("{format}","json");
// query params
var queryParams = new Dictionary<String, String>();
var headerParams = new Dictionary<String, String>();
// verify required params are set
if (body == null ) {
throw new ApiException(400, "missing required params");
}
string paramStr = null;
try {
var response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, body, headerParams);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.ErrorCode == 404) {
return ;
}
else {
throw ex;
}
}
}
}
}

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,99 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using Newtonsoft.Json;
namespace Com.Wordnik.Petstore {
public class ApiInvoker {
private static readonly ApiInvoker _instance = new ApiInvoker();
private Dictionary<String, String> defaultHeaderMap = new Dictionary<String, String>();
public static ApiInvoker GetInstance() {
return _instance;
}
public void addDefaultHeader(string key, string value) {
defaultHeaderMap.Add(key, value);
}
public string escapeString(string str) {
return str;
}
public static object deserialize(string json, Type type) {
try
{
return JsonConvert.DeserializeObject(json, type);
}
catch (IOException e) {
throw new ApiException(500, e.Message);
}
}
public static string serialize(object obj) {
try
{
return obj != null ? JsonConvert.SerializeObject(obj) : null;
}
catch (Exception e) {
throw new ApiException(500, e.Message);
}
}
public string invokeAPI(string host, string path, string method, Dictionary<String, String> queryParams, object body, Dictionary<String, String> headerParams) {
var b = new StringBuilder();
foreach (var queryParamItem in queryParams)
{
var value = queryParamItem.Value;
if (value == null) continue;
b.Append(b.ToString().Length == 0 ? "?" : "&");
b.Append(escapeString(queryParamItem.Key)).Append("=").Append(escapeString(value));
}
var querystring = b.ToString();
host = host.EndsWith("/") ? host.Substring(0, host.Length - 1) : host;
var client = WebRequest.Create(host + path + querystring);
client.ContentType = "application/json";
foreach (var headerParamsItem in headerParams)
{
client.Headers.Add(headerParamsItem.Key, headerParamsItem.Value);
}
foreach (var defaultHeaderMapItem in defaultHeaderMap.Where(defaultHeaderMapItem => !headerParams.ContainsKey(defaultHeaderMapItem.Key)))
{
client.Headers.Add(defaultHeaderMapItem.Key, defaultHeaderMapItem.Value);
}
switch (method)
{
case "GET":
break;
case "POST":
case "PUT":
case "DELETE":
var swRequestWriter = new StreamWriter(client.GetRequestStream());
swRequestWriter.Write(serialize(body));
swRequestWriter.Close();
break;
default:
throw new ApiException(500, "unknown method type " + method);
}
var webResponse = (HttpWebResponse) client.GetResponse();
if (webResponse.StatusCode != HttpStatusCode.OK) throw new ApiException((int) webResponse.StatusCode, webResponse.StatusDescription);
var responseReader = new StreamReader(webResponse.GetResponseStream());
var responseData = responseReader.ReadToEnd();
responseReader.Close();
return responseData;
}
}
}

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

@@ -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,8 +22,8 @@ public class UserApi extends SwaggerApi {
super(apiCredentials, eventDispatcher);
}
public static const event_createUsersWithArrayInput: String = "createUsersWithArrayInput";
public static const event_createUser: String = "createUser";
public static const event_createUsersWithArrayInput: String = "createUsersWithArrayInput";
public static const event_createUsersWithListInput: String = "createUsersWithListInput";
public static const event_updateUser: String = "updateUser";
public static const event_deleteUser: String = "deleteUser";
@@ -32,34 +32,9 @@ public static const event_loginUser: String = "loginUser";
public static const event_logoutUser: String = "logoutUser";
/*
* Returns void */
public function createUsersWithArrayInput (body: Array): String {
// create path and map variables
var path: String = "/user.{format}/createWithArray".replace(/{format}/g,"xml");
// query params
var queryParams: Dictionary = new Dictionary();
var headerParams: Dictionary = new Dictionary();
// verify required params are set
if(body == null ) {
throw new ApiError(400, "missing required params");
}
var token:AsyncToken = getApiInvoker().invokeAPI(path, "POST", queryParams, body, headerParams);
var requestId: String = getUniqueId();
token.requestId = requestId;
token.completionEventType = "createUsersWithArrayInput";
token.returnType = null ;
return requestId;
}
/*
* Returns void */
public function createUser (body: User): String {
// create path and map variables
var path: String = "/user.{format}".replace(/{format}/g,"xml");
var path: String = "/user".replace(/{format}/g,"xml");
// query params
var queryParams: Dictionary = new Dictionary();
@@ -79,12 +54,37 @@ public static const event_logoutUser: String = "logoutUser";
token.returnType = null ;
return requestId;
}
/*
* Returns void */
public function createUsersWithArrayInput (body: Array): String {
// create path and map variables
var path: String = "/user/createWithArray".replace(/{format}/g,"xml");
// query params
var queryParams: Dictionary = new Dictionary();
var headerParams: Dictionary = new Dictionary();
// verify required params are set
if(body == null ) {
throw new ApiError(400, "missing required params");
}
var token:AsyncToken = getApiInvoker().invokeAPI(path, "POST", queryParams, body, headerParams);
var requestId: String = getUniqueId();
token.requestId = requestId;
token.completionEventType = "createUsersWithArrayInput";
token.returnType = null ;
return requestId;
}
/*
* Returns void */
public function createUsersWithListInput (body: Array): String {
// create path and map variables
var path: String = "/user.{format}/createWithList".replace(/{format}/g,"xml");
var path: String = "/user/createWithList".replace(/{format}/g,"xml");
// query params
var queryParams: Dictionary = new Dictionary();
@@ -109,7 +109,7 @@ public static const event_logoutUser: String = "logoutUser";
* Returns void */
public function updateUser (username: String, body: User): String {
// create path and map variables
var path: String = "/user.{format}/{username}".replace(/{format}/g,"xml").replace("{" + "username" + "}", getApiInvoker().escapeString(username));
var path: String = "/user/{username}".replace(/{format}/g,"xml").replace("{" + "username" + "}", getApiInvoker().escapeString(username));
// query params
var queryParams: Dictionary = new Dictionary();
@@ -134,7 +134,7 @@ public static const event_logoutUser: String = "logoutUser";
* Returns void */
public function deleteUser (username: String): String {
// create path and map variables
var path: String = "/user.{format}/{username}".replace(/{format}/g,"xml").replace("{" + "username" + "}", getApiInvoker().escapeString(username));
var path: String = "/user/{username}".replace(/{format}/g,"xml").replace("{" + "username" + "}", getApiInvoker().escapeString(username));
// query params
var queryParams: Dictionary = new Dictionary();
@@ -159,7 +159,7 @@ public static const event_logoutUser: String = "logoutUser";
* Returns User */
public function getUserByName (username: String): String {
// create path and map variables
var path: String = "/user.{format}/{username}".replace(/{format}/g,"xml").replace("{" + "username" + "}", getApiInvoker().escapeString(username));
var path: String = "/user/{username}".replace(/{format}/g,"xml").replace("{" + "username" + "}", getApiInvoker().escapeString(username));
// query params
var queryParams: Dictionary = new Dictionary();
@@ -184,7 +184,7 @@ public static const event_logoutUser: String = "logoutUser";
* Returns string */
public function loginUser (username: String, password: String): String {
// create path and map variables
var path: String = "/user.{format}/login".replace(/{format}/g,"xml");
var path: String = "/user/login".replace(/{format}/g,"xml");
// query params
var queryParams: Dictionary = new Dictionary();
@@ -213,7 +213,7 @@ public static const event_logoutUser: String = "logoutUser";
* Returns void */
public function logoutUser (): String {
// create path and map variables
var path: String = "/user.{format}/logout".replace(/{format}/g,"xml");
var path: String = "/user/logout".replace(/{format}/g,"xml");
// query params
var queryParams: Dictionary = new Dictionary();

View File

@@ -2,9 +2,11 @@ package com.wordnik.client.model {
[XmlRootNode(name="Category")]
public class Category {
/* Category unique identifier */
[XmlElement(name="id")]
public var id: Number = 0.0;
/* Name of the category */
[XmlElement(name="name")]
public var name: String = null;

View File

@@ -2,19 +2,23 @@ package com.wordnik.client.model {
[XmlRootNode(name="Order")]
public class Order {
/* Unique identifier for the order */
[XmlElement(name="id")]
public var id: Number = 0.0;
/* ID of pet being ordered */
[XmlElement(name="petId")]
public var petId: Number = 0.0;
/* Order Status */
[XmlElement(name="status")]
public var status: String = null;
/* Number of pets ordered */
[XmlElement(name="quantity")]
public var quantity: Number = 0.0;
/* Status of the order */
[XmlElement(name="status")]
public var status: String = null;
/* Date shipped, only if it has been */
[XmlElement(name="shipDate")]
public var shipDate: Date = null;
@@ -22,8 +26,8 @@ package com.wordnik.client.model {
var str: String = "Order: ";
str += " (id: " + id + ")";
str += " (petId: " + petId + ")";
str += " (status: " + status + ")";
str += " (quantity: " + quantity + ")";
str += " (status: " + status + ")";
str += " (shipDate: " + shipDate + ")";
return str;
}

View File

@@ -4,39 +4,44 @@ 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;
/* Category the pet is in */
[XmlElement(name="category")]
public var category: Category = null;
/* pet status in the store */
[XmlElement(name="status")]
public var status: String = null;
/* Friendly name of the pet */
[XmlElement(name="name")]
public var name: String = null;
/* Image URLs */
// This declaration below of _photoUrls_obj_class is to force flash compiler to include this class
private var _photoUrls_obj_class: com.wordnik.client.model.String = null;
[XmlElementWrapper(name="photoUrls")]
[XmlElements(name="photoUrl", type="com.wordnik.client.model.String")]
public var photoUrls: Array = new Array();
/* Tags assigned to this pet */
// This declaration below of _tags_obj_class is to force flash compiler to include this class
private var _tags_obj_class: com.wordnik.client.model.Tag = null;
[XmlElementWrapper(name="tags")]
[XmlElements(name="tag", type="com.wordnik.client.model.Tag")]
public var tags: Array = new Array();
/* pet status in the store */
[XmlElement(name="status")]
public var status: String = null;
public function toString(): String {
var str: String = "Pet: ";
str += " (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

@@ -2,9 +2,11 @@ package com.wordnik.client.model {
[XmlRootNode(name="Tag")]
public class Tag {
/* Unique identifier for the tag */
[XmlElement(name="id")]
public var id: Number = 0.0;
/* Friendly name for the tag */
[XmlElement(name="name")]
public var name: String = null;

View File

@@ -2,41 +2,48 @@ package com.wordnik.client.model {
[XmlRootNode(name="User")]
public class User {
/* Unique identifier for the user */
[XmlElement(name="id")]
public var id: Number = 0.0;
[XmlElement(name="lastName")]
public var lastName: String = null;
[XmlElement(name="phone")]
public var phone: String = null;
/* Unique username */
[XmlElement(name="username")]
public var username: String = null;
/* First name of the user */
[XmlElement(name="firstName")]
public var firstName: String = null;
/* Last name of the user */
[XmlElement(name="lastName")]
public var lastName: String = null;
/* Email address of the user */
[XmlElement(name="email")]
public var email: String = null;
/* Password name of the user */
[XmlElement(name="password")]
public var password: String = null;
/* Phone number of the user */
[XmlElement(name="phone")]
public var phone: String = null;
/* User Status */
[XmlElement(name="userStatus")]
public var userStatus: Number = 0.0;
[XmlElement(name="firstName")]
public var firstName: String = null;
[XmlElement(name="password")]
public var password: String = null;
public function toString(): String {
var str: String = "User: ";
str += " (id: " + id + ")";
str += " (lastName: " + lastName + ")";
str += " (phone: " + phone + ")";
str += " (username: " + username + ")";
str += " (email: " + email + ")";
str += " (userStatus: " + userStatus + ")";
str += " (firstName: " + firstName + ")";
str += " (lastName: " + lastName + ")";
str += " (email: " + email + ")";
str += " (password: " + password + ")";
str += " (phone: " + phone + ")";
str += " (userStatus: " + userStatus + ")";
return str;
}

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 2013 Wordnik, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -34,10 +34,16 @@ object JavaPetstoreCodegen extends BasicJavaGenerator {
// package for api classes
override def apiPackage = Some("com.wordnik.petstore.api")
additionalParams ++= Map(
"artifactId" -> "swagger-petstore",
"artifactVersion" -> "1.0.0",
"groupId" -> "com.wordnik")
// supporting classes
override def supportingFiles =
List(
("apiInvoker.mustache", destinationDir + java.io.File.separator + invokerPackage.get.replaceAll("\\.", java.io.File.separator) + java.io.File.separator, "ApiInvoker.java"),
("apiException.mustache", destinationDir + java.io.File.separator + invokerPackage.get.replaceAll("\\.", java.io.File.separator) + java.io.File.separator, "ApiException.java"),
("apiInvoker.mustache", destinationDir + java.io.File.separator + invokerPackage.get.replace(".", java.io.File.separator) + java.io.File.separator, "ApiInvoker.java"),
("JsonUtil.mustache", destinationDir + java.io.File.separator + invokerPackage.get.replace(".", java.io.File.separator) + java.io.File.separator, "JsonUtil.java"),
("apiException.mustache", destinationDir + java.io.File.separator + invokerPackage.get.replace(".", java.io.File.separator) + java.io.File.separator, "ApiException.java"),
("pom.mustache", "samples/client/petstore/java", "pom.xml"))
}

View File

@@ -1,225 +1,214 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.wordnik</groupId>
<artifactId>swagger-client</artifactId>
<packaging>jar</packaging>
<name>swagger-client</name>
<version>1.0</version>
<scm>
<connection>scm:git:git@github.com:wordnik/swagger-mustache.git</connection>
<developerConnection>scm:git:git@github.com:wordnik/swagger-mustache.git</developerConnection>
<url>https://github.com/wordnik/swagger-mustache</url>
</scm>
<prerequisites>
<maven>2.2.0</maven>
</prerequisites>
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.wordnik.client</groupId>
<artifactId>api-client</artifactId>
<packaging>jar</packaging>
<name>api-client</name>
<version>1.0.0</version>
<scm>
<connection>scm:git:git@github.com:wordnik/swagger-mustache.git</connection>
<developerConnection>scm:git:git@github.com:wordnik/swagger-codegen.git</developerConnection>
<url>https://github.com/wordnik/swagger-codegen</url>
</scm>
<prerequisites>
<maven>2.2.0</maven>
</prerequisites>
<pluginRepositories>
<pluginRepository>
<id>scala-tools.org</id>
<name>Scala-Tools Maven2 Repository</name>
<url>http://scala-tools.org/repo-releases</url>
</pluginRepository>
<pluginRepository>
<id>maven-mongodb-plugin-repo</id>
<name>maven mongodb plugin repository</name>
<url>http://maven-mongodb-plugin.googlecode.com/svn/maven/repo</url>
<layout>default</layout>
</pluginRepository>
</pluginRepositories>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12</version>
<configuration>
<systemProperties>
<property>
<name>loggerPath</name>
<value>conf/log4j.properties</value>
</property>
</systemProperties>
<argLine>-Xms512m -Xmx1500m</argLine>
<parallel>methods</parallel>
<forkMode>pertest</forkMode>
</configuration>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12</version>
<configuration>
<systemProperties>
<property>
<name>loggerPath</name>
<value>conf/log4j.properties</value>
</property>
</systemProperties>
<argLine>-Xms512m -Xmx1500m</argLine>
<parallel>methods</parallel>
<forkMode>pertest</forkMode>
</configuration>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<!-- attach test jar -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<goals>
<goal>jar</goal>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
<configuration>
</configuration>
</plugin>
<!-- attach test jar -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<goals>
<goal>jar</goal>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
<configuration>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add_sources</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/main/java</source>
</sources>
</configuration>
</execution>
<execution>
<id>add_test_sources</id>
<phase>generate-test-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>src/test/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.scala-tools</groupId>
<artifactId>maven-scala-plugin</artifactId>
<version>2.15.2</version>
<executions>
<execution>
<id>scala-compile-first</id>
<phase>process-resources</phase>
<goals>
<goal>add-source</goal>
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>scala-test-compile</id>
<phase>process-test-resources</phase>
<goals>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
<configuration>
<jvmArgs>
<jvmArg>-Xms128m</jvmArg>
<jvmArg>-Xmx1500m</jvmArg>
</jvmArgs>
</configuration>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.scala-tools</groupId>
<artifactId>maven-scala-plugin</artifactId>
<configuration>
<scalaVersion>${scala-version}</scalaVersion>
</configuration>
</plugin>
</plugins>
</reporting>
<dependencies>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add_sources</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/main/java</source>
</sources>
</configuration>
</execution>
<execution>
<id>add_test_sources</id>
<phase>generate-test-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>src/test/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>${scala-maven-plugin-version}</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
<configuration>
<configuration>
<recompileMode>incremental</recompileMode>
</configuration>
<jvmArgs>
<jvmArg>-Xmx384m</jvmArg>
</jvmArgs>
<args>
<arg>-target:jvm-1.5</arg>
<arg>-deprecation</arg>
</args>
<launchers>
<launcher>
<id>run-scalatest</id>
<mainClass>org.scalatest.tools.Runner</mainClass>
<args>
<arg>-p</arg>
<arg>${project.build.testOutputDirectory}</arg>
</args>
<jvmArgs>
<jvmArg>-Xmx512m</jvmArg>
</jvmArgs>
</launcher>
</launchers>
</configuration>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>${scala-maven-plugin-version}</version>
</plugin>
</plugins>
</reporting>
<dependencies>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-client</artifactId>
<version>${jersey-version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>${scala-version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.wordnik</groupId>
<artifactId>swagger-core_2.9.1</artifactId>
<version>${swagger-core-version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.scalatest</groupId>
<artifactId>scalatest_2.9.1</artifactId>
<version>${scala-test-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit-version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<id>scala-tools.org</id>
<name>Scala-Tools Maven2 Repository</name>
<url>http://scala-tools.org/repo-releases</url>
</repository>
<repository>
<id>wordnik-ci-aws</id>
<url>https://ci.aws.wordnik.com/artifactory/libs-snapshots/</url>
</repository>
<repository>
<id>wordnik-ci-aws-maven</id>
<url>https://ci.aws.wordnik.com/artifactory/m2-snapshots/</url>
</repository>
<repository>
<id>wordnik-ci-aws-remote</id>
<url>https://ci.aws.wordnik.com/artifactory/remote-repos/</url>
</repository>
</repositories>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${jackson-version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson-version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson-version}</version>
<scope>compile</scope>
</dependency>
<properties>
<!-- test dependencies -->
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>${scala-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.scalatest</groupId>
<artifactId>scalatest_2.9.1</artifactId>
<version>${scala-test-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit-version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<properties>
<jersey-version>1.7</jersey-version>
<swagger-core-version>1.1.0</swagger-core-version>
<scala-version>2.9.1-1</scala-version>
<junit-version>4.8.1</junit-version>
<maven-plugin.version>1.0.0</maven-plugin.version>
<scala-test-version>1.6.1</scala-test-version>
<junit-version>4.8.1</junit-version>
<scala-test-version>1.6.1</scala-test-version>
</properties>
<jackson-version>2.1.4</jackson-version>
<scala-version>2.9.1-1</scala-version>
<junit-version>4.8.1</junit-version>
<maven-plugin-version>1.0.0</maven-plugin-version>
<junit-version>4.8.1</junit-version>
<scala-test-version>1.6.1</scala-test-version>
<scala-maven-plugin-version>3.1.5</scala-maven-plugin-version>
</properties>
</project>

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.*;
@@ -14,6 +12,7 @@ import com.sun.jersey.api.client.config.DefaultClientConfig;
import com.sun.jersey.api.client.filter.LoggingFilter;
import com.sun.jersey.api.client.WebResource.Builder;
import javax.ws.rs.core.Response.Status.Family;
import javax.ws.rs.core.MediaType;
import java.util.Map;
@@ -29,7 +28,7 @@ public class ApiInvoker {
public static ApiInvoker getInstance() {
return INSTANCE;
}
public void addDefaultHeader(String key, String value) {
defaultHeaderMap.put(key, value);
}
@@ -46,10 +45,9 @@ public class ApiInvoker {
return response;
}
else if(String.class.equals(cls)) {
if(json != null && json.startsWith("\"") && json.endsWith("\"") && json.length() > 1) {
if(json != null && json.startsWith("\"") && json.endsWith("\"") && json.length() > 1)
return json.substring(1, json.length() - 2);
}
else
else
return json;
}
else {
@@ -63,34 +61,38 @@ public class ApiInvoker {
public static String serialize(Object obj) throws ApiException {
try {
if (obj != null) return JsonUtil.getJsonMapper().writeValueAsString(obj);
else return null;
if (obj != null)
return JsonUtil.getJsonMapper().writeValueAsString(obj);
else
return null;
}
catch (Exception e) {
throw new ApiException(500, e.getMessage());
}
}
public String invokeAPI(String host, String path, String method, Map<String, String> queryParams, Object body, Map<String, String> headerParams) throws ApiException {
public String invokeAPI(String host, String path, String method, Map<String, String> queryParams, Object body, Map<String, String> headerParams, String contentType) throws ApiException {
Client client = getClient(host);
StringBuilder b = new StringBuilder();
for(String key : queryParams.keySet()) {
String value = queryParams.get(key);
if (value != null){
if(b.toString().length() == 0) b.append("?");
else b.append("&");
if(b.toString().length() == 0)
b.append("?");
else
b.append("&");
b.append(escapeString(key)).append("=").append(escapeString(value));
}
}
String querystring = b.toString();
Builder builder = client.resource(host + path + querystring).type("application/json");
Builder builder = client.resource(host + path + querystring).accept("application/json");
for(String key : headerParams.keySet()) {
builder.header(key, headerParams.get(key));
}
for(String key : defaultHeaderMap.keySet()) {
if(!headerParams.containsKey(key)) {
builder.header(key, defaultHeaderMap.get(key));
@@ -102,34 +104,46 @@ public class ApiInvoker {
response = (ClientResponse) builder.get(ClientResponse.class);
}
else if ("POST".equals(method)) {
if(body == null)
response = builder.post(ClientResponse.class, serialize(body));
else
response = builder.type("application/json").post(ClientResponse.class, serialize(body));
}
else if ("PUT".equals(method)) {
response = builder.put(ClientResponse.class, serialize(body));
}
if(body == null)
response = builder.put(ClientResponse.class, serialize(body));
else
response = builder.type("application/json").put(ClientResponse.class, serialize(body));
}
else if ("DELETE".equals(method)) {
if(body == null)
response = builder.delete(ClientResponse.class, serialize(body));
else
response = builder.type("application/json").delete(ClientResponse.class, serialize(body));
}
else {
throw new ApiException(500, "unknown method type " + method);
}
if(response.getClientResponseStatus() == ClientResponse.Status.OK) {
if(response.getClientResponseStatus() == ClientResponse.Status.NO_CONTENT) {
return null;
}
else if(response.getClientResponseStatus().getFamily() == Family.SUCCESSFUL) {
return (String) response.getEntity(String.class);
}
else {
throw new ApiException(
response.getClientResponseStatus().getStatusCode(),
response.getEntity(String.class));
response.getEntity(String.class));
}
}
private Client getClient(String host) {
if(!hostMap.containsKey(host)) {
Client client = Client.create();
client.addFilter(new LoggingFilter());
hostMap.put(host, client);
}
return hostMap.get(host);
if(!hostMap.containsKey(host)) {
Client client = Client.create();
client.addFilter(new LoggingFilter());
hostMap.put(host, client);
}
return hostMap.get(host);
}
}

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

@@ -2,6 +2,7 @@ package com.wordnik.petstore.api;
import com.wordnik.client.ApiException;
import com.wordnik.client.ApiInvoker;
import java.io.File;
import com.wordnik.petstore.model.Pet;
import java.util.*;
@@ -21,20 +22,49 @@ public class PetApi {
return basePath;
}
public Pet getPetById (String petId) throws ApiException {
public void uploadFile (String additionalMetadata, File body) throws ApiException {
// create path and map variables
String path = "/pet.{format}/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId));
String path = "/pet/uploadImage".replaceAll("\\{format\\}","json");
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
String contentType = "application/json";
try {
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, body, headerParams, contentType);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return ;
}
else {
throw ex;
}
}
}
public Pet getPetById (Long petId) throws ApiException {
// verify required params are set
if(petId == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables
String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
String contentType = "application/json";
try {
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams);
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams, contentType);
if(response != null){
return (Pet) ApiInvoker.deserialize(response, "", Pet.class);
}
@@ -50,20 +80,115 @@ public class PetApi {
}
}
}
public void addPet (Pet body) throws ApiException {
public void deletePet (String petId) throws ApiException {
// verify required params are set
if(petId == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables
String path = "/pet.{format}".replaceAll("\\{format\\}","json");
String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
String contentType = "application/json";
try {
String response = apiInvoker.invokeAPI(basePath, path, "DELETE", queryParams, null, headerParams, contentType);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return ;
}
else {
throw ex;
}
}
}
public List<Pet> partialUpdate (String petId, Pet body) throws ApiException {
// verify required params are set
if(petId == null || body == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables
String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
String contentType = "application/json";
try {
String response = apiInvoker.invokeAPI(basePath, path, "PATCH", queryParams, body, headerParams, contentType);
if(response != null){
return (List<Pet>) ApiInvoker.deserialize(response, "Array", Pet.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public void updatePetWithForm (String petId, String name, String status) throws ApiException {
// verify required params are set
if(petId == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables
String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
String contentType = "application/json";
try {
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, null, headerParams, contentType);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return ;
}
else {
throw ex;
}
}
}
public void addPet (Pet body) throws ApiException {
// verify required params are set
if(body == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables
String path = "/pet".replaceAll("\\{format\\}","json");
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
String contentType = "application/json";
try {
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, body, headerParams);
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, body, headerParams, contentType);
if(response != null){
return ;
}
@@ -80,19 +205,21 @@ public class PetApi {
}
}
public void updatePet (Pet body) throws ApiException {
// verify required params are set
if(body == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables
String path = "/pet.{format}".replaceAll("\\{format\\}","json");
String path = "/pet".replaceAll("\\{format\\}","json");
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(body == null ) {
throw new ApiException(400, "missing required params");
}
String contentType = "application/json";
try {
String response = apiInvoker.invokeAPI(basePath, path, "PUT", queryParams, body, headerParams);
String response = apiInvoker.invokeAPI(basePath, path, "PUT", queryParams, body, headerParams, contentType);
if(response != null){
return ;
}
@@ -109,23 +236,25 @@ public class PetApi {
}
}
public List<Pet> findPetsByStatus (String status) throws ApiException {
// verify required params are set
if(status == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables
String path = "/pet.{format}/findByStatus".replaceAll("\\{format\\}","json");
String path = "/pet/findByStatus".replaceAll("\\{format\\}","json");
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(status == null ) {
throw new ApiException(400, "missing required params");
}
if(!"null".equals(String.valueOf(status)))
queryParams.put("status", String.valueOf(status));
String contentType = "application/json";
try {
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams);
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams, contentType);
if(response != null){
return (List<Pet>) ApiInvoker.deserialize(response, "List", Pet.class);
return (List<Pet>) ApiInvoker.deserialize(response, "Array", Pet.class);
}
else {
return null;
@@ -140,23 +269,25 @@ public class PetApi {
}
}
public List<Pet> findPetsByTags (String tags) throws ApiException {
// verify required params are set
if(tags == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables
String path = "/pet.{format}/findByTags".replaceAll("\\{format\\}","json");
String path = "/pet/findByTags".replaceAll("\\{format\\}","json");
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(tags == null ) {
throw new ApiException(400, "missing required params");
}
if(!"null".equals(String.valueOf(tags)))
queryParams.put("tags", String.valueOf(tags));
String contentType = "application/json";
try {
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams);
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams, contentType);
if(response != null){
return (List<Pet>) ApiInvoker.deserialize(response, "List", Pet.class);
return (List<Pet>) ApiInvoker.deserialize(response, "Array", Pet.class);
}
else {
return null;

View File

@@ -21,20 +21,53 @@ public class StoreApi {
return basePath;
}
public Order getOrderById (String orderId) throws ApiException {
public void deleteOrder (String orderId) throws ApiException {
// verify required params are set
if(orderId == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables
String path = "/store.{format}/order/{orderId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "orderId" + "\\}", apiInvoker.escapeString(orderId));
String path = "/store/order/{orderId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "orderId" + "\\}", apiInvoker.escapeString(orderId.toString()));
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
String contentType = "application/json";
try {
String response = apiInvoker.invokeAPI(basePath, path, "DELETE", queryParams, null, headerParams, contentType);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return ;
}
else {
throw ex;
}
}
}
public Order getOrderById (String orderId) throws ApiException {
// verify required params are set
if(orderId == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables
String path = "/store/order/{orderId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "orderId" + "\\}", apiInvoker.escapeString(orderId.toString()));
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
String contentType = "application/json";
try {
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams);
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams, contentType);
if(response != null){
return (Order) ApiInvoker.deserialize(response, "", Order.class);
}
@@ -50,49 +83,22 @@ public class StoreApi {
}
}
}
public void deleteOrder (String orderId) throws ApiException {
// create path and map variables
String path = "/store.{format}/order/{orderId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "orderId" + "\\}", apiInvoker.escapeString(orderId));
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(orderId == null ) {
throw new ApiException(400, "missing required params");
}
try {
String response = apiInvoker.invokeAPI(basePath, path, "DELETE", queryParams, null, headerParams);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return ;
}
else {
throw ex;
}
}
}
public void placeOrder (Order body) throws ApiException {
// create path and map variables
String path = "/store.{format}/order".replaceAll("\\{format\\}","json");
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(body == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables
String path = "/store/order".replaceAll("\\{format\\}","json");
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
String contentType = "application/json";
try {
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, body, headerParams);
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, body, headerParams, contentType);
if(response != null){
return ;
}

View File

@@ -21,136 +21,22 @@ public class UserApi {
return basePath;
}
public void createUsersWithArrayInput (List<User> body) throws ApiException {
// create path and map variables
String path = "/user.{format}/createWithArray".replaceAll("\\{format\\}","json");
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(body == null ) {
throw new ApiException(400, "missing required params");
}
try {
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, body, headerParams);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return ;
}
else {
throw ex;
}
}
}
public void createUser (User body) throws ApiException {
// create path and map variables
String path = "/user.{format}".replaceAll("\\{format\\}","json");
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(body == null ) {
throw new ApiException(400, "missing required params");
}
try {
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, body, headerParams);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return ;
}
else {
throw ex;
}
}
}
public void createUsersWithListInput (List<User> body) throws ApiException {
// create path and map variables
String path = "/user.{format}/createWithList".replaceAll("\\{format\\}","json");
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(body == null ) {
throw new ApiException(400, "missing required params");
}
try {
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, body, headerParams);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return ;
}
else {
throw ex;
}
}
}
public void updateUser (String username, User body) throws ApiException {
// create path and map variables
String path = "/user.{format}/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username));
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(username == null || body == null ) {
throw new ApiException(400, "missing required params");
}
try {
String response = apiInvoker.invokeAPI(basePath, path, "PUT", queryParams, body, headerParams);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return ;
}
else {
throw ex;
}
}
}
public void deleteUser (String username) throws ApiException {
// create path and map variables
String path = "/user.{format}/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username));
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(username == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables
String path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString()));
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
String contentType = "application/json";
try {
String response = apiInvoker.invokeAPI(basePath, path, "DELETE", queryParams, null, headerParams);
String response = apiInvoker.invokeAPI(basePath, path, "DELETE", queryParams, null, headerParams, contentType);
if(response != null){
return ;
}
@@ -167,19 +53,21 @@ public class UserApi {
}
}
public User getUserByName (String username) throws ApiException {
// verify required params are set
if(username == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables
String path = "/user.{format}/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username));
String path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString()));
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
// verify required params are set
if(username == null ) {
throw new ApiException(400, "missing required params");
}
String contentType = "application/json";
try {
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams);
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams, contentType);
if(response != null){
return (User) ApiInvoker.deserialize(response, "", User.class);
}
@@ -195,24 +83,57 @@ public class UserApi {
}
}
}
public String loginUser (String username, String password) throws ApiException {
public void updateUser (String username, User body) throws ApiException {
// verify required params are set
if(username == null || body == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables
String path = "/user.{format}/login".replaceAll("\\{format\\}","json");
String path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString()));
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
String contentType = "application/json";
try {
String response = apiInvoker.invokeAPI(basePath, path, "PUT", queryParams, body, headerParams, contentType);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return ;
}
else {
throw ex;
}
}
}
public String loginUser (String username, String password) throws ApiException {
// verify required params are set
if(username == null || password == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables
String path = "/user/login".replaceAll("\\{format\\}","json");
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
if(!"null".equals(String.valueOf(username)))
queryParams.put("username", String.valueOf(username));
if(!"null".equals(String.valueOf(password)))
queryParams.put("password", String.valueOf(password));
String contentType = "application/json";
try {
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams);
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams, contentType);
if(response != null){
return (String) ApiInvoker.deserialize(response, "", String.class);
}
@@ -230,14 +151,109 @@ public class UserApi {
}
public void logoutUser () throws ApiException {
// create path and map variables
String path = "/user.{format}/logout".replaceAll("\\{format\\}","json");
String path = "/user/logout".replaceAll("\\{format\\}","json");
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
String contentType = "application/json";
try {
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams);
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams, contentType);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return ;
}
else {
throw ex;
}
}
}
public void createUser (User body) throws ApiException {
// verify required params are set
if(body == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables
String path = "/user".replaceAll("\\{format\\}","json");
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
String contentType = "application/json";
try {
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, body, headerParams, contentType);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return ;
}
else {
throw ex;
}
}
}
public void createUsersWithArrayInput (List<User> body) throws ApiException {
// verify required params are set
if(body == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables
String path = "/user/createWithArray".replaceAll("\\{format\\}","json");
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
String contentType = "application/json";
try {
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, body, headerParams, contentType);
if(response != null){
return ;
}
else {
return ;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return ;
}
else {
throw ex;
}
}
}
public void createUsersWithListInput (List<User> body) throws ApiException {
// verify required params are set
if(body == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables
String path = "/user/createWithList".replaceAll("\\{format\\}","json");
// query params
Map<String, String> queryParams = new HashMap<String, String>();
Map<String, String> headerParams = new HashMap<String, String>();
String contentType = "application/json";
try {
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, body, headerParams, contentType);
if(response != null){
return ;
}

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

@@ -20,18 +20,25 @@ object ObjcPetstoreCodegen extends BasicObjcGenerator {
def main(args: Array[String]) = generateClient(args)
// where to write generated code
override def destinationDir = "samples/client/petstore/objc/client"
val outputFolder = "samples/client/petstore/objc/"
override def destinationDir = outputFolder + java.io.File.separator + "client"
// to avoid recompiling ...
override def templateDir = "src/main/resources/objc"
override def templateDir = "objc"
additionalParams ++= Map("projectName" -> "PetstoreClient")
// supporting classes
override def supportingFiles =
List(
("NIKSwaggerObject.h", destinationDir, "NIKSwaggerObject.h"),
("NIKSwaggerObject.m", destinationDir, "NIKSwaggerObject.m"),
("NIKApiInvoker.h", destinationDir, "NIKApiInvoker.h"),
("NIKApiInvoker.m", destinationDir, "NIKApiInvoker.m"),
("NIKDate.h", destinationDir, "NIKDate.h"),
("NIKDate.m", destinationDir, "NIKDate.m"))
("SWGObject.h", destinationDir, "SWGObject.h"),
("SWGObject.m", destinationDir, "SWGObject.m"),
("SWGApiClient.h", destinationDir, "SWGApiClient.h"),
("SWGApiClient.m", destinationDir, "SWGApiClient.m"),
("SWGFile.h", destinationDir, "SWGFile.h"),
("SWGFile.m", destinationDir, "SWGFile.m"),
("SWGDate.h", destinationDir, "SWGDate.h"),
("SWGDate.m", destinationDir, "SWGDate.m"),
("Podfile.mustache", outputFolder, "Podfile")
)
}

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

View File

@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>com.reverb.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIMainStoryboardFile</key>
<string>Main_iPhone</string>
<key>UIMainStoryboardFile~ipad</key>
<string>Main_iPad</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>

View File

@@ -1,7 +1,17 @@
//
// Prefix header for all source files of the 'PetstoreClient' target in the 'PetstoreClient' project
// Prefix header
//
// The contents of this file are implicitly included at the beginning of every source file.
//
#ifdef __OBJC__
#import <Foundation/Foundation.h>
#import <Availability.h>
#ifndef __IPHONE_5_0
#warning "This project uses features only available in iOS SDK 5.0 and later."
#endif
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#import <SystemConfiguration/SystemConfiguration.h>
#endif

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