Skip to content

[Bug] Default template missing information about enums #9260

@nirinchev

Description

@nirinchev

Describe the bug
When using the default template, enum documentation is missing the <remarks> section as well as information about any [Obsolete] members.

To Reproduce
Steps to reproduce the behavior:

  1. Define an enum with obsolete members and/or <remarks> section:

    public enum MyEnum
    {
        /// <summary>
        /// This is a regular enum value.
        /// </summary>
        /// <remarks>
        /// This is a remarks section. Very important remarks about Value go here.
        /// </remarks>
        Value,
    
        /// <summary>
        /// This is old and unused. You shouldn't use it anymore.
        /// </summary>
        /// <remarks>
        /// Don't use this, seriously! Use Value instead.
        /// </remarks>
        [Obsolete("Use Value")]
        OldAndUnusedValue
    }
  2. Generate API docs using the default template:

        "template": [
            "default"
        ],

Expected behavior
I would expect the generated page to include the <remarks> section as well as display somehow that the OldAndUnusedValue is obsolete, similarly to how it's done for classes.

Screenshots

This is the generated page for MyEnum - as you can see, there's no indication which members are obsolete. The text of the <remarks> section is also missing.

Screenshot 2023-10-02 at 14 55 20

For comparison, this is the page generated for a class with similar members:

Screenshot 2023-10-02 at 14 55 30

Context:

  • Browser: Safari
  • Form factor: Desktop
  • Docfx version: 2.70.4
  • Template: default

Additional context
I've attached a sample project that reproduces the problem. To generate the API docs, run docfx docfx_project/docfx.json --serve.

DocfxEnums.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    templateThe stock site template

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions