You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When generating documentation from a manifest that may include references to 3rd-party packages, it may be useful for a 3rd-party package to describe canonical URLs to documentation for specific Reference.
Where the link on FooElement links to the canonical documentation for FooElement. While an API documentation generator could retrieve the CEM for foo and generate / link to that documentation locally, as an option it would be useful if a CEM could say, "the canonical documentation URL for FooElement is at https://foo-library.com/api/FooElement.html".
Proposed schema addition:
/*** A reference to the canonical documentation of a declaration.
*/
export interface DocumentationReference {
/*** An absolute URL to canonical API documentation.
*/
href: string;
}
and add
documentation?: DocumentationReference
to all declaration types.
So in the above example, the CEM for foo might look like:
Additionally, in order to make a pre-flattened schema (where all transitive documentation links are inlined into a manifest, e.g. via pre-processing, to eliminate round-trips to fetch CEM's for referenced dependencies), DocumentationReference would be added as an optional property to Reference as well. This is similar in concept to the inheritedFrom option for class members.
As such, a valid my-foo CEM could include the canonical documentation link for the superclass:
When generating documentation from a manifest that may include references to 3rd-party packages, it may be useful for a 3rd-party package to describe canonical URLs to documentation for specific
Reference
.For example, take the following example:
Which would create the following CEM snippet:
An API documentation generator might like to show documentation such as this:
Where the link on
FooElement
links to the canonical documentation forFooElement
. While an API documentation generator could retrieve the CEM forfoo
and generate / link to that documentation locally, as an option it would be useful if a CEM could say, "the canonical documentation URL forFooElement
is athttps://foo-library.com/api/FooElement.html
".Proposed schema addition:
and add
to all declaration types.
So in the above example, the CEM for
foo
might look like:Additionally, in order to make a pre-flattened schema (where all transitive documentation links are inlined into a manifest, e.g. via pre-processing, to eliminate round-trips to fetch CEM's for referenced dependencies),
DocumentationReference
would be added as an optional property toReference
as well. This is similar in concept to theinheritedFrom
option for class members.As such, a valid
my-foo
CEM could include the canonical documentation link for the superclass:The text was updated successfully, but these errors were encountered: