Skip to content

generate-doc: don't mention internal interfaces #1635

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

Open
benjamin-hodgson opened this issue Mar 15, 2025 · 3 comments
Open

generate-doc: don't mention internal interfaces #1635

benjamin-hodgson opened this issue Mar 15, 2025 · 3 comments

Comments

@benjamin-hodgson
Copy link

benjamin-hodgson commented Mar 15, 2025

internal interface IInternal
{
}

public class Public : IInternal
{
}

Running generate-doc on this code produces output markdown that looks like this:

---
sidebar_label: Public
---

# Public Class

[Constructors](#constructors) • [Methods](#methods)

**Namespace**: [<global namespace>](../index.md)

**Assembly**: Test\.dll

```csharp
public class Public : IInternal
```

### Inheritance

[Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → Public

### Implements

* [IInternal](../IInternal/index.md)

## Constructors

| Constructor | Summary |
| ----------- | ------- |
| [Public()](-ctor/index.md) | |

## Methods

| Method | Summary |
| ------ | ------- |
| [Equals(Object)](https://docs.microsoft.com/en-us/dotnet/api/system.object.equals) |  \(Inherited from [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object)\) |
| [GetHashCode()](https://docs.microsoft.com/en-us/dotnet/api/system.object.gethashcode) |  \(Inherited from [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object)\) |
| [GetType()](https://docs.microsoft.com/en-us/dotnet/api/system.object.gettype) |  \(Inherited from [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object)\) |
| [MemberwiseClone()](https://docs.microsoft.com/en-us/dotnet/api/system.object.memberwiseclone) |  \(Inherited from [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object)\) |
| [ToString()](https://docs.microsoft.com/en-us/dotnet/api/system.object.tostring) |  \(Inherited from [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object)\) |

IInternal isn't accessible to consumers and so should not be mentioned in the "Implements" section or in the code snippet showing the declaration. This appears to affect both the github and docusaurus outputs.

@josefpihrt
Copy link
Collaborator

Hi,

Thanks for the suggestion. Original idea behind the docs generation was to more or less mimic official .net docs (https://learn.microsoft.com/en-us/dotnet/api/?view=net-9.0). Is your suggestion based on how it's done there? Could you provide some example from .net docs?

@benjamin-hodgson
Copy link
Author

benjamin-hodgson commented Mar 16, 2025

For example: ImmutableList implements the internal interface IStrongEnumerable, but that interface does not appear in the docs for ImmutableList.

@josefpihrt
Copy link
Collaborator

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants