* [rust-server] Add support for Bearer auth
- Added bearer auth to the security features for rust server
- Supplemented the basic auth condition in the context template to handled basic auth and bearer auth separately.
- Repurpose an exising sample to confirm the code generation works as expected.
* Update docs
* Update readme for bearer tokens
* [Rust Server] Support Cargo Metadata Configuration
This adds support for publish, repository, documentation and homepage metadata.
* [Rust Server] Test Cargo Metadata configuration
* [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] 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