Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

document design principle around nullability #20

Open
baywet opened this issue Aug 25, 2023 · 0 comments
Open

document design principle around nullability #20

baywet opened this issue Aug 25, 2023 · 0 comments
Assignees

Comments

@baywet
Copy link
Member

baywet commented Aug 25, 2023

We keep getting questions about nullability when we project the client.
We should document the facts that:

  • we project a nullable return type for the root of the response, even if the description doesn't say it's nullable. This is so the client can survive change in service behaviour without being refreshed. (e.g. the service starts returning 204)
  • we project properties on models as nullable. This is to account for services that allow selection/projection via query parameters where the returned payload might omit described properties.
  • we project request bodies as nullable or not depending on the required property in the description
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants