dotnet / dotnet/docfx

Only some attributes are pulled into the auto-generated api .yaml files

Open
#10,173 3 comments 0 reactions 0 assignees View on GitHub
dotnet
Dominant language
C#
Stars
4.4k
Forks
890
Avg merge
2h 11m
Merged PRs (30d)
10

Description

**Describe the bug**
For example:

- ``[Range(0, 1000000)]`` is pulled into syntax.content for ``BeatsPerSecond``
- ``[Category(ConfigurationCategory)]`` & ``[Description()]`` are not pulled into syntax.content for either ``BeatsPerSecond`` or ``Enable``
![Screenshot 2024-07-25 141522](https://github.com/user-attachments/assets/0dd3becd-6d72-4b74-a4c3-d8e51fe9e005)
![Screenshot 2024-07-25 141737](https://github.com/user-attachments/assets/8efb9d48-f374-437a-8635-a9a61e9925c8)
![Screenshot 2024-07-25 141857](https://github.com/user-attachments/assets/331217d1-f4b0-43c9-9f8e-181e0b596ccd)

The relevant files for this example are: OpenEphys.Onix1.ConfigureHeartbeart.yml (generated locally by ``docfx metadata`` command) and [ConfigureHeartbeart.cs](https://github.com/open-ephys/onix-bonsai-onix1/blob/main/OpenEphys.Onix1/OpenEphys.Onix1/ConfigureHeartbeat.cs)

**To Reproduce**
Steps to reproduce the behavior:
1. The simplest way might be to fork [this repo](https://github.com/open-ephys/onix1-bonsai-docs) and build it to see for yourself. But I can try to distill the issue further if y'all want/need

**Expected behavior**
All attributes are pullled into the .yml file after running the `metadata` command

**Context (please complete the following information):**
- OS: Windows
- Docfx version: 2.77.0
- `docfx.json` config

```json
{
"metadata": [
{
"src": [
{
"files": [
"src/**.csproj"
]
}
],
"dest": "api",
"filter": "filter.yml",
"enumSortOrder": "declaringOrder"
}
],
"build": {
"content": [
{
"files": [
"api/**.yml",
"articles/**.md",
"articles/**/toc.yml",
"tutorials/**.md",
"tutorials/**/toc.yml",
"toc.yml",
"*.md"
],
"exclude": "tutorials/devices/**"
}
],
"resource": [
{
"files": [
"logo.svg",
"favicon.png",
"images/**",
"workflows/**"
]
}
],
"output": "_site",
"overwrite": [
{
"files": [
],
"exclude": [
"obj/**",
"_site/**"
]
}
],
"template": [
"default",
"modern",
"template",
"docfx-tools/template"
],
"globalMetadata": {
"_enableNewTab": true,
"_enableSearch": true,
"pdf": false,
"_appFooter": "© 2024 Open Ephys and Contributors. Made with docfx",
"_appFaviconPath": "favicon.png"
},
"markdownEngineName": "markdig",
"markdownEngineProperties": {
"markdigExtensions": [
"attributes",
"customcontainers"
]
},
"xref": [
"https://bonsai-rx.org/docs/xrefmap.yml",
"https://horizongir.github.io/opencv.net/xrefmap.yml",
"https://horizongir.github.io/reactive/xrefmap.yml"
]
}
}
```
- .NET info

```
.NET SDK:
Version: 8.0.301
Commit: 1a0e9c0300
Workload version: 8.0.300-manifests.68207d42
MSBuild version: 17.10.4+10fbfbf2e

Runtime Environment:
OS Name: Windows
OS Version: 10.0.22631
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\8.0.301\

.NET workloads installed:
[maui-windows]
Installation Source: VS 17.8.34511.84
Manifest Version: 8.0.3/8.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.maui\8.0.3\WorkloadManifest.json
Install Type: Msi

[maccatalyst]
Installation Source: VS 17.8.34511.84
Manifest Version: 17.2.8004/8.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.maccatalyst\17.2.8004\WorkloadManifest.json
Install Type: Msi

[ios]
Installation Source: VS 17.8.34511.84
Manifest Version: 17.2.8004/8.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.ios\17.2.8004\WorkloadManifest.json
Install Type: Msi

[android]
Installation Source: VS 17.8.34511.84
Manifest Version: 34.0.43/8.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.android\34.0.43\WorkloadManifest.json
Install Type: Msi

Host:
Version: 8.0.6
Architecture: x64
Commit: 3b8b000a0e

.NET SDKs installed:
8.0.101 [C:\Program Files\dotnet\sdk]
8.0.301 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 8.0.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.32 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 8.0.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
Not set

global.json file:
Not found

Learn more:
https://aka.ms/dotnet/info

Download .NET:
https://aka.ms/dotnet/download
```

**Additional context**
I'm not sure if we're doing something wrong or if this is a docfx bug. Please let me know if I can help. or provide anymore information

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.