dotnet / dotnet/docfx

[Bug] globalNamespaceID and filter yml filter all API in a project regardless of namespace

Open
#9,303 2 comments 0 reactions 0 assignees View on GitHub
dotnet: api-filter
Dominant language
C#
Stars
4.4k
Forks
890
Avg merge
2h 9m
Merged PRs (30d)
11

Description

**Describe the bug**
Using the following metadata settings in my config file:
```
"filter": "filter.yml",
"globalNamespaceID": "Global Namespace"
```

And the following rule in my filter config:
```
apiRules:
- exclude:
uidRegex: ^Global Namespace.*
type: Namespace
```

Causes all API to be filtered out of my project, across all namespaces.

**To Reproduce**
Steps to reproduce the behavior:
1. Unzip [docfx_project.zip](https://github.com/dotnet/docfx/files/12928209/docfx_project.zip)
2. Build it.

**Expected behavior**
ClassLibrary1.Class1.xPlusOne is documented.

**Context (please complete the following information):**
- OS: Windows
- Docfx version: 2.70.0

**Additional context**
In our previous version of DocFX, 2.59.x, ClassLibrary1.Class1.xPlusOne is documented. What 2.70.0 is doing may be correct behavior, as I'm unsure of exactly what the global namespace is in the context of DocFX filtering, but this behavior change is unexpected.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.