* use Response's type parameter as a marker type for the body, but don't actually deserialize
* make pipeline send generic to improve type inference and reduce need for map_body
* fix doctest
* change read_body/map_body into deserialize_body/deserialize_body_into
* fix issues after rebasing
* refmt and fix compile issue
* rename FromResponseBody to Model
* fix toml spacing
* address pr feedback
* set_ -> with_
* fix formatting again :(
* Refactors most of azure_core to typespec
Little was modified when moving types and functions. Of what little was modified, most types were either separated from unrelated topics - like streams from HTTP - or better consolidated into fewer submodules to avoid complicating the module hierarchy.
`TelemetryOptions` was temporarily removed. Because `ClientOptions` was moved to `typespec_client_core` but telemetry considered Azure-specific by most other Azure SDK languages, we need to figure out how to pass this in an unbranded way. Since it basically just sets the `User-Agent` HTTP header, perhaps we can make it more generic and optional.
* Fix resolution errors on Noop client
* Fix build breaks from dependencies
* Add unconditional checks of Azure retry headers
This restores the checks for Azure-specific headers.
Makes sure these components are always installed when running
`rustup show` or other tools. Adding `rust-analyzer` is questionable,
but enough dev UX uses it's probaby fine and not too slow to acquire on
CI build machines.
* Added content to the readme for Rust Eventhubs - lost more to come
* Fixed readme.md inclusion
* Added content to the readme for Rust Eventhubs; added documentation for the Consumer module
* Added eventhubs to global cspell
* Cleaned up use of EventHubs service name (it's Event Hubs); moved StartPosition to consumer since it's a consumer construct, not a model construct; Cleaned up doccomments around the tree.
* Refactor general implementation into TypeSpec crates
This is part of the unbranding work across languages. For now we have decided to brand around the "TypeSpec runtime" as some other Azure SDK languages have considered.
* Fix build
* Resolve CodeStyle check issue
* Export http_response_from_body from azure_core
* Fix lint, docs errors
* Update azure-autorust to append path and parameters via URL lib
When returning a URL from Client::endpoint the URL contains a tailing slash
in any case. This is handled by the URL lib which will append the tailing
slash to the end upon calling Display::fmt. Therefore formatting the returned
URL from Client::endpoint will result in a duplicated slash, which could cause
some (not all) Azure endpoints to have some trouble.
For example:
Base URL: https://some-app-conf.azconfig.io/
AppConfigUrl: https://some-app-conf.azconfig.io//keys?api-version=2023-10-01
This resulted in a 404 response.
Removing the tailing slash from the URL manually does not solve the problem,
due to the reason mentioned above.
This patch applies a fix to append (set) the formatted path via rust URL lib,
which will handle the duplicated slash (or any other problem).
* Fix Code Style issue
* Fix Code Style issues for doc-comments
---------
Co-authored-by: Heath Stewart <heaths@microsoft.com>
* Update CODEOWNERS
Adding Ronnie to the catch all. Also adding a specific for .github
* Update .github/CODEOWNERS
Co-authored-by: Heath Stewart <heaths@microsoft.com>
---------
Co-authored-by: Heath Stewart <heaths@microsoft.com>
* Add lifetime annotation to ClientMethodOptionsBuilder trait
This allows implementors of the trait to ensure that the lifetime of
context lives at least as long as the trait's implementor.
* remove unused generic type param
* Fix ErrorKind::http_response_from_body() was deleted and this code was never built. This uses the new method
* Fix: unwrap authority_host() as we are trying to store a `Url`
* Fix: `log` was not inclueded in the package dependencies. Use tracing to be consistent with the rest of the SDK
* Add check / tests to build all features in CI to prevent dead code
* Fix warnings hidden behind features
* Formatting
---------
Co-authored-by: Alex Kinnane <17098249+akinnane@users.noreply.github.co>
* Move crates into subdirs under service dirs
The exception in this commit is `typespec`, which will likely be a root
project for RFC 3243 (packages-as-namespaces) with packages thereunder.
* Fix e2e_tests.sh
* Add "root" crate for TypeSpec
Serves as a package-as-a-namespace for RFC 3243:
https://rust-lang.github.io/rfcs/3243-packages-as-optional-namespaces.html.
We may put common types between possible client- and service-side code
generators in here as well.
* Resolve code style lint
* Use non-Microsoft link
Co-authored-by: Timothee Guerin <timothee.guerin@outlook.com>
* Use typespec link in README
---------
Co-authored-by: Timothee Guerin <timothee.guerin@outlook.com>
* Define `Response<T>`
This doesn't actually work because object-safe traits can't have methods with type parameters, so refactoring is needed.
* Define separate `RawResponse`, `Response<T>`
* Fix code style check
* Fix wasm32-only code
* Support hierarchical Context
Conceptually similar to Go, which was also similarly copied for C++. Instead of being hierarchical, however, which introduces complexity into `len`, `is_empty`, etc. - though we might only want those for testing by GA - this uses a `Cow` to copy the `HashMap` only when necessary.
Closes#1655
* Remove `remove`, keep `len` for tests only