Skip to content

Conversation

@martincostello
Copy link
Collaborator

Fix property casing of Swagger UI interceptor function properties.

Resolves #2906.

Fix property casing of Swagger UI interceptor function properties.
Resolves domaindrivendev#2906.
@martincostello martincostello added this to the v6.6.2 milestone May 16, 2024
@codecov-commenter
Copy link

codecov-commenter commented May 16, 2024

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.89%. Comparing base (ecce973) to head (969cc9d).
⚠️ Report is 387 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2907   +/-   ##
=======================================
  Coverage   89.89%   89.89%           
=======================================
  Files          72       72           
  Lines        2711     2711           
  Branches      429      429           
=======================================
  Hits         2437     2437           
  Misses        274      274           
Flag Coverage Δ
Linux 89.89% <100.00%> (ø)
Windows 89.89% <100.00%> (ø)
macOS ?

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.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@martincostello martincostello enabled auto-merge (rebase) May 16, 2024 20:07
/// Accepts one argument requestInterceptor(request) and must return the modified request, or a Promise that resolves to the modified request.
/// Ex: "function (req) { req.headers['MyCustomHeader'] = 'CustomValue'; return req; }"
/// </summary>
[JsonPropertyName("RequestInterceptorFunction")]
Copy link
Owner

@domaindrivendev domaindrivendev May 21, 2024

Choose a reason for hiding this comment

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

Given that the rest of the config properties are serialized to camel case, I wonder would it be better to maintain that consistency and just update the assignment in index.html?

var interceptors = JSON.parse('%(Interceptors)');
if (interceptors.RequestInterceptorFunction)
configObject.requestInterceptor = parseFunction(interceptors.RequestInterceptorFunction);
if (interceptors.ResponseInterceptorFunction)
configObject.responseInterceptor = parseFunction(interceptors.ResponseInterceptorFunction);

Copy link
Owner

Choose a reason for hiding this comment

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

Just a thought but not a showstopper for me other than that looks good 👍

Copy link
Owner

Choose a reason for hiding this comment

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

doh didn't realize we had auto-merge - oh well I guess we leave it as is

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I did consider renaming it, but this persuaded me to leave it alone: #2906 (comment)

@martincostello martincostello merged commit d5cd28e into domaindrivendev:master May 21, 2024
@martincostello martincostello deleted the gh-2906 branch May 21, 2024 14:09
This was referenced Oct 22, 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.

[Bug]: Request/Response Interceptors Broken with .NET8 Upgrade / 6.6.1

4 participants