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

Make required fields required #100

Open
rhamzeh opened this issue Sep 29, 2023 · 0 comments
Open

Make required fields required #100

rhamzeh opened this issue Sep 29, 2023 · 0 comments
Labels
breaking-change Will result in a breaking change to the API

Comments

@rhamzeh
Copy link
Member

rhamzeh commented Sep 29, 2023

This includes:

  • In WriteAuthorizationModelRequest, schema_version should be required
  • In ReadAuthorizationModelRequest, id should be required
  • In TupleKey all are required
  • All responses

These currently cause a lot of DX problems in the SDKs, as the generated types show that the fields are optional.

E.g. In the typescript SDK, users have to check for nullability on responses even if we know it will never be null, and they mistakenly think that some fields are optional in requests even when they are.

In the Go SDK, we have to make the fields accept pointer instead of values because of this when it is unnecessary

@rhamzeh rhamzeh added the breaking-change Will result in a breaking change to the API label Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Will result in a breaking change to the API
Projects
None yet
Development

No branches or pull requests

1 participant