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

feat: BREAKING CHANGE add equality, hashcode and toString helper overrides to autogenerated code #1927

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

td-famedly
Copy link
Member

autogen script change: famedly/dart_openapi_codegen#50

@td-famedly td-famedly requested a review from a team as a code owner September 30, 2024 15:25
Copy link
Member

@nico-famedly nico-famedly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about the toString stuff. We just had an access token leak and we also now might log user data more easily. I think we really should have to opt in to log stuff like that by default?

bool operator ==(Object other) =>
other is GenerateLoginTokenResponse &&
other.expiresInMs == expiresInMs &&
other.loginToken == loginToken;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably not be in the logs by default?

bool operator ==(Object other) =>
other is ThreePidCredentials &&
other.clientSecret == clientSecret &&
other.idAccessToken == idAccessToken &&
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we really log this via toString by default?

@override
bool operator ==(Object other) =>
other is LoginResponse &&
other.accessToken == accessToken &&
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably shouldn't log this via toString by default either.

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

Successfully merging this pull request may close these issues.

2 participants