Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Openapi SDK async methods in Clap subcommands

Aperta
#9 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
45/100
Tipo di issue
Documentazione
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
rust
Ambito
cli

Direzione di ricerca

Start with the Clap command example in the issue and identify the SDK’s async entry points and the repository’s existing CLI or async examples. The issue asks how to call async SDK methods from a synchronous CLI; done means providing a working structure for the fetch subcommand and showing how to run the async call.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

I have CLI commands with Clap:

let matches = App::new("CLI").get_matches();
if let Some(_) = matches.subcommand_matches("fetch") {
    sdk.get_users().await.unwrap();
}

Compiling fails because async calls are not allowed in main. How can I structure async SDK calls in a synchronous Clap CLI?

Lingua principale
Rust
Stelle
29
Fork
3
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di openapi/openapi-rust-sdk

Tutte le issue di openapi/openapi-rust-sdk

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.