Skip to content

feat: add overload IncludeMagicOnionXmlComments #978

Merged
mayuki merged 2 commits intoCysharp:mainfrom
arika0093:main
Sep 3, 2025
Merged

feat: add overload IncludeMagicOnionXmlComments #978
mayuki merged 2 commits intoCysharp:mainfrom
arika0093:main

Conversation

@arika0093
Copy link
Contributor

Swashbuckle's IncludeXmlComments has overloads such as the following:
https://github.com/domaindrivendev/Swashbuckle.AspNetCore/blob/8f82acf800a8733a389328177d258186e947c20d/src/Swashbuckle.AspNetCore.SwaggerGen/DependencyInjection/SwaggerGenOptionsExtensions.cs#L839-L847

Furthermore, this overload is also used in the documentation.
https://github.com/domaindrivendev/Swashbuckle.AspNetCore/blob/8f82acf800a8733a389328177d258186e947c20d/docs/configure-and-customize-swaggergen.md?plain=1#L257

What it does is exactly the same as the current sample, but I personally prefer specifying the assembly as an argument (it requires slightly less typing). I'm also accustomed to this approach from Swashbuckle.

Therefore, I added an overload to the IncludeMagicOnionXmlComments method that allows specifying an assembly, similar to Swashbuckle's IncludeXmlComments.

I've also updated the documentation to use this overload. (Though the original code might be preferable in documentation, as it explicitly shows loading the XML file.)

Thanks for the great library!

@arika0093 arika0093 requested a review from mayuki as a code owner September 2, 2025 11:50
@mayuki
Copy link
Member

mayuki commented Sep 3, 2025

Thank you for contribution. Looks good to me!

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.

2 participants