docs for operations should link to their response types

Abierto
#715 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Documentación
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
rust

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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?
Lenguaje dominante
Rust
Estrellas
1k
Forks
142
Merge medio
19 h 13 min
PR fusionados (30 d)
16

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de oxidecomputer/progenitor

Todos los issues de oxidecomputer/progenitor

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.