3 Commits

Author SHA1 Message Date
Benoît Courtine
dd08ea7a6b [Rust] [Fix #3052] Handle optional and nullable parameters (#4016)
This PR includes theses changes:

- Handling "optional" parameters is not optional anymore. Handling an additional parameter for it makes templates more complicated, and IMO, it is not worth it (as discussed in issue, it is an "acceptable" breaking change).
- Optional parameters are handled everywhere: path params, query params, form params... Generated sample code compiles (both hyper and reqwest libraries).
2019-10-15 13:59:37 +01:00
Gabriel Féron
f96ed69c26 Add rust discriminator (#3895)
* Add support for the `discriminator` feature of OpenAPI 3, and implement it with `enum` in Rust
* Add all missing explicit `dyn` to trait types to remove warnings
* Add missing re-export for properties that are enum (was missing from #2244).
2019-10-06 17:35:14 +01:00
Benjamin Gill
eb793ae279
[rust] Make it easier to test rust client generator (#3543)
As we discovered in #3463, there are various bits of the rust client generator that are currently untested. This PR adds tests for various generator-specific types, and also files.

Follows the example of the rust-server generator for making it easy to add new test specs. This should make it easier for future contributors to make sure that their contributions are tested
2019-09-27 16:27:28 +01:00