Skip to content

fix: Pass props to multi targeting #3107

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

Conversation

xC0dex
Copy link
Contributor

@xC0dex xC0dex commented Oct 10, 2024

Pull Request

The issue or feature being addressed

This PR fixes #2706 by passing the defined Swashbuckle.AspNetCore.props file to the buildMultiTargeting directory, which is used for outer builds (Multi targeting).

Details on the issue fix or feature implementation

The props file defines that the OpenApiGenerateDocumentsOnBuild property is false by default if it's not set. However, this was not set for multi targeting projects. So the document was generated during the build.

@martincostello
Copy link
Collaborator

I guess there's not an easy way to add a test for this, right?

@codecov-commenter
Copy link

codecov-commenter commented Oct 10, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.50%. Comparing base (d11913e) to head (0e7b686).
Report is 6 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3107   +/-   ##
=======================================
  Coverage   90.50%   90.50%           
=======================================
  Files          76       76           
  Lines        3116     3116           
  Branches      515      515           
=======================================
  Hits         2820     2820           
  Misses        296      296           
Flag Coverage Δ
Linux 90.50% <ø> (ø)
Windows 81.80% <ø> (-8.70%) ⬇️
macOS 90.50% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@martincostello martincostello added this to the v6.8.2 milestone Oct 10, 2024
@xC0dex
Copy link
Contributor Author

xC0dex commented Oct 10, 2024

I guess there's not an easy way to add a test for this, right?

You're right. It’s hard to test as it happens during the dotnet pack command.
However, I tested it locally by publishing Swashbuckle and using the package in a multi target project. Before the change the document was generated during the build. After the change this was no longer the case.

@martincostello martincostello merged commit a42d8c9 into domaindrivendev:master Oct 11, 2024
9 checks passed
@xC0dex xC0dex deleted the feature/pass-props-to-multi-targeting branch October 11, 2024 07:33
This was referenced Jul 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TargetFrameworks cause compile error
3 participants