Skip to content

API Doctor incorrectly parses tables as enumeration tables and fails validation #228

@jasonjoh

Description

@jasonjoh

This seems to be an issue with the code that tries to guess a table "shape" from the section title the table is in.

For example, this topic: https://learn.microsoft.com/en-us/graph/api/group-list-members?view=graph-rest-1.0&tabs=http.

The H1 in this topic is "List group members". If you add a table in the introduction (which we are doing as part of an effort to put national cloud support into the docs), the table gets parsed as an enumeration table in FindDecoderFromHeaderText.

Sequence of events:

  • lastHeaderText is List group members
  • this.CommonHeaderContentMap[4] has a key with the value {x} members
  • The else if (kvp.Key.Contains("{x}")) clause is satisifed
  • commonHeaderContent then becomes members
  • lastHeader.EndsWith(commonHeaderContent) then becomes true
  • Code thinks that List is a type since it's the word right before members
  • Validation error: Failed to parse enumeration values for type microsoft.graph.list. Table requires a column header named one of the following: Member, Name, Value

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