Skip to content

[api-documenter] Hyperlinking support for "complex" types (YAML generator) #867

@AlexJerabek

Description

@AlexJerabek

Currently, the tool uses the uid of a type to help create link to the type's page when API Documenter's yml is run through the OPS build system (for docs.microsoft.com). This works for simple types (like excel.Excel.NamedItemCollection is this example):

  - uid: excel.Excel.Worksheet.names
    summary: |-
      Collection of names scoped to the current worksheet. Read-only.

      \[ [API set: ExcelApi 1.4](/javascript/office/requirement-sets/excel-api-requirement-sets) \]
    name: names
    fullName: excel.Excel.Worksheet.names
    langs:
      - typeScript
    type: property
    syntax:
      content: 'readonly names: Excel.NamedItemCollection;'
      return:
        type:
          - excel.Excel.NamedItemCollection

However, if the type is in a generic or unioned with another type, the uid is not inserted (like Excel.WorksheetCalculatedEventArgs in this example):

  - uid: excel.Excel.Worksheet.onCalculated
    summary: |-
      Occurs when the worksheet is calculated.

      \[ [API set: ExcelApi 1.8](/javascript/office/requirement-sets/excel-api-requirement-sets) \]
    name: onCalculated
    fullName: excel.Excel.Worksheet.onCalculated
    langs:
      - typeScript
    type: event
    syntax:
      content: 'readonly onCalculated: OfficeExtension.EventHandlers<Excel.WorksheetCalculatedEventArgs>;'
      return:
        type:
          - OfficeExtension.EventHandlers<Excel.WorksheetCalculatedEventArgs>

We want Excel.WorksheetCalculatedEventArgs to link to it's page, despite being syntactically part of Office.Extension.EventHandlers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions