This fixes issue #3796 for JavaSpring. It's a very straightfoward extension
of #5120 for the JavaSpring generator (that PR was just for the Java generator).
* fix map as query parameter, use RequestPart instead of RequestParam in
FormParams, add filename for parameters of type file
* fix brace
* fix tests
* run bin/windows bat files
* test if this solves linending problem part 1
* test if this solves linending problem part 2
* test if this solves linending problem part 3
* test if this solves linending problem part 4
* test if this solves linending problem part 5
* test if this solves linending problem part 6
* manually set back version in pom
* update spring samples
Co-authored-by: William Cheng <wing328hk@gmail.com>
* add Deprecated in kotlin dataClass
* add deprecated in CodegenProperty
* format (Column limit: 100)
* set property.deprecated
* add test
* run ./bin/kotlin-springboot-petstore-all.sh
* trim space
* [Slim4] Support byte data format
* [Slim4] Support date and date-time data formats
* [Slim4] Support password data format
* [Slim4] Support uuid data format
* [Slim4] Fix test of password format mocking
'00000' is numeric type, because PHPUnit doesn't make strict type
comparison.
* [Slim4] Fix data format key in object mocking
* [Slim4] Support binary data format
* [Slim4] Support email data format
* [Slim4] Base64 encode binary format output
Raw bytes string breaks PHP stdout output, so I've decided to use base64
encoding format for binary format too.
* [Slim4] Refresh samples
* [aspnetcore] Fix duplicate generation of enums
Fixes template issue where enums defined within a class were generated
regardless of whether they were a complexType (externally defined
"model") or an inlined enum.
* [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.