Add Body & Response Examples

Open
#14 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
30/100
Issue type
Documentation
Clarity
Needs clarification
Activity status
Stale
Tech stack
openapi, typescript
Domain
api, documentation

Research direction

Start by reviewing the current OpenAPI definitions for the Items and other key endpoints, then compare them with the older API docs. Define which simple and relational body and response examples, and which use cases, are in scope; done means the selected endpoints expose useful examples.

Written by the indexing model from the issue text.

Description

Missing body and/or response examples on many of the key endpoints.

E.g. Items:

  • missing body payload examples for simple and relational payloads
  • missing response examples for simple and relational responses

Understanding that the dynamic and agnostic nature of Directus makes this difficult, it is still extremely helpful to see the structure of the body and responses via an example.

Perhaps 1 or more example use cases could be used to demonstrate the usage of the endpoints:

  • simple CMS webpage
  • simple Product Management
  • could align with templates available on cloud?
  • if more than one use case option, include a way to choose the example

Just some ideas. Mostly need examples similar to the older API docs.

Dominant language
TypeScript
Stars
9
Forks
8
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from directus/openapi

All issues in directus/openapi

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.