Skip to content
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

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

Open
jasonjoh opened this issue Aug 29, 2023 · 0 comments

Comments

@jasonjoh
Copy link
Contributor

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant