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

Add updateAnnotatedFile property #139

Merged
merged 4 commits into from
Oct 31, 2024

Conversation

aoisupersix
Copy link
Contributor

Fixes #131

This PR adds updateAnnotatedFile property to @OpenApi() annotation.

When the timestamp is forcibly added or updated to the @OpenApi() annotated class, frequent differences occur in source control. Therefore, by adding the updateAnnotatedFile property, if false is set, the addition or update of the timestamp will not be performed.

@Openapi(
  ...
  updateAnnotatedFile: false,
)

Default is true to keep current behavior.

The operation was checked by uncommenting in openapi-generator/pubspec.yaml.

# dependency_overrides:
#  openapi_generator_annotations:
#    path: ../openapi-generator-annotations

@Rick-VA
Copy link

Rick-VA commented Apr 5, 2024

We tested it on 5 APIs, and it worked perfectly. Thanks

@DmitrySboychakov
Copy link
Contributor

Also interested in this. When this can be merged?

@tjarvstrand
Copy link

Great change! Please merge :)

@aoisupersix
Copy link
Contributor Author

This PR is blocked because it requires a review from a user with write permissions.
Also the package update process will likely be necessary after merge.
Therefore need to wait for owner (@gibahjoe) to respond.

139

@tjarvstrand
Copy link

@aoisupersix Yes, sorry, my comment was meant for @gibahjoe :)

@gibahjoe
Copy link
Owner

I am soo sorry, been busy with studies all year.

The downside of this PR is that you will need to manually update the file containing the annotation before build runner will pick it up again next time there are changes. But I understand why you need more control.

@gibahjoe gibahjoe merged commit 0d04c85 into gibahjoe:master Oct 31, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generator adds comment into version controlled source file containing the Openapi annotation
6 participants