feat: scalar-typescript-sdk-rust@0.2.0#1
Open
marclave wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ScalarApi Rust API Library
This crate provides convenient access to the ScalarApi REST API from Rust applications.
It is generated from your OpenAPI document with typed models, async resource methods, pagination helpers, and raw response affordances.
The full generated API reference is available in
api.mdand the operation inventory is available inreference.md.Installation
Usage
Request and Response Types
Request params and response bodies are generated as typed Rust structs and enums with
serdesupport.Methods return
Result<T, Error>and use owned data so generated models are straightforward to pass around.Handling Errors
Non-success responses return generated errors that expose status code, headers, raw response body, and request id metadata when available.
Transport failures are represented separately from HTTP status failures.
Retries and Timeouts
The runtime supports client-level and per-request timeout, retry, header, query, base URL, and idempotency options.
Retryable responses honor
Retry-Afterbefore exponential backoff.Pagination
Paginated operations expose page helpers with data and next-page metadata when pagination is described by the OpenAPI document.
Raw Responses and Custom Requests
Raw response helpers are available when callers need status, headers, or unparsed response bytes.
Per-request options provide an escape hatch for extra headers and query params.
Runtime Features
reqwesttransport with typed request/response models.Requirements
Requires Rust 1.75+ with edition 2021.
Contributions
This SDK is generated programmatically. Manual edits to generated files will be
overwritten on the next build.
SDK created by Scalar