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

feat: allow custom API filtering #8408

Merged
merged 7 commits into from
Feb 13, 2023
Merged

feat: allow custom API filtering #8408

merged 7 commits into from
Feb 13, 2023

Conversation

yufeih
Copy link
Contributor

@yufeih yufeih commented Feb 13, 2023

Enable API filter customization using the DotnetApiOptions API:

var options = new DotnetApiOptions
{
    IncludeApi = symbol => ...
    IncludeAttribute = symbol => ...
};

await DotnetApiCatalog.GenerateManagedReferenceYamlFiles("docfx.json", options);

BEHAVIOR CHANGES:

  • Explicit interface implementations excluded from generated APIs
  • Exclude a parent namespace using filter rule also exclude its child namespaces, same way as nested classes.

Implements #8253 #6820

@yufeih yufeih added the new-feature Makes the pull request to appear in "New Features" section of the next release note label Feb 13, 2023
@codecov
Copy link

codecov bot commented Feb 13, 2023

Codecov Report

Base: 76.95% // Head: 77.06% // Increases project coverage by +0.11% 🎉

Coverage data is based on head (eb98246) compared to base (c3709c5).
Patch coverage: 97.46% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8408      +/-   ##
==========================================
+ Coverage   76.95%   77.06%   +0.11%     
==========================================
  Files         865      860       -5     
  Lines       30860    30740     -120     
==========================================
- Hits        23749    23691      -58     
+ Misses       7111     7049      -62     
Impacted Files Coverage Δ
....DocAsCode.Dotnet/Visitors/SymbolVisitorAdapter.cs 95.04% <94.73%> (+0.19%) ⬆️
src/Microsoft.DocAsCode.Dotnet/SymbolFilter.cs 96.77% <96.77%> (ø)
src/Microsoft.DocAsCode.Dotnet/DotnetApiCatalog.cs 96.07% <100.00%> (ø)
src/Microsoft.DocAsCode.Dotnet/DotnetApiOptions.cs 100.00% <100.00%> (ø)
...de.Dotnet/ExtractMetadata/ExtractMetadataWorker.cs 83.33% <100.00%> (+0.16%) ⬆️
...crosoft.DocAsCode.Dotnet/SymbolFormatter.Syntax.cs 99.62% <100.00%> (-0.38%) ⬇️
src/Microsoft.DocAsCode.Dotnet/SymbolFormatter.cs 95.95% <100.00%> (-4.05%) ⬇️
src/Microsoft.DocAsCode.Dotnet/SymbolHelper.cs 100.00% <100.00%> (ø)
...ft.DocAsCode.Dotnet/Visitors/YamlModelGenerator.cs 97.87% <100.00%> (ø)
src/docfx/SubCommands/MetadataCommand.cs 89.55% <100.00%> (ø)
... and 6 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@yufeih yufeih marked this pull request as ready for review February 13, 2023 11:59
@yufeih yufeih force-pushed the feature/symbolfilter branch from c7c49c0 to eb98246 Compare February 13, 2023 12:07
@yufeih yufeih merged commit 87217aa into main Feb 13, 2023
@yufeih yufeih deleted the feature/symbolfilter branch February 13, 2023 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature Makes the pull request to appear in "New Features" section of the next release note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant