docs for operations should link to their response types

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

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Documentazione
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
rust
Ambito
documentation

Direzione di ricerca

Start with the generated documentation for the instance_list operation and trace the links from InstanceList through send() to its response type. Define completion as linking the operation directly to its response type; the issue also raises separate questions about runnable examples, stream() for pagination, and links for arguments, which need scope decisions.

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

Descrizione

Today we show something like this:

fn instance_list(&self) -> InstanceList<'_>
List instances

Sends a GET request to /v1/instances

Arguments:

limit: Maximum number of items returned by a single call
page_token: Token returned by previous call to retrieve the subsequent page
project: Name or ID of the project
sort_by
ⓘ
let response = client.instance_list()
   .limit(limit)
   .page_token(page_token)
   .project(project)
   .sort_by(sort_by)
   .send()
   .await;

Fine, but what does that return? To figure it out, I have to click InstanceList, then click send, then click its return type. It would be useful if we had that return type linked directly from the docs.

Some other nits here:

  • could we make the example runnable / testable? (even if it's kind of janky)
  • should paginated endpoints (such as this one) show the use of the stream() call rather than send()?
  • should each of the arguments link to the appropriate type or to the function within the builder?
Lingua principale
Rust
Stelle
1k
Fork
142
Merge medio
19h 13m
PR unite (30g)
16

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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 oxidecomputer/progenitor

Tutte le issue di oxidecomputer/progenitor

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.