Commit Graph

64 Commits

Author SHA1 Message Date
Paŭlo Ebermann
f7b39a85a5 Updating security samples for scala. (#5295) 2017-04-04 14:40:36 +08:00
Paŭlo Ebermann
eb3565b6c0 [C#] Fix guid for C# security samples (#5283)
* Issue #5196: also fix the packageGuid for the C# security samples.

* Update C# security samples.
2017-04-04 14:38:47 +08:00
David Harrigan
fc01457d77 [JAVA][#5172] Allow vendor json media types (#5189)
* [#5172] Allow vendor json media types

* Revert unnecessary diffs

* Update petstore sample

* Didn't run mvn after some edits

* Rerun ' ./bin/java-petstore-all.sh' and './bin/security/java-petstore-okhttp-gson.sh'

* Added more realistic test cases for isJsonMime
2017-03-30 22:23:24 +08:00
wing328
e45284806f add gradle cache 2017-03-21 21:48:40 +08:00
XuXinkun
3c1a8daaf9 fix handleResponse to not leak okhttp connections (#4997) 2017-03-11 17:02:49 +08:00
Kyle Maxwell
3e3d360027 Add proxy support to fix #4639 (#4946)
* Add proxy support to fix #4639

* Update sample app for testing

* Fix indentation and remove leftover code

* Update sample for new rest template
2017-03-08 12:03:45 +08:00
Jacobo de Vera
7de1eeb987 [python] Triple quote strings with new lines in default values (#4941)
* Triple quote python strings in defaults

When the model contains a string with a default value with new lines in
it, simply quoting generates invalid python code. Using triple quotes
for all string defaults makes sure the generated code will be a valid
python string.

Fixes #4862

* Wrap default string in triple quotes when it contains new lines

* Add newly generated python sample files
2017-03-07 14:46:38 +08:00
Val Polouchkine
122194c30e Fix typo (#4956)
Authorizatoin should be Authorization
2017-03-07 13:49:42 +08:00
Viktor Chukhantsev
35d3fb82ce [Ruby] Can only use content-type application/json with ruby-client #4867 (#4893)
* Fix ruby-client work with modern content types, like application/api.vnd+json

* Add specs.

* Fix regexp.

* Regenerate petstore client.
2017-03-06 00:44:15 +08:00
patulacci
e23a24c138 replaced SWG by classPrefix and ran tests (#4871) 2017-03-03 17:29:16 +08:00
gigo1980
fa803d5cf5 Adjust Date ISO Dateformat for Query Parameters: ISSUE 4745 (#4812)
* Adjust Date ISO Dateformat for Query Parameters: ISSUE 4745

* Run Sample Model
2017-03-03 16:58:24 +08:00
baartosz
26257daec3 fixed ApiException's methods return types (#4845) 2017-03-02 16:45:42 +08:00
Frode Danielsen
3236ade09d [Python] Improve model equality implementation (#4663)
* [Python] Improve model equality implementation

The model equality implementation template blindly tried accessing the
`__dict__` attribute of the variable to compare equality against. This
attribute does not exist for a lot of Python built-in types (`None`,
`str` etc.) and the equality check would simply crash.

This adds a simple guard to only continue with equality check if the
variable to compare is an instance of the model being compared against.

* Remove wrong auto-update of Python requirements
2017-01-28 00:42:53 +08:00
Ainun Nazieb
05eea2436c [PHP] Validate parent's model first, if any (#4659)
* if model has parent, valid() & listInvalidProperties() will check the parents' first

* Run the ./bin/security/php-petstore.sh
2017-01-26 22:49:38 +08:00
Dan Mikita
0a559f0dd2 Add support for modifier within the Jaxb XMLElement annotation (#4433)
* fixes #4432 Adding support for the  modifier within the Jaxb XMLElement annotation. Updated README with JaxbAnnotations configuration option.

* #4432 Running the Petstore files
2017-01-17 15:26:30 +08:00
Kevin Locke
409e1a504c Fix Gson parsing of Joda DateTime without millis (#4473)
* Fix Gson parsing of Joda DateTime without millis

The DateTimeFormatter returned by ISODateTimeFormat.dateTime() only
parses dates with millisecond values, and throws
IllegalArgumentException when milliseconds are not present.  The
date-time construct from RFC 3339 Section 5.6 referenced by the
Swagger/OpenAPI spec allows fractional second values to be omitted.
This results in valid date-time values being rejected by the generated
code.

This commit fixes the problem by using .dateOptionalTimeParser() for
parsing, which correctly handles date-time values without fractional
seconds.  A previous version of this commit used .dateTimeParser(),
which accepted a time without a date and was considered too liberal.
Note that .dateTime() must still be used for printing, which is not
supported by .dateTimeParser().

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>

* Fix akka-scala date-time parser with Joda

As in the previous commit, which fixed Java generators,
ISOISODateTimeFormat.dateOptionalTimeParser() should be used for
date-time parsing and ISOISODateTimeFormat.dateTime() for printing.
Apply the same change to akka-scala.

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2017-01-07 21:56:14 +08:00
Johan Nystrom
ff70105484 Fix CSV collection parameter issues for scalatra server (#4426)
* Fix scalatra handling of CSV query parameters

* Ran petstore for scalatra server
2016-12-20 16:02:45 +08:00
Chris Putnam
4fa3595a41 [typescript-angular2] Fix syntax error (#4383)
* allow function so access token can be derived for each api call

* update tests

* update type for accessToken to be string or function that returns string

* fix syntax error
2016-12-14 11:50:02 +08:00
Chris Putnam
0b5a6f25da [typescript-angular2] access token function (#4361)
* allow function so access token can be derived for each api call

* update tests

* update type for accessToken to be string or function that returns string
2016-12-13 00:39:09 +08:00
Vlad Frolov
4d2a13018b [Python] Make the code look Pythonic (#4352) 2016-12-09 17:26:23 +08:00
Christopher Chiche
a3d3082105 [Typescript/Fetch] Fix tslint issues in generated code (#4313)
* [Typescript/Fetch] Fix tslint issues in generated code

* Add security generated files.

* Use tslint version that doesn't require typescript 2

* Run build scripts
2016-12-08 16:01:50 +08:00
wing328
1925928efa Merge pull request #4038 from alechill/4025-typescript-fecth-request-options
[TYPESCRIPT] Support passing custom RequestInit options in typescript-fetch client…
2016-11-29 22:32:03 +08:00
Robert Biehl
1ea9865a44 [PHP] Fix discriminator handling (#4246)
* [PHP] Fix discriminator handling

* [PHP] Fix discriminator handling (Update examples)
2016-11-25 16:12:41 +08:00
menchauser
6ebc2fc051 Fix support for 'class' properties in Java codegen (#4237)
* Fix support for 'class' properties in Java codegen

Currently Java codegen works successfully for property named 'class' but
fails on '_class', '__class', etc, because of 'Object.getClass()'
overloading.

This fix is intended to avoid all Object method overloading cases.

* Regenerated samples for Java petstore-security-test
2016-11-23 00:18:40 +08:00
Cliffano Subagio
5c53513a30 [python] Add packageUrl option, replacing infoUrl in setup.py (#4101)
* [python] Add packageUrl option, replacing infoUrl in setup.py .

* [python] Regenerate Python petstore sample.

* [python] Regenerate Python petstore security test sample.
2016-11-01 18:21:53 +08:00
Alec Hill
41a7aaffcc Support passing custom RequestInit options in typescript-fetch client, to enable fetch API specific options (eg including credentials, enabling CORS etc) 2016-10-19 18:03:58 +02:00
Andreas Franzén
d21613c6ab Bugfix/3929 do not set multipart (#3932)
* Do not set Content-Type to multipart/form-data
It causes superagent to not add the boundary in the Content-Type

* Run shell-scripts
2016-10-08 12:36:56 +08:00
Ville Skyttä
91b7494e3e Spelling fixes 2016-09-06 14:45:04 +03:00
Ville Skyttä
0363858672 java: Javadoc fixes 2016-09-01 18:07:35 +03:00
Daniel Ge
dd1ed12318 Make connection failures visible with generated Ruby SDKs (#3640)
* Make connection failures visible in Ruby SDK

The underlying HTTP library, Typhoeus, requires you to be explicit about
error handling. Unfortunately, this also means that we can't assume that
`response.success?` will be false only when the HTTP status code is not
a 200; it could also be false when the request fails (timeouts, TLS
verification issues, etc.). This commit adds explicit error handling for
these cases.

* Update samples
2016-08-30 10:28:07 +08:00
Ville Skyttä
224fd208e7 Various python cleanups (#3650)
* python: Let logging format messages on demand

* python: Use six more

* python: Remove unused imports

* python: flake8 fixes

* python: Make examples compatible with Python 3

* python: Spelling fixes
2016-08-30 10:16:17 +08:00
Ville Skyttä
b4c139f19b Spelling fixes 2016-08-27 02:34:33 +03:00
wing328
39e0e22c57 Merge pull request #3534 from arnested/php-enums-in-containers
[PHP] Fix enum validation in container setters
2016-08-08 18:29:44 +08:00
Joel Meador
950fb43fdf fix spelling in ruby ApiClient: Configuraiton -> Configuration 2016-08-05 14:36:08 -04:00
Arne Jørgensen
4008054209 [PHP] Regenerate petstore samples 2016-08-05 11:25:49 +02:00
Arne Jørgensen
aacc235665 [PHP] Regenerate petstore samples 2016-08-01 11:48:52 +02:00
Arne Jørgensen
0f8e1f8105 [PHP] Client properties validation #3457 (#3480)
* [PHP] Avoid validation of unset, optional parameters

Fixes #3457.

* [PHP] Regenerate petstore samples
2016-08-01 15:24:47 +08:00
wing328
069a6b2917 fix defeault rspec test for ruby, update security petstore 2016-07-14 18:22:01 +08:00
wing328
0986acd2a6 Merge pull request #3359 from sinofool/master
Not compare Java String with "=="
2016-07-13 20:50:36 +08:00
wing328
8da6e0a533 fix csharp enum naming 2016-07-13 19:11:22 +08:00
wing328
e2d74de6ca fix double hyphen in c# generator 2016-07-13 18:16:52 +08:00
Bochun Bai
f75a42f810 Remove more Java String comparison using "==" 2016-07-13 18:06:45 +08:00
wing328
394840e352 Add more security samples (#3344)
* add line break test to petstore-security-test.yaml

* add objc/swift security testing

* add go,scala,qt5cpp for security test

* add security test for typescript

* fix go security issue, fix consumes,produces line break
2016-07-12 19:51:28 +08:00
Daniel Ge
b16eda17e8 Improve error message for connection failures
Previous ApiException message would simply print out the result of the
`curl_getinfo($curl)` call, which might be useful only if the developer
actually wanted very low-level information from curl about why a call
failed. The new message should print out a higher-level but more
informative, human-readable message. If necessary for debugging, the
ApiException's responseObject is set to the `curl_getinfo($curl)`.
2016-07-06 12:09:41 -07:00
Daniel Ge
20448dd9e3 Bump and regenerate PHP sample 2016-07-06 12:09:11 -07:00
wing328
2464633368 better handling of multiline comments for all lang 2016-07-02 16:25:55 +08:00
wing328
3ff5dce25b Merge pull request #3255 from arnested/php-security-tests-pom-xml
Add pom.xml for executing PHP Swagger Petstore Security Client tests
2016-07-02 11:03:13 +08:00
Arne Jørgensen
a4ec29000a [PHP] Regenerate petstore samples 2016-06-30 07:12:28 +02:00
Arne Jørgensen
52952e4ace Add pom.xml for executing PHP Swagger Petstore Security Client tests
Following #3224 this adds a `pom.xml` for executing `mvn
integration-test` on the PHP Swagger Petstore Security Client tests.

The `pom.xml` is identical to the one in
`samples/client/petstore/php/SwaggerClient-php/pom.xml` with only name
and artifactId changed.
2016-06-29 22:56:27 +02:00
wing328
9ee10e2397 Merge pull request #3249 from wing328/csharp_security_fix
[C#] better code injection handling for C# API client
2016-06-29 23:59:24 +08:00