* [Rust][Server] Upgrade hyper from 0.13 to 0.14, swagger-rs from 5.0.2 to 6.1.0
* Also upgrade tokio from 0.2 to 1.14
* Re-add JavaClientCodegenTest.java
* Fix incorrect slashes due to wrong generation
* Spelling fix: failuare -> failure
* Upgrade more packages
* Commit generated code
* Fix typo
Co-authored-by: Foorack / Max Faxälv <max@foorack.com>
* [Core] Inline Model Resolution of Enums
Enums need to be named types, so handle them as part of inline model resolution
* [Rust Server] Handle models starting with a number correctly
* [Rust Server] Additional trace
* [Rust Server] Add support for oneOf/anyOf
* [Rust Server] Update supported features
* [Rust Server] General template tidy up
* [Rust Server] Implement IntoHeaderValue for wrapped data types
* [Rust Server] Convert from string correctly
* [Rust Server] Test for anyOf/oneOf
* Update samples
* Update docs
* [Rust Server] Fix server example on non-Linux
The server example is broken because it tries to import `use openssl::ssl::SslAcceptorBuilder;` unconditionally when it won't be present on MacOS, Windows or iOS and then conditionally provides `create` causing compile errors on the aforementioned platforms.
To fix, we simply move the condition from the function to the import and all is happy again :)
* Update Samples
Co-authored-by: William Cheng <wing328hk@gmail.com>
* [Core] Record content type for parameters
* [Rust Server] Support query parameters in JSON
* [Rust Server] Add test for JSON query parameter
* Update samples
* [Rust Server] Fix RustServerCodegen type: object example "Disabled because there's no example" issue.
* [Rust Server] Add test case yaml with "Disabled because there's no example" issue.
* [Rust Server] Fix example-client-main param.example character escaping issue with raw string.
* [Rust Server] Add test case yaml new generated code after fix.
* [Rust Server] Fix Rust 1.39+ "Box<Future" and "as &Has" compile issue
* [Rust Server] Fix Rust server side pathRegEx and baseName not match issue
* [Rust Server] Add test case yaml with path parameter.
* [Rust Server] Support complex query parameters
* [Rust Server] Remove unused extern crate
* [Rust Server] tokio should be a dev-dependency
* [Rust Server] Add test for complex query params
* Update samples
Co-authored-by: Matt Williams
* [Rust Server] Don't use structs in models
This avoids namespace clashes between model names and types used.
* [Rust Server] Handle models named after results
* [Rust Server] Add test for result models
* Update samples
* [Rust Server] Make parse error displayable
Change error type to be displayable to prevent compile errors
* [Rust Server] Add test for enum in path
* Update samples
* [Rust Server] Support RFC 7386
Support application/merge-patch+json as defined by RFC 7386 -
https://tools.ietf.org/html/rfc7386
Handle exactly the same as application/json.
* [Rust Server] Add test for RFC 7386
* Update 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.
- 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
Fix Codegen Operation Scope Consistency
- Filter scopes based on operation
- Partially revert #1984 to not rely on custom attributes as to whether scopes exist
- Fix filtering global authentication schemes
[Rust Server] Support multipart/form_data
- Support multipart/form_data in the Rust Server
- Add a new test API to test the change.
- Update the examples to match
- Restore XML namespace support
- Remove non snake case rust warning for xml wrap_in methods
- Add XML rust-server tests
- Fix wrapping XML arrays when a property of another object
- Run all tests, not just those for OpenAPI 2.0
- Force wrapping for rust-server