* [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] Pass context to client middleware
When creating a client with middleware, pass the context.
This allows users to pass contextual data about the requests through to the
client middleware.
* 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 issue with multiple tags on an operation generating duplicate methods.
* [Rust Server] Add test case yaml with multiple tags on a single operation.
* [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
* Remove test file erroneously checked in
* [Rust Server] Fix no features build
- Need serde_json for no-features build for undefined value structures
- Don't include `IntoHeader` type and implementations if we aren't including the client/server features
- Don't export the `IntoHeader` type at all - it's internal
* Update samples
* [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] Handle text/xml correctly
Treat application/xml the same as text/xml as per RFC 7303
* [Rust Server] Add test for text/xml
* Update samples
* Run rustfmt over rust-server output
Automatically run rustfmt over rust-server output if --enable-post-process-file is set
* Update samples
* Add note about configuring post processing
* [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] Suffix reserved words with _
Suffix reserved words with an underscore instead of prefixing them.
This follows convention in the Rust community, as prefixing with an underscore
indicates an unused variable in Rust.
* 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