-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Support <inheritdoc /> on docs #1940
Comments
inheritdoc is currently only checked on base classes and not interfaces |
There are tests for inheritdocs from interfaces, do you have another use case/scenario? |
Hi @RicoSuter! In which version should this be fixed? My projects use One of my ASP.NET Core 3.1 Web API model classes look like this: namespace Skarabee.DocumentSigning.CoreService
{
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Entities.DocumentSigningSessionAggregate;
/// <summary>
/// Represents a request to create a new document signing session.
/// </summary>
public class CreateSessionRequest
{
/// <inheritdoc cref="DocumentSigningSession.ServiceInstanceName"/>
[Required]
public string ServiceInstanceName { get; set; }
/// <inheritdoc cref="DocumentSigningSession.NotifySessionChangedBaseUrl"/>
public string NotifySessionChangedBaseUrl { get; set; }
/// <inheritdoc cref="DocumentSigningSession.Stakeholders"/>
[Required]
public ICollection<CreateSessionRequestStakeholder> Stakeholders { get; set; }
/// <inheritdoc cref="DocumentSigningSession.DocumentName"/>
[Required]
public string DocumentName { get; set; }
///// <inheritdoc cref="DocumentSigningSession.DocumentGroupId"/>
//public string DocumentGroupId { get; set; }
/// <inheritdoc cref="DocumentSigningSession.DocumentReference"/>
public string DocumentReference { get; set; }
// TODO Allow specific culture names, but convert to neutral culture
/// <inheritdoc cref="DocumentSigningSession.DocumentLanguageCode"/>
public string DocumentLanguageCode { get; set; }
/// <summary>
/// Gets or sets the document to sign, represented as a Base64-encoded string.
/// </summary>
[Required]
public string DocumentAsBase64String { get; set; }
/// <inheritdoc cref="DocumentSigningSession.ExpiresAtDateTime"/>
public DateTime? ExpiresAtDateTime { get; set; }
}
} Perhaps this is fixed in v13.10.9? I wanted to upgrade to this version, which failed because my project has a dependency on Thanks in advance for your insights! |
I think this cref thing is not supported only inheritdocs without attribute reading from the base class. |
I would appreciate an extension to support |
We would need to implement/fix this in Namotion.Reflection: |
It is very common to use
<inheritdoc />
to extend the documentation of APIs when they use base classes, but right now NSwag does not show these docs on the generated Swagger spec.If a class uses
<inheritdoc />
, all it's base classes and interface docs should be considered on the API docs, for all its methods.If a overriding method uses
<inheritdoc />
the base method docs should be considered on the API docs.The text was updated successfully, but these errors were encountered: