* [Slim4] Add new method to Mocker interface
* [Slim4] Add implementation and tests for new method
* [Slim4] Add test fixture to encrease code coverage
* [Slim4] Add ref support to mockArray method
* [Slim4] Add mockFromRef method
* [Slim4] Add ref support to mockObject method
* [Slim4] Add ModelInterface
* [Slim4] Refresh samples
* [Slim4] Add ref support to mockFromSchema method
* [Slim4] Run all test suites by default test command
As it turnes out to generate coverage report for a whole project I need
to run all test suites at once.
* [Slim4] Fix enum option of string mocking
* [csharp] Change enum value suffix name
'enumValueNameSuffix' and 'enumNameSuffix' were introduced in a recent
commit. This changes 'enumValueNameSuffix' to 'enumValueSuffix' to
better differentiate between the two options. This also adds a caveat to
the default description which explains that this flexibility may cause
issues when used by client generator.
* [csharp][aspnetcore] Regenerate samples
[Rust Server] Hyper 0.12 Support
- Hyper upgraded to Hyper 0.12.
- NewService becomes MakeService
- Request on MakeContext is not parameterised - instead, ReqBody, and ResBody are parameterized, and must implement hyper::body::Payload.
- This means that our existing tuples (i.e. (Body, Context)) don't work - instead we have a type ContextualPayload, which implements Payload, and derefs to an inner payload (the body), and contains a context.
- This is handled by the work done in Metaswitch/swagger-rs#63 but has some fall out here as well.
- tokio-proto/tokio-core is no longer supported, and hyper instead depends on tokio.
- Hyper depends on mime 0.3, but multipart depends on mime 0.2, so we now import both
- Hyper TLS 0.2 and native-tls 0.1
- Use Swagger Support library 3.x
- Futures are now Send. This forces ApiImpl to be need to Send as a result, and all forces Clients to be Send + Sync.
[Rust Server] Fix panic handling headers
If we have an API which has multiple auth types, we may panic. This is because
in Hyper 0.11, the following code will panic:
```
use hyper::header::{Authorization, Basic, Bearer, Headers};
fn main() {
let mut headers = Headers::default();
let basic = Basic { username: "richard".to_string(), password: None };
headers.set::<Authorization<Basic>>(Authorization(basic));
println!("Auth: {:?}", headers.get::<Authorization<Bearer>>());
}
```
as it mixes up an `Authorization<Basic>` and `Authorization<Bearer>` as both
have `Authorization:` as the header name.
This is fixed by using `swagger::SafeHeaders` added in
https://github.com/Metaswitch/swagger-rs/pull/90
* [scala] Set support for unique arrays
This includes and builds upon community contribution for better Set support in Scala.
It makes property + model work as expected with Set and default values
across all Scala generators. Included tests to account for new changes.
This also reverts the community contribution to remove ListBuffer
imports and change the default for array to ListBuffer. Users should use
the instantiation types map to modify the desired array instantiation
type. Any new default should target a new minor release after community
discussion, as it affects all existing SDKs generated with
openapi-generator.
* [scala] Improve default handling of monadic collection type
* [scala] Regenerate samples
* Update ScalaPlayFrameworkServerCodegen.java
Scala Play defaulted to List and should continue to do so.
Co-authored-by: František Kocun <frantisek.kocun@gmail.com>
* Fix for Issue #2205
Because when we have tags on OpenAPI Specification, there can be more than 1 Feign Beans being generated and the title field is share by all the clients. This makes the code to stop working in runtime.
Here is a PR which uses the classVarName instead, which follows the standards and should be enough to solve this issue.
For more info please refer to: https://github.com/OpenAPITools/openapi-generator/issues/2205
* fix java feign parameter request name (#4883)
* update sprign cloud feign sample
* [JAVA][SPRING][2195] added missing getter for enum value (#2346)
* [2195] added missing getter for enum value
* updated samples
* re-generate spring samples
* Removed @JsonValue from toString and regenerated samples
* re-generate spring samples
Co-authored-by: Esteban Gehring <esteban.gehring@gmail.com>
* update samples
* [kotlin][client] make Request date converter toJson as default
* [kotlin][client] update windows scripts
* [kotlin][client] update docs
* [kotlin][client] update scripts
* [kotlin][client] update scripts
Co-authored-by: Filipe Manuel Couto Pinheiro <filipemcpinheiro@gmail.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
Co-authored-by: Lukáš Vasek <bilaak@gmail.com>
Co-authored-by: Esteban Gehring <esteban.gehring@gmail.com>
* Example of broken multi-level hierarchy
* Support for multiple levels of hierarchy in model objects
* Support for multiple levels of hierarchy in generators
* Regenerated samples
* Temporarily skip scalaz sample verification, which is having issue with Java version in CI container
* Re-enable scalaz in verify samples
Co-authored-by: Rob Oxspring <roxspring@imapmail.org>
- Ensure response IDs are unique, even if the first sentence is identical
- Handle responses where different responses produce a different type of data
- Use the correct mime type for plain text and byte streams
- Tidy up whitespace in client-mod.mustache
- Specify locale for String.format
- Add test for multiple response types
- Update samples
* [Slim4] Add integration tests
* [Slim4] Remove unnecessary syntax check script
Composer package called "phplint" processes the same syntax check and
even faster. It can use cache when files hasn't been changed.
* [Slim4] Exclude composer.lock from codebase
Travis CI fails, it cannot install dependencies from lock file under
different PHP(7.1.33) version.
* Switches python generators to use pytest, useNose CLI option added if to allow nose to be used instead
* Adds ensure-up-to-date changes
* Adds setup.cfg to python clients so we can configure nose when useNose=true
* Adds fix for python-aiohttp testing, adds files missing from ensure-up-to-date
* Expanding CodableHelper with a more customisable dateFormatter and JSON en-/decoder.
* Ran ./bin/swift4-petstore.sh
* Ran ./bin/swift4-petstore-all.sh again after merge from master.
* Ran ./bin/swift4-petstore-all.sh again after building.
* Ran ./bin/swift4-petstore-all.sh again after rebase latest from upstream master.
* sync master, update samples
* Built and ran ./bin/swift4-petstore-all.sh
* Re-adding code which disappeared in rebase from master.
* Fixed test
* [swift] remove old classes
* [Slim4] Add OpenApiDataMocker interface template
* [Slim4] Implement scalar types in data mocker
* [Slim4] Cleanup, remove unused variables
I've rejected the idea to keep Composer dependencies in Java/codegen
variables at some point of time. It seems that after Git rebase I forgot
to delete them.
* [Slim4] Refresh samples
* [Slim4] Add pattern option to mockString method
[ref] https://tools.ietf.org/html/draft-wright-json-schema-validation-00#section-5.8
* [Slim4] Add enum option to mockString method
[ref] https://tools.ietf.org/html/draft-wright-json-schema-validation-00#section-5.20
* [Slim4] Refactor mockInteger and mockNumber tests
* [Slim4] Refactor mockString tests
* [Slim4] Use null coalescing operator
* [Slim4] Implement enum option in mockString method
* [Slim4] Add tests for enum option of mockString
* Fix multi-part binary array strings
Multi-part binary array strings as outlined in #3139 resulted in `MultipartFile` rather than `List<MultipartFile>`. This PR attempts to resolve this by adjusting the templates.
Two tests have been added: one for `spring-boot` and one for `spring-cloud`.
Resolve#3139
* Fix multipart file name and description
* Handle array of MultipartFile for delegate
* Update samples due to file description being picked up
* Upload result of bin/spring-stubs