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

Implement linter to warn for required fields in body #4

Open
markweitzel opened this issue Jan 13, 2023 · 0 comments
Open

Implement linter to warn for required fields in body #4

markweitzel opened this issue Jan 13, 2023 · 0 comments
Labels
good first issue Good for newcomers linter

Comments

@markweitzel
Copy link
Member

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.

@markweitzel markweitzel added good first issue Good for newcomers linter labels Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers linter
Projects
None yet
Development

No branches or pull requests

1 participant