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

API Documentation not using XML Docs #35

Closed
jezzsantos opened this issue May 13, 2024 · 0 comments
Closed

API Documentation not using XML Docs #35

jezzsantos opened this issue May 13, 2024 · 0 comments
Labels
design defect Something does not work the best way, or is missing something

Comments

@jezzsantos
Copy link
Owner

At present we are defining a custom description, with expected errors in the XML docs of specific RequestDTO's, and then we are using the Source Generator to copy that data into the generated minimal API definitions, and including that data in the Swagger docs.

This works great when running the Rislyn source generator manually (in the Rider IDE).
But when the source generator is run as part of the MSBUILD build, the data is not available to the source generator.

We think this is because when the build occurs, the XML documentation files, even though they are present on the disk in the output directory of the assembly that needs to read them, the source generator is not reading them for some reason.

We don't know why the source generator is not loading them into its compilation, but the data is not there in the source generator when it runs.

We suspect that we have to write some code to load those files at compilation time.
We have a request to the Roslyn team asking how we do that: dotnet/roslyn#23673

@jezzsantos jezzsantos added the design defect Something does not work the best way, or is missing something label May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design defect Something does not work the best way, or is missing something
Projects
None yet
Development

No branches or pull requests

1 participant