* [#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
* 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
* [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
* fixes#4432 Adding support for the modifier within the Jaxb XMLElement annotation. Updated README with JaxbAnnotations configuration option.
* #4432 Running the Petstore files
* 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>
* 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
* 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 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
* 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
* 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
* 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
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)`.
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.