* [Rust] Consider error statuscodes to be errors
* [Rust] Introduce 'ApiError' type for 4xx/5xx resp
This updates the previous commit which added an 'ErrorStatus' variant to
an 'ApiError' variant.
It does not specialize the error to the specific possible error
responses yet, rather returning a 'serde_json::Value' for any case.
This will lose any error messages which cannot be parsed as json and
instead return a json-parse error.
A future change should update the generated signatures such that the
returned future's error type is specialized to the specific errors that
may be returned by that api (and possibly a catchall json::Value still).
* [Rust] Regenerate petstore samples
* [Rust] Add error example to petstore sample
* [Java] #3024 - Add build-helper-maven-plugin version to retrofit client template
* [Java] #3024 - Add build-helper-maven-plugin version to feign client template
* [Java] #3024 - Add build-helper-maven-plugin version to jersey client template
* [Java] #3024 - Add build-helper-maven-plugin version to resteasy client template
* Updated the version of Scalatra to the latest (2.6.2)
- Updated Scalatra 2.6.2 (latest)
- Updated Scala 2.12.4
- Updated sbt 1.1.0
- Reduced dependent artifacts to a minimum
- Cleaned up build.sbt
- Changed the package name from client to server
- Set log output (logback)
- Updated web.xml for servlet 3.1
* rename package 'com.wordnik' -> 'io.swagger'
* Added rolling file appender to logback.xml
* Disable creation of empty json fields and fields for primitives which were not set, but using default values
modelnamePrefix will be the one passed from command line or SWG if none
* Updates after review
Also common http files are splitted
Update Petstore examples
* Small Fixes for cleaning up arrays of arrays/maps
* Changes
- Api Body pass by Reference, avoid seg fault due to deletion of auto constructed object passed as parameter.
- Support Maps and Arrays upto a depth of 2
- Refactor Helpers to handle Maps and simplify code
* Remove size check due to possible incorrect type
* Update PetStore Examples for Qt5 C++ and small fixes for QDate/QDateTime
* Updates after review. Fixes typo and remove usage of auto keyword.
* Restored usage of auto keyword.
* Regenerate test/UserApiTest.php
The same implementation as testLoginUser() is in tests/UserApiTest.php
* Delete test/Client/ObjectSerializerTest.php
The same implementation is in tests/ObjectSerializerTest.php
* Update Petstore sample
- bin/php-petstore.sh
- bin/security/php-petstore.sh
* #7359 Fix - use reflection to instantiate non-generated class (#7360)
* add tests for java vertx petstore
* add swagger example to README.md (#7368)
* Fix assignment of new object instance to variable
Fixes `Error in foobar$fromJSONString(s) : object 'CategoryObject' not found`
Discussion in https://github.com/swagger-api/swagger-codegen/issues/6520#issuecomment-357132746 ,
thanks @wing328 for encouraging.
* [scala] Escape reserved words, support Array[Byte]
Previously, Array[Byte] was compiling to ArrayByte. This provides a type
mapping to output the correct type.
This also escapes reserved words with grave accents, as is most common
in Scala. Escaping with an underscore prefix breaks serialization (in
Jackson, for example) unless templates are modified manually. Escaping
using grave accent should unblock most serializers from requiring
template modifications.
* [scala] Regenerate integration test outputs
* [scala] Regenerate samples
* [scala] Remove unused imports in related codegen files
* [Scala] Fix async helper methods when body is optional (#7274)
* [Scala] Fix async helper methods when body is optional
Closes#7272
* Update petstore sample
* Standardize all isRestfulxxx methods.
Change 'equals' method to 'equalsIgnoreCase' for isRestfulIndex method in Operations. This matches isRestfulCreate, isRestfulShow, isRestfulDestroy
* [scala] Fix default values in scala client
This uses consistent logic for optional types with default values in the
scala client. Also, uses Option(default) instead of Some(default) to
guard against people defining defaultValue = null. Option(null) becomes
None while Some(null) defines a null value explicitly and will break
maplike operations.
* [scala] Regenerate client sample
* [scala] Add missing json4s import, which will be added by another PR but allows current samples to generate
* [scala] Include integration tests for required attributes support
* [scala] Support string types with formats
This adds support for better support of type=string and
format={date,date-time,binary,byte}. Previously, binary and byte were
inconsistently defined as strings rather than byte arrays, while
date/date-time were parsing default values into formats that did not
match OpenAPI/Swagger 2.0 specifications for full-date and date-time.
We may want to consider pulling in json4s-ext to support wider date
formats and moving to date=LocalDate and date-time=ZonedDateTime.
This will have breaking changes for consumers expecting binary/byte to
be strings rather than byte arrays.
* [scala] Unique parameter names in integration test, to avoid seemingly conflicting names
* [scala] Regenerate client sample
* Sort file listings in AssertFile.java
Per File#list() javadocs:
There is no guarantee that the name strings in the resulting array
will appear in any specific order; they are not, in particular,
guaranteed to appear in alphabetical order.
I'm unable to repro directory listing failures on OS X High Sierra or
Ubuntu 16.04 under Parallels, so it's not clear to me if listing order
is indeterminate per-platform or the behavior is just not defined and
up to the platform's installed runtime. Sorting the array of strings
prior to comparison should resolve this issue on every platform/runtime.
* [scala] exclude api tests for integration test gen script
Script should match options in the integration test class
* [scala] Temporarily disable client integration tests
CI doesn't seem to pick up template changes in integration tests.
Disabling scala client integration tests, pending investigation of the
issue.
* [scala] Remove redundant json4s import
* [scala] Regenerate integration test
* [scala] Regenerate sample
Rustfmt is widely accepted in the rust community. The actual style it
enforces is not completely stable, but running a reasonably recent
rustfmt and reading the short rfc-based style guide seems better than
nothing by a long shot.