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

Generate documentation for copyWith and toJson #1069

Merged
merged 9 commits into from
Jul 9, 2024
Merged

Generate documentation for copyWith and toJson #1069

merged 9 commits into from
Jul 9, 2024

Conversation

rekire
Copy link
Contributor

@rekire rekire commented Apr 12, 2024

Resolves #1068

I tried to minimize the changes. This PR also corrects the position of the @override for some cases where the override was above the documentation.

Copy link

changeset-bot bot commented Apr 12, 2024

⚠️ No Changeset found

Latest commit: 839bc3b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@rekire
Copy link
Contributor Author

rekire commented Apr 16, 2024

@rrousselGit I noticed that you merged a dependabot PR, so you are working today. Is there anything in my PR I should change?

return _maybeOverride(
'''
@JsonKey(ignore: true)
return '''
Copy link
Owner

Choose a reason for hiding this comment

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

Sounds like _maybeOverride should have an optional doc parameter. Otherwise LGTM

Copy link
Owner

@rrousselGit rrousselGit left a comment

Choose a reason for hiding this comment

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

There appear to be a few missing places with regards to copyWith documentation.

We need to document the call method of the object returned by get copyWith.
This will provide doc when writing copyWith(...).
Currently docs appear with .copyWith, but not .copyWiht(...)

We also will want doc for deep copy, such as value.copyWith.field(...)

@rekire
Copy link
Contributor Author

rekire commented May 22, 2024

Sorry I forgot this comment. I'll check that this weekend

@rrousselGit
Copy link
Owner

Do you still wish to work on this?

@rekire
Copy link
Contributor Author

rekire commented Jul 8, 2024

To be honest I totally forgot about this PR. I need to check my PR to find out what changes are still required. Might be someone else would be quicker, but I want to finish what I have started. Thank you for the reminder.

@rekire
Copy link
Contributor Author

rekire commented Jul 8, 2024

@rrousselGit did I catch all the missing parts? The last time I checked the generated code everything was documented. I am not sure why I missed those.

@rrousselGit
Copy link
Owner

It sounds good. Do you mind refactoring the doc into a getter on data? So that we don't have multiple duplicates of the same doc in the source.

@rekire
Copy link
Contributor Author

rekire commented Jul 9, 2024

@rrousselGit done

@rrousselGit rrousselGit merged commit 7c0cea5 into rrousselGit:master Jul 9, 2024
7 checks passed
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.

Documenting the generated methods copyWith and toJson
2 participants