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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

rekire
Copy link

@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: fe207f9

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.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

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
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
Author

rekire commented May 22, 2024

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

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