Commit Graph

2387 Commits

Author SHA1 Message Date
wing328
e4a991da0c add auto-generated test case for ruby 2016-01-26 23:15:02 +08:00
wing328
535cc1dfa7 double quote model property in ts 2016-01-26 18:08:50 +08:00
wing328
f2ab4db419 Merge pull request #1965 from wing328/ts_option_property_naming
[TypeScript] add an option to determine property naming convention
2016-01-26 16:54:20 +08:00
wing328
afd451ec04 Merge pull request #1928 from ergon/feature/retrofit2-rx
Feature/retrofit2 rx
2016-01-26 15:58:08 +08:00
wing328
fc88cb9801 Merge pull request #1967 from wing328/support-jaxrs-cxf-2
[Java][JAX-RS] Support JAX-RS CXF
2016-01-26 15:46:54 +08:00
wing328
2e0047cf86 rename jarxs generator 2016-01-26 15:34:43 +08:00
wing328
2046580d41 update based on discussion on
https://github.com/swagger-api/swagger-codegen/pull/1967/files#r50697083
2016-01-26 15:23:50 +08:00
wing328
17f8931887 add default help text for new ts option 2016-01-26 15:02:26 +08:00
wing328
d5d1c7b98f remove unused default value 2016-01-26 15:00:41 +08:00
wing328
abe039a05f fix test case 2016-01-26 15:00:41 +08:00
wing328
4971461a23 ts add option for model property naming 2016-01-26 15:00:41 +08:00
wing328
6c531142a9 Merge pull request #1969 from jimschubert/csharp_List_to_ICollection_Tests
[csharp] Model tests for List/Collection options
2016-01-26 14:45:47 +08:00
Tony Tam
decedb6c91 Merge pull request #1977 from swagger-api/issue-1976
added args for maven plugin
2016-01-25 22:08:22 -08:00
Tony Tam
3ddccb5e5c fix for #1976, added missing types 2016-01-25 21:34:28 -08:00
Tony Tam
b641d4a17a refactored for access in maven plugin 2016-01-25 21:33:58 -08:00
wing328
ca941b1e3c Merge pull request #1947 from xhh/javascript-default-headers
[JavaScript] Add default headers and some tests
2016-01-26 12:40:29 +08:00
evigeant
b61d76f291 Removed a duplicate cliOptions (it is already added by the base class) 2016-01-25 22:36:24 -05:00
evigeant
d0b99a0f83 Fixed options provider for all classes where cliOptions were added 2016-01-25 22:17:09 -05:00
evigeant
43807adf4f Added missing cliOptions for JaxRSServerCodegen 2016-01-25 21:48:54 -05:00
evigeant
faadccf371 Added missing cliOptions for the StaticHtmlGenerator and
StaticDocGenerator
2016-01-25 21:39:58 -05:00
Jim Schubert
c9a0ff7482 [csharp] Model tests for List/Collection options 2016-01-25 12:45:44 -05:00
Silvio Heuberger
e34706386f Change the artifact identifier for the retrofit2-rx sample 2016-01-25 10:29:13 +01:00
Silvio Heuberger
d60f7d1186 Change templates and test code so that the sample is 1.7 compatible
Alas.
2016-01-25 10:29:13 +01:00
Silvio Heuberger
7dcc1c839e Add script for sample generation and adapt gradle and pom templates 2016-01-25 10:29:13 +01:00
Silvio Heuberger
886abda926 Add 'useRxJava' option to retrofit2 java client generator
This still uses retrofit 2.0.0-beta2 because the api
in beta3 has changed and the package
has been renamed to retrofit2.*

Change retrofit-rx to be a library option
2016-01-25 10:29:13 +01:00
Silvio Heuberger
06827da943 Remove retrofit remnant from javascript client code generator
I highly doubt this code is ever executed.
2016-01-25 10:28:08 +01:00
xhh
297597a86c Merge branch 'master' into ruby-binary 2016-01-25 12:48:25 +08:00
xhh
8c19626095 Handle "binary" as String in Ruby client
as it seems weird to handle byte array (array of integer) in Ruby
2016-01-25 12:47:59 +08:00
Jim Schubert
b4eed0d147 Merge branch 'master' into csharp_List_to_ICollection 2016-01-24 23:00:56 -05:00
Jim Schubert
2e958f9223 [csharp] Collections options tests, fix model using directive 2016-01-24 22:55:37 -05:00
wing328
a0b4a07d08 Merge pull request #1960 from dilipkrish/master
Updated the code generation for spring mvc
2016-01-25 10:19:12 +08:00
wing328
fc83139483 resolve minor issue after rebase 2016-01-25 01:11:20 +08:00
Maelig Nantel
491f97f7ef rename codegen names 2016-01-25 00:49:41 +08:00
Maelig Nantel
6d6f366db4 Finish
Tests ok. Some modifications may be done later, maybe...
2016-01-25 00:49:41 +08:00
Maelig Nantel
f3659f88a8 Work almost finish
Aask @wing328 if the modificatgion in the DefaultGenerator class is a
problem. If needed, find a way to do it only for the CXF Codegen.
TODO: Maybe create an abstract JAX-RS Codegen and make Jersey & CXF
extends it ? CXF should not extends Jersey since there at two different
frameworks implementing the JAX-RS specification.
Important: nothing is tested yet, only visual checks during Maven build.
2016-01-25 00:49:07 +08:00
Maelig Nantel
1dbc8a8552 Unit test correction
A unit test was in error due to a duplicate key in a map. Joda library
is now used by default for JAX-RS code generation.
2016-01-25 00:48:30 +08:00
Maelig Nantel
63b7e24c22 merge resolution 2016-01-25 00:48:30 +08:00
Maelig Nantel
3648a79965 Add CXF codegen
Also rename the existing JAX-RS codegen to JAX-RS-Jersey1 codegen, since
JAX-RS is only a specification. Jersey and CXF are both an
implementation of the JAX-RS specification.
2016-01-25 00:47:29 +08:00
Maelig Nantel
44c1e27680 Add mustache template files for Apache CXF support
probably not the final version of the templates
2016-01-25 00:46:02 +08:00
Jim Schubert
0bb30ddccd Merge branch 'master' of github.com:swagger-api/swagger-codegen into csharp_List_to_ICollection 2016-01-24 09:35:46 -05:00
Jim Schubert
9dc40128ac [csharp] Options: useCollection, returnICollection
This change is inline with Microsoft's recommended guidelines for
collects
(https://msdn.microsoft.com/en-us/library/dn169389(v=vs.110).aspx).

Added generator options for csharp to:

* useCollection: Deserialize responses into and return Collection<T>
* returnICollection: For List<T> or Collection<T>, return ICollection<T>
  instead of the concrete type

As a consequence of useCollection, method imputs will also change to
Collection<T>.
2016-01-24 09:13:39 -05:00
wing328
3086bb624f Merge pull request #1941 from jhancock93/projectfile2
CSharp client: optionally build .csproj file
2016-01-24 12:50:40 +08:00
John Hancock
9edbfd6918 Fix csproj to use framework 4.5 instead of 4.5.2 and fix project file option description 2016-01-23 22:59:48 -05:00
Tony Tam
407c9121bf switched from paramName to baseName to avoid changing format 2016-01-22 20:54:15 -08:00
Tony Tam
ee8547f3b4 Merge pull request #1900 from hiveship/fix-java-warnings
fix java warnings
2016-01-22 20:36:11 -08:00
Tony Tam
51c66a270e Merge pull request #1958 from hjacobs/minor-python-flask-clean-up
Python Flask (Connexion) clean up
2016-01-22 14:05:45 -08:00
Tony Tam
e89bac3421 partial fix for #1956 2016-01-22 13:59:07 -08:00
hjacobs
103321d872 fix code formatting of flaskConnexion app.py and use more intuitive run(port=..) 2016-01-22 22:34:49 +01:00
hjacobs
aecc367e35 fix flaskConnexion README template to use correct URLs (contextPath is "/v2" for pet store) 2016-01-22 22:33:32 +01:00
hjacobs
9ca83c0174 tweak FlaskConnexionCodegen help string 2016-01-22 22:32:37 +01:00
Dilip Krishnan
a33bff012c Updated the spring mvc server template to springfox 2.3.1 2016-01-22 15:31:27 -06:00
Christian Kaps
618351c11c Namespace is missing for SplFileObject reference 2016-01-22 12:17:58 +01:00
xhh
794589d6b8 JavaScript: add default headers and some tests 2016-01-22 18:46:29 +08:00
Maelig Nantel
4c7d471203 Merge remote-tracking branch 'refs/remotes/swagger-api/master' into fix-java-warnings
# Conflicts:

#	modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/JavascriptClientCodegen.java
2016-01-22 11:32:08 +01:00
wing328
a550eec389 Merge pull request #1942 from xhh/javascript-fixes
[JavaScript] Fix initialization issues on array and nested model fields
2016-01-22 18:15:20 +08:00
wing328
5b6d224612 Merge pull request #1747 from wing328/add_golang
[Go] Add Go API client generator
2016-01-22 17:42:30 +08:00
wing328
20e531d6dd update test case, add beta to go help 2016-01-22 17:27:30 +08:00
wing328
25b60a194b add sh script for go, add binary mapping for go, fix format 2016-01-22 17:21:51 +08:00
xhh
a607856406 JavaScript: fix model name in initialization and import
Closes #1935
2016-01-22 11:48:59 +08:00
John Hancock
277e7cfa8d Remove defaultValue from project guid cliOption because the guid is a random value 2016-01-21 22:47:53 -05:00
xhh
16e367bdc8 JavaScript: fix constructFromObject for Array fields
Closes #1721
2016-01-22 11:23:45 +08:00
wing328
03b463bc43 Merge pull request #1920 from Shyri/android-volley-library
Android volley library enhancement and tests
2016-01-22 10:52:26 +08:00
John Hancock
60c79d1cae Fix assembly references in project file generation 2016-01-21 21:16:09 -05:00
Maelig Nantel
94315a249d Merge branch 'java-support-uuid-generation' into fix-java-warnings 2016-01-21 11:21:22 +01:00
Maelig Nantel
687c2b1431 Merge remote-tracking branch 'refs/remotes/swagger-api/master' into fix-java-warnings
# Conflicts:

#	modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultCodegen.java
2016-01-21 11:17:32 +01:00
wing328
7f2b3a5587 update csharp readme 2016-01-21 11:13:14 +01:00
xhh
81ed441dfa Use String for "binary" as a workaronud 2016-01-21 11:13:12 +01:00
xhh
ecbc4a147c Set accept header for JavaScript client 2016-01-21 11:13:12 +01:00
wing328
7c619b244f fix byte[] in spring mvc and java inflector 2016-01-21 11:13:10 +01:00
xhh
c1d5179d72 Some cleanup 2016-01-21 11:13:09 +01:00
xhh
6efbde5691 Make JavaScript client work in both Node.js and browser
* Replace jQuery with SuperAgent which works in both Node.js and browser
* Use UMD pattern (returnExports.js) to make the module exporting compatible
  with all major systems: AMD, Node.js (CommonJS) and browser
* Implement support of header and form parameters. Closes #1736
* Move HTTP requesting code to `ApiClient` and allow customizing options
  in it, e.g. "basePath"
* Update unit tests accordingly and add some tests for `ApiClient`
2016-01-21 11:13:09 +01:00
wing328
a2cb3f7c3c add comments 2016-01-21 11:13:08 +01:00
wing328
51f2f8c6ad add test template for php 2016-01-21 11:13:07 +01:00
wing328
6d010f9af7 fix typo 2016-01-21 11:13:06 +01:00
wing328
fb1cc254e4 add api test and model test files 2016-01-21 11:13:05 +01:00
wing328
ccd0db4434 fix empty object serialization issue 2016-01-21 11:13:05 +01:00
wing328
58d920eaf0 update tostring to use sanitizeforserialization 2016-01-21 11:13:04 +01:00
wing328
7a5d9412c5 update csharp configuration to avoid circular dependency, deprecate
ApiClient.Default
2016-01-21 11:13:03 +01:00
xhh
aad0547b40 Ruby: support binary (byte array) for body parameter and response 2016-01-21 18:01:03 +08:00
xhh
253a955cff Merge branch 'master' into java-binary-support
Conflicts:
	samples/client/petstore/java/default/src/test/java/io/swagger/petstore/test/PetApiTest.java
	samples/client/petstore/java/jersey2/src/test/java/io/swagger/petstore/test/PetApiTest.java
	samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/petstore/test/PetApiTest.java
2016-01-21 17:28:14 +08:00
Shyri Villar
877661a1f4 Add OAuth stub [androiod-volley] 2016-01-20 20:59:55 +01:00
Shyri Villar
407837ebe2 Added configurable timeout 2016-01-20 20:11:36 +01:00
Shyri Villar
92e7d0e69c fix ApiKeyAuth applyToHeader when no api-key is provided 2016-01-20 19:59:28 +01:00
wing328
9b8b1fbb7f Merge pull request #1922 from xhh/javascript-nodejs
[JavaScript] Make JavaScript client work in both Node.js and browser
2016-01-20 21:44:44 +08:00
wing328
cb8c3dfc2e update csharp readme 2016-01-20 12:00:57 +08:00
wing328
75a932bf45 Merge pull request #1912 from wing328/csharp_update_test2
[C#] store ApiClient default in Configuration.Default
2016-01-20 11:26:05 +08:00
xhh
3b5462c1e9 Use String for "binary" as a workaronud 2016-01-20 10:34:36 +08:00
xhh
9c580a2447 Set accept header for JavaScript client 2016-01-20 10:29:09 +08:00
wing328
b21c5f08a7 Merge pull request #1921 from wing328/php_generate_test
[PHP] generate files for unit testing models and API files
2016-01-20 10:05:20 +08:00
John Hancock
629567c5ac Fix project file option handling 2016-01-19 21:00:55 -05:00
John Hancock
b4bce238c2 CSharp: Optionally build csproj file 2016-01-19 21:00:54 -05:00
wing328
38bac9dfb4 fix byte[] in spring mvc and java inflector 2016-01-19 23:35:23 +08:00
xhh
40d83e7f52 Some cleanup 2016-01-19 22:52:05 +08:00
xhh
14630c7632 Make JavaScript client work in both Node.js and browser
* Replace jQuery with SuperAgent which works in both Node.js and browser
* Use UMD pattern (returnExports.js) to make the module exporting compatible
  with all major systems: AMD, Node.js (CommonJS) and browser
* Implement support of header and form parameters. Closes #1736
* Move HTTP requesting code to `ApiClient` and allow customizing options
  in it, e.g. "basePath"
* Update unit tests accordingly and add some tests for `ApiClient`
2016-01-19 22:21:36 +08:00
wing328
61c717b6de add comments 2016-01-19 19:50:27 +08:00
wing328
8927c1dc0f add test template for php 2016-01-19 14:49:32 +08:00
wing328
731fd4be33 fix typo 2016-01-19 10:40:43 +08:00
Shyri Villar
060f0f33c2 add test dependencies [android-volley-library] 2016-01-18 22:11:11 +01:00
Shyri Villar
97e1d1e273 fix networ error excetption for synchronous requests [android-volley-library] 2016-01-18 22:06:02 +01:00
Shyri Villar
51468503b2 fix post, put, delete and patch when body is null [android-volley-library] 2016-01-18 22:05:36 +01:00
wing328
86587607e1 add api test and model test files 2016-01-19 00:51:21 +08:00
wing328
dcd2c00fe6 fix empty object serialization issue 2016-01-18 21:42:24 +08:00
wing328
9fd4f39c8c update tostring to use sanitizeforserialization 2016-01-18 21:27:29 +08:00
Maelig Nantel
370a8d136f fixes 2016-01-18 11:35:57 +01:00
Maelig Nantel
89ed3bdb75 New fix 2016-01-18 11:16:04 +01:00
Maelig Nantel
b292ce54ce Update after merging 2016-01-18 10:10:55 +01:00
Maelig Nantel
a39942f43f Merge remote-tracking branch 'refs/remotes/swagger-api/master' into fix-java-warnings
# Conflicts:

#	modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/JaxRSServerCodegen.java
2016-01-18 10:10:27 +01:00
wing328
7b1dde3d85 Merge pull request #1911 from wing328/mapping_update_binary
Add "binary" mapping in code generators
2016-01-18 12:29:18 +08:00
wing328
417dcc8a86 update csharp configuration to avoid circular dependency, deprecate
ApiClient.Default
2016-01-18 11:39:32 +08:00
wing328
bfc83b330f fix indent, update perl & python sample 2016-01-17 19:32:50 +08:00
wing328
906bd2c7bf add binary mapping for code generator 2016-01-17 19:14:11 +08:00
wing328
1bae5c44b2 fix null apiclient in .net (windows) 2016-01-17 16:04:13 +08:00
Tony Tam
bde2bbab56 Merge pull request #1906 from swagger-api/issue-1905
added date library option
2016-01-15 16:15:41 -08:00
Tony Tam
70784a3d98 fixed templates 2016-01-15 14:28:55 -08:00
Tony Tam
04e0df3b4a added date library option 2016-01-15 14:20:20 -08:00
Maelig Nantel
8005931e5a Corrent issue 1885
Handle the Swagger "default" value for a parameter with the JAX-RS
@DefaultValue annotation. This correction will also be reported in the
new JAX-RS CXF Codegen.
2016-01-15 16:49:36 +01:00
Maelig Nantel
467939216c fix java warnings
Do not impact any feature. Juste correct some Java warnings (static
methods, unused imports or parameters...).
2016-01-15 14:02:55 +01:00
Maelig Nantel
faa4ecd0cd Support java code generation for UUIDProperty
A property defined as "type: string & format: uuid" is now generated in
Java using "java.util.UUID" class instead of a classical String. In the
Java, the UUID class do not provide a constructor. You may use the
method UUID.fromString(<uuid_string>) to construct your UUID object.
2016-01-15 12:39:25 +01:00
xhh
319c260678 Java okhttp-gson: support binary (byte array)
for body parameter and response.
Also Update Java default, jersey2 and okhttp-gson clients to support
(constant) query string in the `path` (to work with the 2 "fake"
petstore endpoints on binary).
2016-01-15 19:33:33 +08:00
wing328
bfb8cdce2e fix another replaceall in perl codegen 2016-01-15 16:03:35 +08:00
wing328
cbbb48a4e4 fix file.separator in replaceall (perl) 2016-01-15 15:47:40 +08:00
wing328
fee8acef97 fix isBinary, CodegenParameter copy, add isBinary to php api client 2016-01-15 11:43:02 +08:00
wing328
f54185c66d add binary support for php response 2016-01-15 11:43:02 +08:00
wing328
078f68a211 Merge pull request #1876 from xhh/file-downloading-fixes
File downloading improvements for Ruby and Java
2016-01-15 11:25:25 +08:00
wing328
0c4cc10095 Merge pull request #1882 from scottrw93/master
Fix for Jaxrs file upload missing param in service class
2016-01-15 11:22:37 +08:00
wing328
56f8d5f9e2 Merge pull request #1886 from bakito/master
skip trailing comma for enums in TypeScript angular
2016-01-15 11:02:58 +08:00
xhh
521ba9924b Add a method to sanitize filename, add test cases 2016-01-14 23:06:30 +08:00
Marc Brugger
198310d5f2 skip trailing comma for enums 2016-01-14 14:06:00 +01:00
tkb16
f1710a1840 skip trailing comma for enums 2016-01-14 12:51:02 +01:00
wing328
f50463da02 fix security issue with filename for c# api client 2016-01-14 10:43:56 +08:00
11356176
c2a001847f Merge remote-tracking branch 'upstream/master' 2016-01-13 18:14:06 +00:00
Scott Williams
e01cde8010 Fix for Jaxrs file upload service class missing param 2016-01-13 15:18:33 +00:00
John Hancock
584ea2862c CSharp: Optionally build csproj file 2016-01-12 21:55:17 -05:00
wing328
ece56af43c Merge pull request #1874 from cbornet/fix_param
[Feign]Fix wrong query param key name in feign client
2016-01-12 20:06:29 +08:00
wing328
24980ea1c6 Merge pull request #1866 from xhh/java-okhttp-gson-debugging
[Java okhttp-gson] Implement the "debugging" option of ApiClient
2016-01-12 16:53:39 +08:00
xhh
ef8d2fd766 Ruby: IO improvements on file downloading
- Use `File.basename` to sanitize the filename got from response header
- Write to the `Tempfile` directly and return it
- Set file encoding according to the response body's encoding

See #1848
2016-01-12 11:59:41 +08:00
wing328
8b430cdeb0 Merge pull request #1864 from wing328/csharp_binary_response
[C#] add binary support
2016-01-12 11:58:28 +08:00
wing328
d35d97d145 Merge pull request #1865 from wing328/php_fix_file_security
[PHP] better filename handling in ObjectSerializer
2016-01-12 11:28:59 +08:00
wing328
be49dc58bd Merge pull request #1857 from erikvanzijst/erik/java_object_naming_clash
Java Class Name Clashes with java.lang.*
2016-01-12 10:57:53 +08:00
wing328
ef8e5dbcf5 Merge pull request #1862 from cbornet/feign_auth
Add auth support to feign library
2016-01-12 09:27:51 +08:00
cbornet
07947d8cad fix wrong query param key name 2016-01-11 22:25:56 +00:00
Shyri Villar
d40bb8ad32 [android-volley] Added synchronous request support 2016-01-11 23:18:18 +01:00
cbornet
5e4db995c9 add oauth support to feign client 2016-01-11 22:16:01 +00:00
cbornet
58c0e63012 add auth support to feign library
Fix #1840
2016-01-11 22:16:01 +00:00
Shyri Villar
59b91c2120 [android-volley] improved RequestQueue configuration and decoupled ApiInvoker from Android Context 2016-01-11 21:18:28 +01:00
xhh
3c6639b4f6 Remove path delimiters from downloading filename 2016-01-11 22:13:07 +08:00
wing328
81436e8ae3 Merge pull request #1839 from Shyri/android-volley-library
Android volley fix responses with additionalProperties and update sdk version
2016-01-11 22:11:44 +08:00
xhh
b87d6a0f36 Java okhttp-gson: implement the "debugging" option
for ApiClient and upgrade OkHttp
2016-01-11 18:10:02 +08:00
wing328
3099aa2d85 Merge pull request #1853 from xhh/java-timeout
[Java] Support setting connect timeout for the default and jersey2 clients
2016-01-11 17:10:22 +08:00
wing328
eebf743fad better filename handling in objectseralizer (php) 2016-01-11 16:16:49 +08:00