APIPatterns / APIPatterns/PatternsLibrary

Implement linter to warn for required fields in `body`

Open
#4 0 comments 0 reactions 0 assignees View on GitHub
good first issue linter
Dominant language
TypeScript
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

We are exploring the use of required fields in request/response bodies. Often, these can be very problematic, e.g. if something changes from optional to required, you want to return/send only a 'partial' resource, etc. Because of versioning, client and server code has to handle changes to the resource structure anyway. Making everything optional enables greater flexibility in what can flow over the wire.

> Mark a field as `required` only when it must absolutely be present on every request/response for every version of the API.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.