Skip to content

Commit

Permalink
Merge pull request #336 from snyk/chore/docs-for-optionals
Browse files Browse the repository at this point in the history
chore: add docs around optional/null values in a PATCH
  • Loading branch information
carissadean authored Sep 5, 2022
2 parents e739e5e + 4a153e6 commit a641c5a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/standards/rest.md
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,11 @@ With examples, it's clear what to expect. One could even run a mock API server w

Without examples, as an end-user I don't have much context here to know what these fields' values are going to look like! Links are most likely URLs, not just strings!

## PATCHing data - Optional/Null values

- If fields, objects and/or relationships are not supplied in the request they are not modified.
- To unset an existing attribute supply a value of `null`.

## Making the OpenAPI specification available

Every service in the v3 API must publish endpoints that list available versions and fetch specific published versions of the OpenAPI spec for all resources provided by that service to v3. These paths may be prefixed if needed (some services may provide other APIs in addition to v3).
Expand Down

0 comments on commit a641c5a

Please sign in to comment.