Documentation error: Request Body shows [undefined] in multiple endpoints

Aberta
#474 3 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 2 dias

Ninguém assumiu esta issue ainda.

  • #657 de @singhvishalkr — fechado sem integrar

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
45/100
Tipo de issue
Documentação
Clareza
Razoavelmente clara
Status de atividade
Estagnada
Stack de tecnologia
typescript
Domínio
api, documentation

Direção de pesquisa

Comece pela documentação do endpoint de exportação em directus.io/docs/api/utilities#export-data-to-a-file e inspecione outros endpoints que exibem [undefined]. Reproduza a exibição e o erro de campo ausente no Postman e, em seguida, rastreie como cada schema de Request Body é representado. Está concluído quando os endpoints afetados exibirem sua estrutura real de body e os campos obrigatórios, incluindo query.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

Describe the Bug

In the official Directus documentation (example: https://directus.io/docs/api/utilities#export-data-to-a-file), the Request Body section incorrectly displays [undefined].

This issue is not limited to the export endpoint — it also occurs in other endpoints across the documentation, making it unclear what parameters are required.

When testing the endpoints, if required fields (such as "query") are not provided, the API responds with errors like:
Invalid payload. "query" is required

This indicates that the documentation is not showing the actual required body structure.

Expected behavior

  • Documentation should display the correct request body schema for each endpoint.
  • Required fields (e.g., "query") should be clearly indicated with their format.

Current behavior

  • Request Body sections show [undefined].
  • The API rejects requests when mandatory fields are missing.
To Reproduce

Steps to Reproduce

  1. Open Postman.
  2. Make a request to the affected endpoint (e.g., export) using valid credentials.
  3. Check the official documentation for the endpoint.
  4. Observe that the Request Body is displayed as [undefined].
  5. Send the request without "query" and see the error response.
Directus Version

v11.8.0

Hosting Strategy

Self-Hosted (Custom)

Database

No response

Linguagem predominante
TypeScript
Estrelas
24
Forks
90
Merge médio
3d 22h
PRs com merge (30d)
19

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de directus/docs

Todas as issues de directus/docs

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.